enum class EC : int { V }; template struct IsX { static const bool Value = false; }; template::Value> struct DX { typedef int Type; }; template struct IX { static const EC Value = EC::V; }; template void run() { const EC y = IX::Value; typedef typename DX::Type T; }