* [committed] libstdc++: Fix test that uses C++17 variable template in C++14
@ 2022-11-11 5:30 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2022-11-11 5:30 UTC (permalink / raw)
To: libstdc++, gcc-patches
Tested x86_64-linux. Pushed to trunk.
-- >8 --
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.
---
.../experimental/propagate_const/observers/107525.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/testsuite/experimental/propagate_const/observers/107525.cc b/libstdc++-v3/testsuite/experimental/propagate_const/observers/107525.cc
index e7ecff73c1a..37e970c3af4 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<const X, const int*>,
+ static_assert(!std::is_convertible<const X, const int*>::value,
"Cannot convert const X to const int*");
// So should not be able to convert const propagate_const<X> to const int*.
- static_assert(!std::is_convertible_v<const propagate_const<X>, const int*>,
+ static_assert(!std::is_convertible<const propagate_const<X>, const int*>::value,
"So should not be able to convert const propagate_const<X> to "
"const int* (although this is not what LFTSv3 says)");
}
--
2.38.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-11 5:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 5:30 [committed] libstdc++: Fix test that uses C++17 variable template in C++14 Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).