From: Jonathan Wakely Date: Thu, 10 Nov 2022 14:04:07 +0000 (+0000) Subject: libstdc++: Fix test that uses C++17 variable template in C++14 X-Git-Tag: basepoints/gcc-14~3318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56d2222c58be78d5125bd8a1069364f0f4b2baa2;p=thirdparty%2Fgcc.git libstdc++: Fix test that uses C++17 variable template in C++14 This test fails if run with -std=gnu++14 because it should be using is_convertible instead of is_convertible_v. libstdc++-v3/ChangeLog: * testsuite/experimental/propagate_const/observers/107525.cc: Use type trait instead of C++17 variable template. --- diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/observers/107525.cc b/libstdc++-v3/testsuite/experimental/propagate_const/observers/107525.cc index e7ecff73c1ae..37e970c3af45 100644 --- a/libstdc++-v3/testsuite/experimental/propagate_const/observers/107525.cc +++ b/libstdc++-v3/testsuite/experimental/propagate_const/observers/107525.cc @@ -32,10 +32,10 @@ test_const_conversion() operator const int*() const = delete; }; - static_assert(!std::is_convertible_v, + static_assert(!std::is_convertible::value, "Cannot convert const X to const int*"); // So should not be able to convert const propagate_const to const int*. - static_assert(!std::is_convertible_v, const int*>, + static_assert(!std::is_convertible, const int*>::value, "So should not be able to convert const propagate_const to " "const int* (although this is not what LFTSv3 says)"); }