forked from OSchip/llvm-project
Test instantiation of static data members that live within nested
member templates. llvm-svn: 80396
This commit is contained in:
parent
5c58093178
commit
11395b66c6
|
@ -808,9 +808,6 @@ Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc,
|
|||
const CXXScopeSpec &SS,
|
||||
TemplateParameterList **ParamLists,
|
||||
unsigned NumParamLists) {
|
||||
// FIXME: This routine will need a lot more testing once we have support for
|
||||
// member templates.
|
||||
|
||||
// Find the template-ids that occur within the nested-name-specifier. These
|
||||
// template-ids will match up with the template parameter lists.
|
||||
llvm::SmallVector<const TemplateSpecializationType *, 4>
|
||||
|
|
|
@ -63,8 +63,14 @@ template<typename U>
|
|||
struct X1<T>::Inner4 {
|
||||
template<typename V>
|
||||
V f2(T t, U u, V);
|
||||
|
||||
static U value;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
template<typename U>
|
||||
U X1<T>::Inner4<U>::value; // expected-error{{reference variable}}
|
||||
|
||||
template<typename T>
|
||||
template<typename U>
|
||||
template<typename V>
|
||||
|
@ -93,4 +99,7 @@ void test_X1(int *ip, int i, double *dp) {
|
|||
|
||||
X1<int*>::Inner4<int> id4;
|
||||
id4.f2(ip, i, dp); // expected-note{{instantiation}}
|
||||
|
||||
X1<int*>::Inner4<int>::value = 17;
|
||||
i = X1<int*>::Inner4<int&>::value; // expected-note{{instantiation}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue