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