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

David Stone <david at doublewise dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at doublewise dot net

--- Comment #1 from David Stone <david at doublewise dot net> ---
Here's a simpler test case

```
struct s {
        constexpr ~s() {
                if (this) {
                }
        }
};

constexpr bool f(s (&&)[1]) {
        return true;
}

static_assert(f(
        {s()}
));
```

Message:

```
<source>:12:16: error: non-constant condition for static assertion
   12 | static_assert(f(
      |               ~^
   13 |         {s()}
      |         ~~~~~   
   14 | ));
      | ~               
<source>:14:1: error: '(((s*)(&<anonymous>)) != 0)' is not a constant
expression
   14 | ));
      | ^
Compiler returned: 1
```

Reply via email to