2 // { dg-do compile { target c++11 } }
4 template <bool P, class T = void> struct enable_if { using type = T; };
5 template <class T> struct enable_if<false, T> {};
7 template <class Dummy> struct use_type { using type = int; };
11 static_assert(Pred, "");
16 class = typename enable_if<Val>::type, // Evaluation/Substitution should end here
17 class ValT = typename get_type<Val>::type, // This should not be instantiated
18 typename use_type<ValT>::type = 0 // This NTTP causes ValT to be required
20 constexpr bool test(int) { return false; }
23 constexpr bool test(long) { return true; }
25 static_assert(test<false>(0), ""); // should call test(long)