boost::math::tools::promote_args not works with C++23 FP-types
Hi,
promote_args from
On Sun, Feb 19, 2023 at 06:48, Gero Peterhoff via Boost
Hi, promote_args from
not works with new/extended C++23 FP-types https://godbolt.org/z/13fq8a3d7 The problem might be the outdated "manual variadic" implementation for C++03. Well, according to the documentation (https://www.boost.org/doc/libs/1_81_0), boost::math requires C++11 anyway; with a switch to C++11 it also works (std::common_type).
This issue also affects some implementations in boost::math::policies.
PS: We have (at least) 3 different definitions for the *same* boost::float128(_type/_t) type 1)
: boost::float128_type 2) / : BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE/float128_t 3) : BOOST_MATH_FLOAT128_TYPE :-( thx Gero
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Gero, Assuming GCC follows its standard release cadence we should have 13 in the April timeframe to test with fixed width floating point types. We are aware of the potential friction these bring. The fixed width floating point types are explicitly not allowed to be typedefs of the existing floating point types so trivial solutions like common type will likely fail. The promotion rules with these types are also much more complex so it’ll take some time to work out the bugs. Matt
On 19/02/2023 14:48, Gero Peterhoff via Boost wrote:
Hi, promote_args from
not works with new/extended C++23 FP-types https://godbolt.org/z/13fq8a3d7 The problem might be the outdated "manual variadic" implementation for C++03. Well, according to the documentation (https://www.boost.org/doc/libs/1_81_0), boost::math requires C++11 anyway; with a switch to C++11 it also works (std::common_type).
I'm not surprised by this, and we will probably need to fix Config first and also have a working (ie released) C++23 compiler too. The problem line is here: https://github.com/boostorg/math/blob/1c5194f3c36826db4e18ba52e7e601bae002c3... where we assume that std::is_floating_point implies one of the 3 types we know about. John.
participants (3)
-
Gero Peterhoff
-
John Maddock
-
Matt Borland