2 // { dg-do compile { target c++11 } }
4 template<typename> struct Dummy;
5 template<> struct Dummy<int> {};
8 struct all_same { static constexpr bool value = true; };
9 template <class T, class...Rest>
10 struct all_same<T, T, Rest...> : all_same<T, Rest...> {};
11 template <class T, class U, class...Rest>
12 struct all_same<T, U, Rest...> { static constexpr bool value = false; };
15 using ValueType = int;
18 constexpr bool A(I i) {
19 return all_same<ValueType<I>, ValueType<decltype(i++)>>::value;
23 static_assert(A(42), "");