r/cpp • #define private public • Feb 24 '26

P4019R0: constant_assert (Jonas Persson)

https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2026/p4019r0.pdf
23 Upvotes

25 comments sorted by

View all comments

Show parent comment

3

u/cd_fr91400 Feb 25 '26

The extremely trivial cases you mention do correspond to useful cases where static_assert cannot be used.

So it still makes it interesting, despite that in principle, yes, it is not guaranteed by the standard.