* [committed] libstdc++: Do not use static_assert without message in C++11
@ 2021-05-20 20:49 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-05-20 20:49 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 187 bytes --]
libstdc++-v3/ChangeLog:
* include/bits/random.tcc (__representable_as_double)
(__p1_representable_as_double): Add "" to static asserts.
Tested powerpc64le-linux. Committed to trunk.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1607 bytes --]
commit 64ba45c76e831914764b70207d69a06f800b43a4
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu May 20 21:12:15 2021
libstdc++: Do not use static_assert without message in C++11
libstdc++-v3/ChangeLog:
* include/bits/random.tcc (__representable_as_double)
(__p1_representable_as_double): Add "" to static asserts.
diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc
index bf4397045ef..1357e181874 100644
--- a/libstdc++-v3/include/bits/random.tcc
+++ b/libstdc++-v3/include/bits/random.tcc
@@ -811,8 +811,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr bool
__representable_as_double(_Tp __x) noexcept
{
- static_assert(numeric_limits<_Tp>::is_integer);
- static_assert(!numeric_limits<_Tp>::is_signed);
+ static_assert(numeric_limits<_Tp>::is_integer, "");
+ static_assert(!numeric_limits<_Tp>::is_signed, "");
// All integers <= 2^53 are representable.
return (__x <= (1ull << __DBL_MANT_DIG__))
// Between 2^53 and 2^54 only even numbers are representable.
@@ -824,8 +824,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr bool
__p1_representable_as_double(_Tp __x) noexcept
{
- static_assert(numeric_limits<_Tp>::is_integer);
- static_assert(!numeric_limits<_Tp>::is_signed);
+ static_assert(numeric_limits<_Tp>::is_integer, "");
+ static_assert(!numeric_limits<_Tp>::is_signed, "");
return numeric_limits<_Tp>::digits < __DBL_MANT_DIG__
|| (bool(__x + 1u) // return false if x+1 wraps around to zero
&& __detail::__representable_as_double(__x + 1u));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-20 20:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 20:49 [committed] libstdc++: Do not use static_assert without message in C++11 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).