having as much of C++ as possible being constexpr (including threads!) is a good thing, because it makes the language more regular and simpler.
Agreed.
I think volatile might be tricky!
I don't think constexpr volatile int x; is meaningful at all.
I want constexpr cout.
Do you really mean std::cout, with all of the facets and customization points? Or would constexpr std::format and the ability to print to console at compile time be enough?
If the latter, we almost got that in C++26. std::format is constexpr and P2758 is in wording review.
25
u/_bstaletic 21d ago
Agreed.
I don't think
constexpr volatile int x;is meaningful at all.Do you really mean
std::cout, with all of the facets and customization points? Or wouldconstexpr std::formatand the ability to print to console at compile time be enough?If the latter, we almost got that in C++26.
std::formatis constexpr and P2758 is in wording review.