2 // { dg-options "-std=gnu++0x" }
4 template<typename _Tp, _Tp v>
7 typedef _Tp value_type;
8 typedef A3<value_type,v> type;
10 static constexpr value_type value = v;
12 constexpr operator value_type() { return value; }
15 // Partial specialization.
16 template<typename _Tp, _Tp v>
19 typedef _Tp* value_type;
20 typedef A3<value_type,v> type;
22 static constexpr value_type value = v;
24 constexpr operator value_type() { return value; }
27 // Explicit specialization.
29 struct A3<unsigned short, 0>
31 typedef unsigned short value_type;
32 typedef A3<value_type, 0> type;
34 static constexpr value_type value = 0;
36 constexpr operator value_type() { return value; }
39 // Explicitly instantiate.
40 template struct A3<int, 415>;
42 // Extern explicitly instantiate.
43 extern template struct A3<int, 510>;
47 // FIXME should this be an error?
48 A3<char, 9999> a32; // { dg-warning "overflow" }