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

Waffl3x <waffl3x at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |waffl3x at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Waffl3x <waffl3x at gcc dot gnu.org> ---
The conditional operator does not behave like if constexpr.

https://godbolt.org/z/hfqzh7a3W
```
template<typename T>
bool process_data(T obj) {
    return requires { obj.nested_value; } ? obj.nested_value > 0 : true;
}

struct EmptyStruct {};

int main() {
    EmptyStruct e;
    process_data(e); // Correctly fails.
}
```

Reply via email to