https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115314
Bug ID: 115314 Summary: Type of the `auto` template parameter in a concept is not decayed when called as dependent name Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mateusz.pusz at gmail dot com Target Milestone: --- ``` struct X { static constexpr int val = 42; }; template<auto V> concept A = std::same_as<decltype(V), int>; template<typename V> concept B = A<V::val>; static_assert(A<X::val>); static_assert(B<X>); ``` The first static assert passes while the other one fails. Both cases work on clang and MSVC: https://godbolt.org/z/v5z6bee7c Affects all gcc versions from 12 to 15.