]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Enable __gnu_test::test_container constructor for C++98
authorJonathan Wakely <jwakely@redhat.com>
Mon, 14 Apr 2025 16:16:46 +0000 (17:16 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 15 Apr 2025 08:24:44 +0000 (09:24 +0100)
The only reason this constructor wasn't defined for C++98 is that it
uses constructor delegation, but that isn't necessary.

libstdc++-v3/ChangeLog:

* testsuite/util/testsuite_iterators.h (test_container): Define
array constructor for C++98 as well.

libstdc++-v3/testsuite/util/testsuite_iterators.h

index 0df6dcc5af50457b9a217893657984ff08c4759b..20539ecaca61fd3836fe5d24daa36ffcad8c0449 100644 (file)
@@ -610,12 +610,10 @@ namespace __gnu_test
     test_container(T* _first, T* _last) : bounds(_first, _last)
     { }
 
-#if __cplusplus >= 201103L
     template<std::size_t N>
       explicit
-      test_container(T (&arr)[N]) : test_container(arr, arr+N)
+      test_container(T (&arr)[N]) : bounds(arr, arr+N)
       { }
-#endif
 
     ItType<T>
     it(int pos)