public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-8571] libstdc++: Do not use static_assert without message in C++11 Date: Mon, 14 Jun 2021 21:49:34 +0000 (GMT) [thread overview] Message-ID: <20210614214934.672143850431@sourceware.org> (raw) https://gcc.gnu.org/g:4f54fb71613724814938d6067a7ec997ea528c9c commit r11-8571-g4f54fb71613724814938d6067a7ec997ea528c9c Author: Jonathan Wakely <jwakely@redhat.com> Date: Thu May 20 21:12:15 2021 +0100 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. (cherry picked from commit 64ba45c76e831914764b70207d69a06f800b43a4) Diff: --- libstdc++-v3/include/bits/random.tcc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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));
reply other threads:[~2021-06-14 21:49 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210614214934.672143850431@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).