https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104512

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://github.com/llvm/llv
                   |                            |m-project/issues/57627,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=106485

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
struct B {
    bool b = true;
    int i;
    consteval B() {}
};
static_assert( []() consteval{ return B{}.b; }() );
```
Works for GCC. I think this is a bug in clang ...
static_assert is an immediate function context so B{} needs to be a evaluated
and such.
See https://github.com/llvm/llvm-project/issues/57627 for the clang bug.

See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106485#c2 .

Reply via email to