// RUN: %clang_cc1 -fsyntax-only -verify -Wc++11-compat %s
// A declaration of a function template shall be in scope at the point of the
// explicit instantiation of the function template.
void ;
; // okay
void
// A definition of the class or class template containing a member function
// template shall be in scope at the point of the explicit instantiation of
// the member function template.
; // expected-note {{forward declaration}}
; // expected-note 5{{declared here}}
; // expected-error {{incomplete type}}
; // expected-error {{implicit instantiation of undefined template}}
// A definition of a class template or class member template shall be in scope
// at the point of the explicit instantiation of the class template or class
// member template.
; // expected-error{{explicit instantiation of undefined template}}
;
; // expected-error{{explicit instantiation of undefined template}}
// A definition of a class template shall be in scope at the point of an
// explicit instantiation of a member function or a static data member of the
// class template.
; // expected-error {{undefined template}}
; // expected-error {{undefined template}}
; // expected-error {{undefined template}}
// A definition of a member class of a class template shall be in scope at the
// point of an explicit instantiation of the member class.
; // expected-error{{undefined member}}
// If the declaration of the explicit instantiation names an implicitly-declared
// special member function (Clause 12), the program is ill-formed.
; // expected-error{{not an instantiation}}
; // expected-error{{not an instantiation}}
; // expected-error{{not an instantiation}}
; // expected-error{{not an instantiation}}
// A definition of a class template is sufficient to explicitly
// instantiate a member of the class template which itself is not yet defined.