You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
"template<int x> class bitset: B<((sizeof(int)) ? : 1)>\n"
"{};\n"
"\n"
"bitset<1> z;";
constchar expected[] = "struct B<4> ; "
"class bitset<1> ; "
"bitset<1> z ; "
"class bitset<1> : B<4> { } ; "
"struct B<4> { int a [ 4 ] ; } ;";
ASSERT_EQUALS(expected, tok(code));
}
voidtemplate26() {
// #2721
constchar code[] = "template<class T>\n"
"class A { public: T x; };\n"
"\n"
"template<class M>\n"
"class C: public A<char[M]> {};\n"
"\n"
"C<2> a;\n";
ASSERT_EQUALS("class A<char[2]> ; class C<2> ; C<2> a ; class C<2> : public A<char[2]> { } ; class A<char[2]> { public: char [ 2 ] x ; } ;", tok(code));
}
voidtemplate27() {
// #3350 - template inside macro call
constchar code[] = "X(template<class T> class Fred);";
ASSERT_THROW(tok(code), InternalError);
}
voidtemplate28() {
// #3226 - inner template
constchar code[] = "template<class A, class B> class Fred {};\n"