From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 317553857815; Thu, 20 May 2021 20:49:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 317553857815 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-953] libstdc++: Do not use static_assert without message in C++11 X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 6b42b5a8a207de5e021a2916281f46bcd60b20d2 X-Git-Newrev: 64ba45c76e831914764b70207d69a06f800b43a4 Message-Id: <20210520204921.317553857815@sourceware.org> Date: Thu, 20 May 2021 20:49:21 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2021 20:49:21 -0000 https://gcc.gnu.org/g:64ba45c76e831914764b70207d69a06f800b43a4 commit r12-953-g64ba45c76e831914764b70207d69a06f800b43a4 Author: Jonathan Wakely 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. 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));