On 10/08/2022 18:09, Gero Peterhoff via Boost wrote:
Hello, I would like to add several missing math functions in boost or specialize/overload existing ones for more types. Which functions? These should be constexpr if possible.
My problems with the concrete implementations are: - Which C++ standard to use C++11/14/17/20/23 ? - Should these be implemented in ccmath and math ? a) ccmath requires C++17 (eg "if constexpr"), so it is not possible to simply call the ccmath version in math, since math requires C++11.
Maybe, but we have announced a move to C++14, and in any case new additions can use whatever std version they require, as long as that requirement is documented and actually needed (ie not just using cool new features "just because"). I do note however, that the constexpr function may not be as efficient *at runtime* as they could be due to the need not to use compiler intrinsics / std lib functions and such (so they should probably be marked as consteval in C++20). So yes, possibly two versions. But it depends what the functions are? Best, John.
b) On the other hand, the math functions are already included in the standard (since C++11), so it wouldn't be necessary to continue to provide them (especially since they are not constexpr).
Where and how exactly and with which C++ standard can I add the functions ?
thx Gero
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost