template<bool r>
struct S{
template<class U = bool, class = std::enable_if_t<U(r)>>
void show(){}
};
int main(){
S<false> s; // #2
}
#1 cause the program ill-formed but #2 does not. However, [temp.inst] p3 merely has a brief phrase:
The implicit instantiation of a class template specialization causes
the implicit instantiation of the declarations, but not of the definitions, of the non-deleted class member functions, member classes, scoped member enumerations, static data members, member templates, and friends; and
the implicit instantiation of the definitions of deleted member functions, unscoped member enumerations, and member anonymous unions.
There is no wording in the standard to specify how the further syntax checking would perform for an instantiated declaration, after all, the instantiated declaration is not a source-level code.
Full name of submitter (unless configured in github; will be published with the issue): Jim X
Consider the contrasting examples:
#1
cause the program ill-formed but#2
does not. However, [temp.inst] p3 merely has a brief phrase:There is no wording in the standard to specify how the further syntax checking would perform for an instantiated declaration, after all, the instantiated declaration is not a source-level code.