https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110348
--- Comment #16 from corentinjabot at gmail dot com --- (In reply to Jakub Jelinek from comment #15) > Now implemented for GCC 14. Thanks for working on this > As I wrote already in the PR, in addition to looking through the paper > I looked at the clang++ testcase for this feature implemented there from > paper's author and on godbolt played with various parts of the testcase > coverage below, and there are some differences between what the patch > implements and what clang++ implements. > > The first is that clang++ diagnoses if M.size () or M.data () methods > are present, but aren't constexpr; while the paper introduction talks > about > that, the standard wording changes don't seem to require that, all they > say > is that those methods need to exist (assuming accessible and the like) > and be implicitly convertible to std::size_t or const char *, but rest is > only if the static assertion fails. If there is intent to change that > wording, the question is how far to go, e.g. while M.size () could be > constexpr, they could e.g. return some class object which wouldn't have > constexpr conversion operator to size_t/const char * and tons of other > reasons why the constant evaluation could fail. Without actually > evaluating > it I don't see how we could guarantee anything for non-failed > static_assert. Clang always evaluate if i recall, the error is actually a warning that defaults to error. > > The second difference is that > static_assert (false, "foo"_myd); > in the testcase is normal failed static assertion and > static_assert (true, "foo"_myd); > would be accepted, while clang++ rejects it. IMHO > "foo"_myd doesn't match the syntactic requirements of unevaluated-string > as mentioned in http://eel.is/c++draft/dcl.pre#10 , and because > a constexpr udlit operator can return something which is valid, it > shouldn't > be rejected just in case. Seems like a bug in Clang indeed, I will investigate. > Last is clang++ ICEs on non-static data members size/data. You have a reproducer for that ?