Re:C++26: Pack Indexing
by Maxatar on Friday January 24, 2025 @02:53PM
(#42816397)
My understanding is that all of the functions found in the C compatibility headers that the C++ standard defines can not be made constexpr. sqrt is among them, as are a lot of the math functions.
[ Parent
| on HN ]
The compatibility can be solved with macros to toggle it on or off depending on how you're building. C++26 has constexpr sqrt.
There is a paper suggesting to replace all macro based code, due to way modules work.
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p26...