Boost :: multiprecision :: float128 and C ++ 11

I am trying to use boost::multiprecision::float128 (boost 1.55.0) in C ++ 11 (gcc 4.8.1), but get the following compiler error:

 /cm/shared/apps/boost/gcc/1.55.0/include/boost/multiprecision/float128.hpp: In static member function 'static std::numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ET> >::number_type std::numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ET> >::min()': /cm/shared/apps/boost/gcc/1.55.0/include/boost/multiprecision/float128.hpp:533:55: error: unable to find numeric literal operator 'operator"" Q' static number_type (min)() BOOST_NOEXCEPT { return 3.36210314311209350626267781732175260e-4932Q; } 

Can't I use boost::multiprecision::float128 in C ++ 11? Or how else can I make it work?

change

Just to clarify. This error is generated.

 #include <boost/multiprecision/float128.hpp> 

The compiler does not accept the statement

 return 3.36210314311209350626267781732175260e-4932Q; 

in particular, Q is misleading. I used compiler flags -std=c++11 -fabi-version=0 -march=native -mfpmath=sse

+6
source share
1 answer

It looks like a known issue . Try compiling with -fext-numeric-literals .

+14
source

Source: https://habr.com/ru/post/973975/


All Articles