blob: 966a2e1ac9e4b4ebd6898307f2900ab95a30cfb4 [file] [log] [blame]
// PR c++/93870 - wrong error when converting template non-type arg.
// { dg-do compile { target c++11 } }
template <typename ENUM> struct EnumWrapper
{
ENUM value;
constexpr operator ENUM() const
{
return value;
}
};
enum E : int { V };
constexpr EnumWrapper<E> operator ~(E a)
{
return {E(~int(a))};
}
template <E X> struct R
{
static void Func();
};
template <E X> struct S : R<~X>
{
};
void Test()
{
S<E::V>::Func();
}