// PR c++/78489 // { dg-do compile { target c++11 } } template struct enable_if { using type = T; }; template struct enable_if {}; template struct use_type { using type = int; }; template struct get_type { static_assert(Pred, ""); using type = int; }; template ::type, // Evaluation/Substitution should end here class ValT = typename get_type::type, // This should not be instantiated typename use_type::type = 0 // This NTTP causes ValT to be required > constexpr bool test(int) { return false; } template constexpr bool test(long) { return true; } static_assert(test(0), ""); // should call test(long)