-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Test that various Standard headers provide iterator range access functions #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
Merged
StephanTLavavej
merged 33 commits into
microsoft:main
from
vmichal:prepare-tests-for-flat-meow
Jan 20, 2026
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
683ef99
Test that selected headers introduce machinery from iterator.range/1
vmichal c7c0490
Properly guard the test of introduction of begin/end by <optional> by…
vmichal 0d52345
Add tests for hive and inplace_vector.
vmichal 3e32558
Use feature test macro instead of __has_include.
vmichal a48d2e0
Properly guard tests for C++23 and C++26 feature with feature test ma…
vmichal 8c92460
Properly test the free functions, not member functions.
vmichal 53454ae
Use only feature test macros, do not duplicate the check with _HAS_CXX2a
vmichal dc2cd24
Add test for <iterator>
vmichal 5b12d07
Fix template utility detecting presence of a member function in conta…
vmichal dabbeaa
Self test detection mechanism.
vmichal d13eb55
Rename new tests to mention this GH PR.
vmichal 60a2bf8
Also modify list of tests after renaming the directory
vmichal 3300fd7
Merge branch 'main' into prepare-tests-for-flat-meow
vmichal 2071173
Activate valarray test.
vmichal c7a20c0
Wrap construction of individual objects into separate scopes to preve…
vmichal b8abde2
Fix formatting.
vmichal 55904e7
Merge branch 'main' into prepare-tests-for-flat-meow
StephanTLavavej 2b32511
Fix typo: test_literator.cpp => test_iterator.cpp
StephanTLavavej 6c6999c
Update Standard citation.
StephanTLavavej 77d7de8
West const.
StephanTLavavej 2a34cbc
Add `#pragma once`.
StephanTLavavej 9af82e7
typename => class
StephanTLavavej af14ffa
Fix typo: voi => void
StephanTLavavej 75c7dea
Improve consistency of arrow comments.
StephanTLavavej 2a4faad
Add reminders when implementing features.
StephanTLavavej 77dbd50
Avoid quasi-shadowing: array => arr
StephanTLavavej 76ced32
string_view can directly view "hello".
StephanTLavavej 4dd01ca
Avoid inconsistent use of CTAD for flat_set.
StephanTLavavej 5c3fde2
Don't bother naming unused `t`.
StephanTLavavej c45cc98
Order rbegin/rend before crbegin/crend.
StephanTLavavej 9702094
Explicitly call out the order assumption.
StephanTLavavej 36aba75
ssize is special.
StephanTLavavej bf6e064
Always guard ssize for C++20.
StephanTLavavej File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/std/tests/GH_005968_headers_provide_begin_end/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
27 changes: 27 additions & 0 deletions
27
tests/std/tests/GH_005968_headers_provide_begin_end/custom_format.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| import os | ||
|
|
||
| from stl.test.format import STLTestFormat, TestStep | ||
| from stl.test.tests import TestType | ||
|
|
||
|
|
||
| class CustomTestFormat(STLTestFormat): | ||
| def getBuildSteps(self, test, litConfig, shared): | ||
| exeSourceDir = os.path.dirname(test.getSourcePath()) | ||
| _, outputBase = test.getTempPaths() | ||
|
|
||
| sourceFiles = [] | ||
| for filename in os.listdir(exeSourceDir): | ||
| if filename.endswith('.cpp'): | ||
| sourceFiles.append(os.path.join(exeSourceDir, filename)) | ||
|
|
||
| if TestType.COMPILE in test.testType: | ||
| cmd = [test.cxx, '/c', *sourceFiles, *test.flags, *test.compileFlags] | ||
| elif TestType.RUN in test.testType: | ||
| shared.execFile = outputBase + '.exe' | ||
| cmd = [test.cxx, *sourceFiles, *test.flags, *test.compileFlags, '/Fe' + shared.execFile, | ||
| '/link', *test.linkFlags] | ||
|
|
||
| yield TestStep(cmd, shared.execDir, shared.env, False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| RUNALL_INCLUDE ..\usual_matrix.lst |
9 changes: 9 additions & 0 deletions
9
tests/std/tests/GH_005968_headers_provide_begin_end/lit.local.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| import os | ||
| import site | ||
| site.addsitedir(os.path.dirname(os.path.dirname(__file__))) | ||
| import GH_005968_headers_provide_begin_end.custom_format | ||
|
|
||
| config.test_format = GH_005968_headers_provide_begin_end.custom_format.CustomTestFormat() |
91 changes: 91 additions & 0 deletions
91
tests/std/tests/GH_005968_headers_provide_begin_end/shared_test.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #pragma once | ||
|
|
||
| // Intentionally avoid including anything. Order assumption: shared_test.hpp assumes | ||
| // that the relevant Standard headers have already been included by the .cpp files. | ||
|
|
||
| // Test requirements of N5032 [iterator.range]/1. | ||
|
|
||
| namespace detail { | ||
|
|
||
| // file test_iterator.cpp uses a non-std container and thus we can't rely on ADL to find begin/end etc. | ||
| using namespace std; | ||
|
|
||
| // Define minimal metaprogramming tools, avoid including anything | ||
|
|
||
| #define DEFINE_CONDITIONAL_CALLER_OF_FREE_MEMBER(free_name, member_name) \ | ||
| template <class T, class = void> \ | ||
| struct conditional_caller_of_##free_name { \ | ||
| constexpr void operator()(T&) {} \ | ||
| }; \ | ||
| \ | ||
| template <class T> \ | ||
| struct conditional_caller_of_##free_name<T&, decltype((void) static_cast<T*>(nullptr)->member_name())> { \ | ||
| constexpr auto operator()(T& t) { \ | ||
| return free_name(t); \ | ||
| } \ | ||
| }; | ||
|
|
||
| #define DEFINE_CONDITIONAL_CALLER_OF(name) DEFINE_CONDITIONAL_CALLER_OF_FREE_MEMBER(name, name) | ||
|
|
||
| #define CONDITIONALLY_CALL(c, name) conditional_caller_of_##name<decltype(c)>{}(c) | ||
|
|
||
| DEFINE_CONDITIONAL_CALLER_OF(rbegin); | ||
| DEFINE_CONDITIONAL_CALLER_OF(rend); | ||
| DEFINE_CONDITIONAL_CALLER_OF(crbegin); | ||
| DEFINE_CONDITIONAL_CALLER_OF(crend); | ||
| DEFINE_CONDITIONAL_CALLER_OF(size); | ||
| #if _HAS_CXX20 | ||
| DEFINE_CONDITIONAL_CALLER_OF_FREE_MEMBER(ssize, size); // N5032 [iterator.range]/18 | ||
| #endif | ||
| DEFINE_CONDITIONAL_CALLER_OF(empty); | ||
| DEFINE_CONDITIONAL_CALLER_OF(data); | ||
|
|
||
| template <class C> | ||
| void test_free_container_functions(C& c) { | ||
| (void) begin(c); | ||
| (void) end(c); | ||
| (void) cbegin(c); | ||
| (void) cend(c); | ||
| CONDITIONALLY_CALL(c, rbegin); // missing e.g. for forward_list | ||
| CONDITIONALLY_CALL(c, rend); // missing e.g. for forward_list | ||
| CONDITIONALLY_CALL(c, crbegin); // missing e.g. for forward_list | ||
| CONDITIONALLY_CALL(c, crend); // missing e.g. for forward_list | ||
| CONDITIONALLY_CALL(c, size); // missing e.g. for optional | ||
| #if _HAS_CXX20 | ||
| CONDITIONALLY_CALL(c, ssize); // missing e.g. for optional | ||
| #endif | ||
| CONDITIONALLY_CALL(c, empty); // missing e.g. for valarray | ||
| CONDITIONALLY_CALL(c, data); // missing e.g. for valarray | ||
| } | ||
|
|
||
| inline void test_free_array_functions() { | ||
| int a[]{1, 2, 3}; | ||
|
|
||
| (void) begin(a); | ||
| (void) end(a); | ||
| (void) cbegin(a); | ||
| (void) cend(a); | ||
| (void) rbegin(a); | ||
| (void) rend(a); | ||
| (void) crbegin(a); | ||
| (void) crend(a); | ||
| (void) size(a); | ||
| #if _HAS_CXX20 | ||
| (void) ssize(a); | ||
| #endif | ||
| (void) empty(a); | ||
| (void) data(a); | ||
| } | ||
| } // namespace detail | ||
|
|
||
| template <class C> | ||
| void shared_test(C& c) { | ||
| detail::test_free_container_functions(c); | ||
| // as_const from <utility> not required to be available | ||
| detail::test_free_container_functions(const_cast<const C&>(c)); | ||
|
|
||
| detail::test_free_array_functions(); | ||
| } | ||
48 changes: 48 additions & 0 deletions
48
tests/std/tests/GH_005968_headers_provide_begin_end/test.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| void test_array(); | ||
| void test_deque(); | ||
| void test_flat_map(); | ||
| void test_flat_set(); | ||
| void test_forward_list(); | ||
| void test_hive(); | ||
| void test_inplace_vector(); | ||
| void test_iterator(); | ||
| void test_list(); | ||
StephanTLavavej marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| void test_map(); | ||
| void test_optional(); | ||
| void test_regex(); | ||
| void test_set(); | ||
| void test_span(); | ||
| void test_stacktrace(); | ||
| void test_string(); | ||
| void test_string_view(); | ||
| void test_unordered_map(); | ||
| void test_unordered_set(); | ||
| void test_valarray(); | ||
| void test_vector(); | ||
|
|
||
| int main() { | ||
| test_array(); | ||
| test_deque(); | ||
| test_flat_map(); | ||
| test_flat_set(); | ||
| test_forward_list(); | ||
| test_hive(); | ||
| test_inplace_vector(); | ||
| test_iterator(); | ||
| test_list(); | ||
| test_map(); | ||
| test_optional(); | ||
| test_regex(); | ||
| test_set(); | ||
| test_span(); | ||
| test_stacktrace(); | ||
| test_string(); | ||
| test_string_view(); | ||
| test_unordered_map(); | ||
| test_unordered_set(); | ||
| test_valarray(); | ||
| test_vector(); | ||
| } | ||
11 changes: 11 additions & 0 deletions
11
tests/std/tests/GH_005968_headers_provide_begin_end/test_array.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <array> | ||
|
|
||
| #include "shared_test.hpp" | ||
|
|
||
| void test_array() { | ||
| std::array<int, 3> container{1, 2, 3}; | ||
| shared_test(container); | ||
| } |
11 changes: 11 additions & 0 deletions
11
tests/std/tests/GH_005968_headers_provide_begin_end/test_deque.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <deque> | ||
|
|
||
| #include "shared_test.hpp" | ||
|
|
||
| void test_deque() { | ||
| std::deque<int> container{1, 2, 3}; | ||
| shared_test(container); | ||
| } |
34 changes: 34 additions & 0 deletions
34
tests/std/tests/GH_005968_headers_provide_begin_end/test_flat_map.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <version> | ||
| #if defined(__cpp_lib_flat_map) | ||
| static_assert(false, "When this feature is implemented, update this to a Standard mode check."); | ||
|
|
||
| #include <flat_map> | ||
|
|
||
| #include "shared_test.hpp" | ||
|
|
||
| void test_flat_map() { | ||
| { | ||
| std::flat_map<int, int> container{ | ||
| {1, 5}, | ||
| {3, 7}, | ||
| }; | ||
| shared_test(container); | ||
| } | ||
|
|
||
| { | ||
| std::flat_multimap<int, int> container2{ | ||
| {1, 5}, | ||
| {3, 7}, | ||
| }; | ||
| shared_test(container2); | ||
| } | ||
| } | ||
|
|
||
| #else // ^^^ defined(__cpp_lib_flat_map) / !defined(__cpp_lib_flat_map) vvv | ||
|
|
||
| void test_flat_map() {} | ||
|
|
||
| #endif // ^^^ !defined(__cpp_lib_flat_map) ^^^ |
28 changes: 28 additions & 0 deletions
28
tests/std/tests/GH_005968_headers_provide_begin_end/test_flat_set.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <version> | ||
| #if defined(__cpp_lib_flat_set) | ||
| static_assert(false, "When this feature is implemented, update this to a Standard mode check."); | ||
|
|
||
| #include <flat_set> | ||
|
|
||
| #include "shared_test.hpp" | ||
|
|
||
| void test_flat_set() { | ||
| { | ||
| std::flat_set<int> container{1, 2, 3}; | ||
| shared_test(container); | ||
| } | ||
|
|
||
| { | ||
| std::flat_multiset<int> container2{1, 2, 3}; | ||
| shared_test(container2); | ||
| } | ||
| } | ||
|
|
||
| #else // ^^^ defined(__cpp_lib_flat_set) / !defined(__cpp_lib_flat_set) vvv | ||
|
|
||
| void test_flat_set() {} | ||
|
|
||
| #endif // ^^^ !defined(__cpp_lib_flat_set) ^^^ |
11 changes: 11 additions & 0 deletions
11
tests/std/tests/GH_005968_headers_provide_begin_end/test_forward_list.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <forward_list> | ||
|
|
||
| #include "shared_test.hpp" | ||
|
|
||
| void test_forward_list() { | ||
| std::forward_list<int> container{1, 2, 3}; | ||
| shared_test(container); | ||
| } |
21 changes: 21 additions & 0 deletions
21
tests/std/tests/GH_005968_headers_provide_begin_end/test_hive.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <version> | ||
| #if defined(__cpp_lib_hive) | ||
| static_assert(false, "When this feature is implemented, update this to a Standard mode check."); | ||
|
|
||
| #include <hive> | ||
StephanTLavavej marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| #include "shared_test.hpp" | ||
|
|
||
| void test_hive() { | ||
| std::hive<int> container{1, 2, 3}; | ||
| shared_test(container); | ||
| } | ||
|
|
||
| #else // ^^^ defined(__cpp_lib_hive) / !defined(__cpp_lib_hive) vvv | ||
|
|
||
| void test_hive() {} | ||
|
|
||
| #endif // ^^^ !defined(__cpp_lib_hive) ^^^ | ||
21 changes: 21 additions & 0 deletions
21
tests/std/tests/GH_005968_headers_provide_begin_end/test_inplace_vector.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
StephanTLavavej marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <version> | ||
| #if defined(__cpp_lib_inplace_vector) | ||
| static_assert(false, "When this feature is implemented, update this to a Standard mode check."); | ||
|
|
||
| #include <inplace_vector> | ||
|
|
||
| #include "shared_test.hpp" | ||
|
|
||
| void test_inplace_vector() { | ||
| std::inplace_vector<int, 3> container{1, 2, 3}; | ||
| shared_test(container); | ||
| } | ||
|
|
||
| #else // ^^^ defined(__cpp_lib_inplace_vector) / !defined(__cpp_lib_inplace_vector) vvv | ||
|
|
||
| void test_inplace_vector() {} | ||
|
|
||
| #endif // ^^^ !defined(__cpp_lib_inplace_vector) ^^^ | ||
44 changes: 44 additions & 0 deletions
44
tests/std/tests/GH_005968_headers_provide_begin_end/test_iterator.cpp
StephanTLavavej marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <iterator> | ||
|
|
||
| #include "shared_test.hpp" | ||
|
|
||
| struct minimal_container { | ||
| static constexpr size_t magic_value = 3376942; | ||
|
|
||
| constexpr void begin() const {} | ||
| constexpr void end() const {} | ||
| constexpr void cbegin() const {} | ||
| constexpr void cend() const {} | ||
| constexpr void rbegin() const {} | ||
| constexpr void rend() const {} | ||
| constexpr void crbegin() const {} | ||
| constexpr void crend() const {} | ||
| constexpr size_t size() const { | ||
| return magic_value; | ||
| } | ||
| constexpr void empty() const {} | ||
| constexpr void data() const {} | ||
| }; | ||
|
|
||
|
|
||
| // Self-test the template machinery to check it properly detects member functions | ||
| namespace detail { | ||
| template <class C> | ||
| constexpr bool minimal_container_test(C& c) { | ||
| // when the CONDITIONALLY_CALL expression fails to detect the member, it has type void, i.e. clearly | ||
| // incompatible with operator==. If the detection mechanism did not work properly, this would fail to compile. | ||
| return CONDITIONALLY_CALL(c, size) == minimal_container::magic_value; | ||
| } | ||
|
|
||
| constexpr minimal_container min_cont; | ||
| static_assert(minimal_container_test(min_cont), "The member detection utility is broken"); | ||
| } // namespace detail | ||
|
|
||
| void test_iterator() { | ||
| minimal_container container; | ||
|
|
||
| shared_test(container); | ||
| } |
11 changes: 11 additions & 0 deletions
11
tests/std/tests/GH_005968_headers_provide_begin_end/test_list.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <list> | ||
|
|
||
| #include "shared_test.hpp" | ||
|
|
||
| void test_list() { | ||
| std::list<int> container{1, 2, 3}; | ||
| shared_test(container); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.