You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compilation problem with boost/math/constants/constants.hpp #209
Error message:
/usr/include/boost/math/constants/constants.hpp:300:3: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
/usr/include/boost/math/constants/constants.hpp: In static member function 'static constexpr T boost::math::constants::detail::constant_root_two_pi<T>::get(const mpl_::int_<5>&)':
/usr/include/boost/math/constants/constants.hpp:301:3: error: unable to find numeric literal operator 'operator""Q'
BOOST_DEFINE_MATH_CONSTANT(root_two_pi, 2.506628274631000502415765284811045253e+00, "2.50662827463100050241576528481104525300698674060993831662992357634229365460784197494659583837805726611600997267e+00")
^
It can be solved by adding -DBOOST_MATH_DISABLE_FLOAT128 to the C++ flags.
Activity
junhyeokahn commentedon Feb 14, 2019
@eliseemond Could you tell me how can I add this flag in
CMakeLists.txt?eliseemond commentedon Feb 15, 2019
@junhyeokahn Hi, you can add this in CMakeLists.txt:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_MATH_DISABLE_FLOAT128")You could check the Boost version:
KrisThielemans commentedon Feb 15, 2019
@eliseemond feel like creating a PR?
eliseemond commentedon Feb 15, 2019
@KrisThielemans The problem was solved and merged via PR in 5710d43, but we could move the fix to CMakeLists. Otherwise, close the github issue.
KrisThielemans commentedon Sep 13, 2026
Seems obsolete.