// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++14 %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++1z %s
// RUN: %clang_cc1 -fsyntax-only -verify %s
// C++0x [temp.arg.nontype] p5:
// The following conversions are performed on each expression used as
// a non-type template-argument. If a non-type template-argument cannot be
// converted to the type of the corresponding template-parameter then the
// program is ill-formed.
// -- for a non-type template-parameter of integral or enumeration type,
// integral promotions (4.5) and integral conversions (4.7) are applied.
// -- for a non-type template-parameter of type pointer to object,
// qualification conversions (4.4) and the array-to-pointer conversion
// (4.2) are applied; if the template-argument is of type
// std::nullptr_t, the null pointer conversion (4.10) is applied.
// -- For a non-type template-parameter of type reference to object, no
// conversions apply. The type referred to by the reference may be more
// cv-qualified than the (otherwise identical) type of the
// template-argument. The template-parameter is bound directly to the
// template-argument, which shall be an lvalue.
// -- For a non-type template-parameter of type pointer to function, the
// function-to-pointer conversion (4.3) is applied; if the
// template-argument is of type std::nullptr_t, the null pointer
// conversion (4.10) is applied. If the template-argument represents
// a set of overloaded functions (or a pointer to such), the matching
// function is selected from the set (13.4).
// -- For a non-type template-parameter of type reference to function, no
// conversions apply. If the template-argument represents a set of
// overloaded functions, the matching function is selected from the set
// (13.4).
// -- For a non-type template-parameter of type pointer to member function,
// if the template-argument is of type std::nullptr_t, the null member
// pointer conversion (4.11) is applied; otherwise, no conversions
// apply. If the template-argument represents a set of overloaded member
// functions, the matching member function is selected from the set
// (13.4).
// -- For a non-type template-parameter of type pointer to data member,
// qualification conversions (4.4) are applied; if the template-argument
// is of type std::nullptr_t, the null member pointer conversion (4.11)
// is applied.