]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 25_algorithms / find_end / constexpr.cc
index 88d6cc7c0d139dd6f77fbb41ff42a9816bb7098a..5315cb7fad9e0d9b00876d9b68c227a925fb3211 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Free Software Foundation, Inc.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
 #include <algorithm>
 #include <array>
 
-#ifndef __cpp_lib_constexpr_algorithms
-# error "Feature-test macro for constexpr algorithms missing"
-#elif __cpp_lib_constexpr_algorithms < 201711L
-# error "Feature-test macro for constexpr algorithms has wrong value"
-#endif
-
 constexpr bool
 test()
 {
-  constexpr std::array<int, 12> ca0{{0, 1, 2, 3, 4, 5,  6, 7, 8,  9, 10, 11}};
+  constexpr std::array<int, 12> ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}};
   constexpr std::array<int, 3> cam{{4, 5, 6}};
   constexpr std::array<int, 3> camm{{-4, -5, -6}};
 
@@ -41,7 +35,7 @@ test()
                                  camm.begin(), camm.end(),
                                  [](int i, int j){ return i + 1 == -j; });
 
-  return true;
+  return outf == (ca0.begin() + 4) && outg == (ca0.begin() + 3);
 }
 
 static_assert(test());