diff options
Diffstat (limited to 'test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp')
-rw-r--r-- | test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp index 5e0301b657b9..7435da1661ad 100644 --- a/test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp +++ b/test/std/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <algorithm> // template<class T, class Compare> @@ -17,9 +19,10 @@ #include <functional> #include <cassert> +#include "test_macros.h" + int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS int i = std::min({2, 3, 1}, std::greater<int>()); assert(i == 3); i = std::min({2, 1, 3}, std::greater<int>()); @@ -32,12 +35,11 @@ int main() assert(i == 3); i = std::min({1, 3, 2}, std::greater<int>()); assert(i == 3); -#if _LIBCPP_STD_VER > 11 +#if TEST_STD_VER >= 14 { static_assert(std::min({1, 3, 2}, std::greater<int>()) == 3, ""); static_assert(std::min({2, 1, 3}, std::greater<int>()) == 3, ""); static_assert(std::min({3, 2, 1}, std::greater<int>()) == 3, ""); } #endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } |