Subject: [Boost-bugs] [Boost C++ Libraries] #13360: std::numeric_limits<multiprecision::float128> methods fail to compile in C++11 mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-12-24 12:37:40
#13360: std::numeric_limits<multiprecision::float128> methods fail to compile in
C++11 mode
------------------------------+----------------------------
Reporter: b7.10110111@⦠| Owner: John Maddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: multiprecision
Version: Boost 1.66.0 | Severity: Regression
Keywords: |
------------------------------+----------------------------
The following code compiles fine in C++03 mode, but fails in C++11 mode.
This happens in boost 1.66.0, but didn't happen in 1.63.0.
{{{
#include <boost/multiprecision/float128.hpp>
int main()
{
std::numeric_limits<boost::multiprecision::float128>::min();
}
}}}
Similar problem with some other methods â those which return without
explicit construction of {{{number_type}}}.
I'm compiling with g++ using the following command line:
{{{
g++ -std=c++11 boost-test.cpp -o boost-test -fext-numeric-literals
-lquadmath
}}}
The compiler prints the following error:
{{{
In file included from boost-test.cpp:1:0:
/usr/include/boost/multiprecision/float128.hpp: In instantiation of
âstatic
std::numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
ExpressionTemplates> >::number_type
std::numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
ExpressionTemplates> >::min() [with
boost::multiprecision::expression_template_option ExpressionTemplates =
(boost::multiprecision::expression_template_option)0u;
std::numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
ExpressionTemplates> >::number_type =
boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
(boost::multiprecision::expression_template_option)0u>]â:
boost-test.cpp:4:59: required from here
/usr/include/boost/multiprecision/float128.hpp:645:55: error: could not
convert â3.3621031431120935062626778173217526e-4932â from â__float128â to
âstd::numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
(boost::multiprecision::expression_template_option)0u> >::number_type {aka
boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
(boost::multiprecision::expression_template_option)0u>}â
static number_type (min)() BOOST_NOEXCEPT { return 3
.36210314311209350626267781732175260e-4932Q; }
^
}}}
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13360> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-12-24 12:43:58 UTC