File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
libcxx/test/std/iterators/const.iterators Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1414#include < list>
1515#include < memory>
1616#include < ranges>
17+ #include < type_traits>
1718#include < vector>
1819#include " test_macros.h"
1920#include " test_iterators.h"
@@ -169,6 +170,11 @@ int main() {
169170
170171 ASSERT_SAME_TYPE (std::iter_reference_t <ConstIt>, const int &);
171172 ASSERT_SAME_TYPE (std::iter_rvalue_reference_t <ConstIt>, const int &&);
173+
174+ static_assert (std::is_constructible_v<ConstIt, It>);
175+ static_assert (std::is_convertible_v<It, ConstIt>);
176+ static_assert (std::is_constructible_v<ConstIt, const It&> == std::is_copy_constructible_v<It>);
177+ static_assert (std::is_constructible_v<const It&, ConstIt> == std::is_copy_constructible_v<It>);
172178 });
173179
174180 test_p2836r1 ();
You can’t perform that action at this time.
0 commit comments