llvm-project/clang/test/SemaTemplate/member-specialization.cpp
Richard Smith 6e67142142 Fix crash if an in-class explicit function specialization has explicit
template arguments referring to template paramaeters.

llvm-svn: 348313
2018-12-04 22:26:32 +00:00

12 lines
272 B
C++

// RUN: %clang_cc1 -std=c++17 -verify %s
// expected-no-diagnostics
template<typename T, typename U> struct X {
template<typename V> const V &as() { return V::error; }
template<> const U &as<U>() { return u; }
U u;
};
int f(X<int, int> x) {
return x.as<int>();
}