[PATCH] D154290: [Clang] Implement P2741R3 - user-generated static_assert messages

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 10 01:26:13 PDT 2023


cor3ntin added a comment.

> but right now I'm confused by the distinction… Why don't always evaluate the message?

2 reasons

- it would be a rather important breaking change for compiler who don't always use utf-8 at their literal encoding
- we do not want to limit static_assert to the capabilities of the literal encoding.

That oddity (there is no denying it's odd), was discussed by the C++ committee and we decided this was fine.
However we did also consider supporting `char8_t*` in data, which would allow users to use evaluated utf-8
strings. 
We did decide against doing it right now but i suspect it will happen at some point.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154290/new/

https://reviews.llvm.org/D154290



More information about the cfe-commits mailing list