Closed
Description
This code:
template<typename Param>
concept TrivialConcept =
requires(Param param) {
(void)param;
};
template <typename T>
struct Base {
class InnerClass;
};
template <typename T>
class Base<T>::InnerClass {
template <typename Param>
requires TrivialConcept<Param>
int func(Param param) const;
};
template <typename T>
template <typename Param>
requires TrivialConcept<Param>
int Base<T>::InnerClass::func(Param param) const {
return 0;
}
Works on clang-16 and gcc trunk, fails on clang trunk. I believe it should be allowed per C++20 and above.
Bisecting points to 6db007a as the likely culprit (this got reverted a couple of times previously for similar issues; this one slipped past).
Tagging a few interested people from the diff and from #63782, which points to the same commit:
@alexander-shaposhnikov @erichkeane @shafik