* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / alias-decl-19.C
blobb101cb3b7fbfdc6e21134b35196bc86011b08d50
1 // PR c++/53567
2 // { dg-do compile { target c++11 } }
4 template <unsigned int, bool> struct IntegerType { typedef unsigned type; };
6 template <class EnumT>
7 using UnderlyingEnumType = typename IntegerType<sizeof(EnumT), (EnumT(-1) > EnumT(0))>::type;
9 template <class EnumT, class UnderlyingT = UnderlyingEnumType<EnumT>>
10 struct EnumMask
12   constexpr EnumMask(EnumT val) : m_val(val) {}
13   operator EnumT() { return m_val; }
15   EnumT m_val;
18 enum class A : unsigned { x };
20 template <class EnumT>
21 EnumMask<EnumT> operator ~(EnumT lhs)
23   return EnumT(~unsigned(lhs) & unsigned(EnumT::maskAll)); // { dg-error "not a member" }
27 int main()
29   ~A::x;
30   return 0;