Hacker News new | ask | show | jobs
by soulbadguy 1168 days ago
>constexpr has to checked for leaks and UB so as long as there is coverage at compile-time

Source ?I am not sure constexpr give any garanty regarding UB and/or leaks

1 comments

Constexpr at compile times gives that guarantee, not constexpr in general. Hence static assert to force comptime evaluation
> Constexpr at compile times gives that guarantee

Can you point to a source for that ? I am not trying to be pendantic, but genuilly curious