Co-authored-by: Stefan van Kessel <stefan.vankessel@muehlbauer.de>
This commit is contained in:
parent
2bf7294d5b
commit
5770110377
|
@ -3466,7 +3466,6 @@ void TemplateSimplifier::fixForwardDeclaredDefaultArgumentValues()
|
|||
}
|
||||
if (end)
|
||||
TokenList::copyTokens(const_cast<Token *>(params2[k]), params1[k]->next(), end->previous());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4729,6 +4729,26 @@ private:
|
|||
|
||||
ASSERT_EQUALS(exp, tok(code));
|
||||
}
|
||||
{ // #10432
|
||||
const char code[] = "template<int A = 128, class T = wchar_t>\n"
|
||||
"class Foo;\n"
|
||||
"template<int A, class T>\n"
|
||||
"class Foo\n"
|
||||
"{\n"
|
||||
"public:\n"
|
||||
" T operator[](int Index) const;\n"
|
||||
"};\n"
|
||||
"template<int A, class T>\n"
|
||||
"T Foo<A, T>::operator[](int Index) const\n"
|
||||
"{\n"
|
||||
" return T{};\n"
|
||||
"}\n"
|
||||
"Foo<> f;";
|
||||
const char exp[] = "class Foo<128,wchar_t> ; Foo<128,wchar_t> f ; "
|
||||
"class Foo<128,wchar_t> { public: wchar_t operator[] ( int Index ) const ; } ; "
|
||||
"wchar_t Foo<128,wchar_t> :: operator[] ( int Index ) const { return wchar_t { } ; }";
|
||||
ASSERT_EQUALS(exp, tok(code));
|
||||
}
|
||||
}
|
||||
|
||||
void template_default_type() {
|
||||
|
|
Loading…
Reference in New Issue