r272653 - in /trunk/libstdc++-v3: ChangeLog inc...

redi@gcc.gnu.org redi@gcc.gnu.org
Tue Jun 25 13:18:00 GMT 2019


Author: redi
Date: Tue Jun 25 13:18:36 2019
New Revision: 272653

URL: https://gcc.gnu.org/viewcvs?rev=272653&root=gcc&view=rev
Log:
Fix non-portable use of std::abs(double) in constexpr function

Although libstdc++ adds 'constexpr' to its std::abs(floating-point)
overloads (as a non-conforming extension), those overloads are not used
if the target libc provides them, which is the case on Solaris.

The fix is to avoid std::abs and simply apply the negation when needed.

	* include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
	function.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/numeric



More information about the Libstdc++-cvs mailing list