Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@vmichal
Copy link
Contributor

@vmichal vmichal commented Dec 19, 2025

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:

@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation.
Copy link
Contributor

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.

Copy link
Contributor Author

@vmichal vmichal Dec 19, 2025

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>
Copy link
Contributor

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\LWG3545_pointer_traits_sfinae
tests\LWG3561_discard_block_engine_counter
tests\LWG3610_iota_view_size_and_integer_class
tests\LWG3987_including_flat_foo_doesnt_provide_begin_end
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think LWG3987_including_flat_foo_doesnt_provide_begin_end is a good name for these tests. As availability of begin/end in many headers is required since C++11 via WG21-N2930.
But since N2930 is too old, I guess it's a bit unconventional to mention it in the test name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we generally don't mention "foo" in the repo, even if the LWG issue title says it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we generally don't mention "foo" in the repo, even if the LWG issue title says it.

I don't mean to disagree, but can you elaborate a little? Yes, I have noticed you prefer meow over foo, but as far as I am aware, both are perfectly valid placeholders with no cultural, religious or any different negative connotation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think LWG3987_including_flat_foo_doesnt_provide_begin_end is a good name for these tests. As availability of begin/end in many headers is required since C++11 via WG21-N2930. But since N2930 is too old, I guess it's a bit unconventional to mention it in the test name.

Oh yes, I agree, but I found no precedent for naming a test that is not strictly related to any paper (Pxxx, LWGxxx) or issue (GH, and I assume VSO and Dev fall into this category too).
I'll gladly rename this to (some-prefix)_include_iterator_range, but regarding "some-prefix", I would need to use this PR as GH_005968 or created a completely new prefix, e.g. MISC for unsorted miscellaneous tests.

I prefer the MISC prefix, but it is your call.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was an old policy on MSDN where they avoided "foo" because it was part of "foobar" and people were concerned that sounded like something else. Really silly but we've continued to avoid "foo".

We used to use VSO_0000000 for novel tests but that was clutter-inducing so we stopped. Marking this as GH with the PR number is useful context, I recommend that.

// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should either avoid including any header, or include <version> and then guard tests with _HAS_CXXNN.

void test_forward_list();
void test_hive();
void test_inplace_vector();
void test_list();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_iterator() seems missing.

// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <version>
#if defined(__cpp_lib_optional_range_support) && _HAS_CXX17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe __cpp_lib_optional_range_support won't be defined in pre-C++26 modes. Perhaps we should also drop this file at this moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe __cpp_lib_optional_range_support won't be defined in pre-C++26 modes. Perhaps we should also drop this file at this moment.

I only skimmed through yvals_core.h and - clearly incorrectly - concluded that we define all __cpp_lib_xxx unconditionally as soon as a feature is implemented. So I will drop all _HAS_CXX_2a and keep just the feature test macro.

@StephanTLavavej StephanTLavavej added the test Related to test code label Dec 19, 2025
@StephanTLavavej
Copy link
Member

Draft mode just disables CI runs. Was that your intention?

@vmichal
Copy link
Contributor Author

vmichal commented Dec 19, 2025

Draft mode just disables CI runs. Was that your intention?

Today I learned :D
My intention was to indicate that this is probably not the final state of this PR and thus should not be merged yet (in case you were extra eager to work during vacation). I am working in parallel (although slowly) on changes to the flat_meow feature branch and this, so more tests may be added to this PR.

@StephanTLavavej StephanTLavavej moved this from Initial Review to Work In Progress in STL Code Reviews Dec 19, 2025
@StephanTLavavej
Copy link
Member

Thanks, I'll move it to WIP for you. When you're ready to run tests, mark it ready for review (moving it out of draft status) and then push commits, which will trigger CI. Merely moving out of draft mode does not start tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Related to test code

Projects

Status: Work In Progress

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.