I wonder why std::launder
is a constexpr
function. Is there any use case where it can be used at compile time?
Because there is absolutely no reason for it not to be. It is really just the identity function with some special additional meaning to the compiler. It cannot fail, it must not have side effects. It costs nothing to make it constexpr, and you never know when that may come in useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With