-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Various improvements of test suite before addition of <flat_meow>.
#5968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… feature test macro.
…cros and _HAS_CXX2a
| @@ -0,0 +1,20 @@ | |||
| // Copyright (c) Microsoft Corporation. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should drop this file at this moment. It should be added when implementing inplace_vector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I have created a soft link by mentioning the relevant issues, I think relying on authors of inplace_vector, hive or optional range accessors to update this test in the future is a completely redundant mental burden and waste of time.
I like the current solution since it tests the current WP's requirements completely and will continue to do so until a new container is added. I personally see no issue in testing "future technology" when it is properly guarded with feature test macros. I consider this in line with their intended use case. Especially in this case, where I don't speculatively test some unstable API.
| #include <version> | ||
| #if defined(__cpp_lib_hive) && _HAS_CXX26 | ||
|
|
||
| #include <hive> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto, this file should be added when implementing hive.
tests/std/tests/LWG3987_including_flat_foo_doesnt_provide_begin_end/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/LWG3987_including_flat_foo_doesnt_provide_begin_end/test_optional.cpp
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
tests/std/tests/LWG3987_including_flat_foo_doesnt_provide_begin_end/shared_test.hpp
Outdated
Show resolved
Hide resolved
tests/std/tests/LWG3987_including_flat_foo_doesnt_provide_begin_end/test_literator.cpp
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
|
I skimmed through [container.adaptors] many times and found no sufficiently generic paragraph that would be appropriate for this PR. So I have switched it from WIP to review-ready. |
This PR is a collection of changes that are remotely related to work on
<flat_meow>, but they are sufficiently self-contained that it would be nice to introduce them separately, before the feature branch is merged.Changes:
LWG3987_including_flat_foo_doesnt_provide_begin_endfor requirements of [iterator.range]/1 that certain headers introduce free functionsbegin/end/data/sizeetc. This test is required to prove proper implementation of LWG-3987 "Including<flat_foo>doesn't providestd::begin/end". Structure inspired byGH_000545_include_compare. Some notes:Edit: nothing is blocked atm.<valarray>test is deactivated with// TRANSITIONas it is blocked by Implement P3016R6 Resolve Inconsistencies Inbegin/endForvalarrayAnd Braced Initializer Lists #5847 (expected to accept soon)<flat_map>,<flat_set>,<optional>,<hive>and<inplace_vector>tests guarded by corresponding feature test macros; they will be activated by resolving P0429R9<flat_map>#2910, P1222R4<flat_set>#2912, P3168R2std::optionalRange Support #4772, P0447R28<hive>#5301 and P0843R14<inplace_vector>#4766, respectively.