https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123112
Bug ID: 123112
Summary: Issue with short-circuiting in concept evaluation
Product: gcc
Version: 15.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mateusz.pusz at gmail dot com
Target Milestone: ---
See the following code:
```cpp
template<typename T, auto V>
concept RepresentationOf =
(std::same_as<decltype(V), wrapper> && IsOfCharacter<T, V.character>) ||
(std::same_as<quantity_character, decltype(V)> && IsOfCharacter<T, V>);
```
If the `decltype(V)` is not a `wrapper`, then the rest of the condition should
not be evaluated, but it is. See this link: https://godbolt.org/z/6W8nvEPfP.
clang works OK here.