// { dg-do compile } // { dg-options "-std=gnu++0x" } template struct A3 { typedef _Tp value_type; typedef A3 type; static constexpr value_type value = v; constexpr operator value_type() { return value; } }; // Partial specialization. template struct A3<_Tp*, v> { typedef _Tp* value_type; typedef A3 type; static constexpr value_type value = v; constexpr operator value_type() { return value; } }; // Explicit specialization. template<> struct A3 { typedef unsigned short value_type; typedef A3 type; static constexpr value_type value = 0; constexpr operator value_type() { return value; } }; // Explicitly instantiate. template struct A3; // Extern explicitly instantiate. extern template struct A3; // Use. A3 a31; A3 a32; // { dg-warning "overflow" }