Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 2019 17:45:06 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r354626 - in stable: 11/contrib/libc++/include 12/contrib/libc++/include
Message-ID:  <201911111745.xABHj6cR005327@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Mon Nov 11 17:45:06 2019
New Revision: 354626
URL: https://svnweb.freebsd.org/changeset/base/354626

Log:
  MFC r354625:
  
  Merge commit 371ea70bb from llvm git (by Louis Dionne):
  
    [libc++] Harden usage of static_assert against C++03
  
    In C++03, we emulate static_assert with a macro, and we must
    parenthesize multiple arguments.
  
    llvm-svn: 373328
  
  This is a follow-up to r354460, which causes errors for pre-C++11
  programs using <cmath>, similar to:
  
  /usr/include/c++/v1/cmath:622:68: error: too many arguments provided to
  function-like macro invocation
  
  Reported by:	antoine

Modified:
  stable/11/contrib/libc++/include/cmath
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/libc++/include/cmath
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/libc++/include/cmath
==============================================================================
--- stable/11/contrib/libc++/include/cmath	Mon Nov 11 17:41:56 2019	(r354625)
+++ stable/11/contrib/libc++/include/cmath	Mon Nov 11 17:45:06 2019	(r354626)
@@ -619,8 +619,8 @@ _LIBCPP_CONSTEXPR _IntT __max_representable_int_for_fl
   static_assert(is_floating_point<_FloatT>::value, "must be a floating point type");
   static_assert(is_integral<_IntT>::value, "must be an integral type");
   static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
-  static_assert(is_same<_FloatT, float>::value || is_same<_FloatT, double>::value
-               || is_same<_FloatT,long double>::value, "unsupported floating point type");
+  static_assert((is_same<_FloatT, float>::value || is_same<_FloatT, double>::value
+               || is_same<_FloatT,long double>::value), "unsupported floating point type");
   return _FloatBigger ? numeric_limits<_IntT>::max() :  (numeric_limits<_IntT>::max() >> _Bits << _Bits);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911111745.xABHj6cR005327>