struct A;
template class S, class T> struct A, 1> {
typedef char type;
};
template struct B {};
A, 1>::type x;
}
namespace PR14281_part2 {
typedef decltype(nullptr) nullptr_t;
template struct A;
template struct A;
template class S, class T> struct A, nullptr> {
typedef char type;
};
template struct B {};
A, nullptr>::type x;
}
namespace PR14281_part3 {
extern int some_decl;
template struct A;
template struct A;
template class S, class T> struct A, &some_decl> {
typedef char type;
};
template struct B {};
A, &some_decl>::type x;
}
namespace var_template_partial_spec_incomplete {
template int n;
template int n; // expected-error +{{}} expected-note {{}}
int k = n;
}
namespace deduceFunctionSpecializationForInvalidOutOfLineFunction {
template
struct SourceSelectionRequirement {
template
OutputT evaluateSelectionRequirement(InputT &&Value) {
}
};
template
OutputT SourceSelectionRequirement::
evaluateSelectionRequirement(InputT &&Value) { // expected-error {{cannot specialize a member of an unspecialized template}}
return Value;
}
}
namespace PR51872_part1 {
template class T1 { template T1(); };
// expected-error@-1 {{non-type template parameter has incomplete type 'struct U1'}}
// expected-note@-2 {{forward declaration of 'PR51872_part1::U1'}}
T1 t1 = 0;
// expected-error@-1 {{no viable constructor or deduction guide for deduction of template arguments of 'T1'}}
// expected-note@-6 {{candidate template ignored: could not match 'T1<>' against 'int'}}
}