21 Aug
2021
21 Aug
'21
3:36 p.m.
As you may know assert does not play nicely with constexpr evaluation. But std::is_constant_evaluated/if consteval gives us a way to check when the execution happens. https://www.godbolt.org/z/dfder8h16 Does something like this exist in boost, and if not would that be a nice addition? I can not figure out how to support line numbers, filename in a same way assert does, since assert will obviously just take the line info from where it is called. P.S. smart_assert is just a first name I thought of, I am fine with any name as long as it is not some lengthy monstrosity like is_constant_evaluated