https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123112
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Mateusz Pusz from comment #0)
> clang works OK here.
N.B. Clang trunk rejects this now:
<source>:14:60: error: member reference base type 'quantity_character' is not a
structure or union
14 | (std::same_as<decltype(V), wrapper> && IsOfCharacter<T, V.character>)
||
| ~^~~~~~~~~~
<source>:18:29: note: while substituting into concept arguments here;
substitution failures not allowed in concept arguments
18 | requires RepresentationOf<T, quantity_character::real_scalar>
| ^
<source>:25:3: note: while checking constraint satisfaction for template
'foo<wrapper>' required here
25 | foo(wrapper{}); // doesn't work :-(
| ^~~
<source>:25:3: note: while substituting deduced template arguments into
function template 'foo' [with T = wrapper]
<source>:25:3: error: no matching function for call to 'foo'
25 | foo(wrapper{}); // doesn't work :-(
| ^~~
<source>:19:6: note: candidate template ignored: failed template argument
deduction
19 | void foo(T)
| ^
2 errors generated.