diff --git a/include/boost/decimal/detail/attributes.hpp b/include/boost/decimal/detail/attributes.hpp index dff9e84f8..dc2b4bcec 100644 --- a/include/boost/decimal/detail/attributes.hpp +++ b/include/boost/decimal/detail/attributes.hpp @@ -89,8 +89,9 @@ BOOST_DECIMAL_CUDA_CONSTEXPR auto max_significand_v() noexcept template >= 128, bool> = true> BOOST_DECIMAL_CUDA_CONSTEXPR auto max_significand_v() noexcept { - // 34x 9s - return BOOST_DECIMAL_DETAIL_INT128_UINT128_C(9999999999999999999999999999999999); + // 34x 9s, constexpr so that a call at run time does not parse the literal + constexpr auto value {BOOST_DECIMAL_DETAIL_INT128_UINT128_C(9999999999999999999999999999999999)}; + return value; } template