+2015-07-30 Jason Merrill <jason@redhat.com>
+
+ DR 1558
+ PR c++/67021
+ * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
+
2015-07-28 Paolo Carlini <paolo.carlini@oracle.com>
* call.c (build_op_delete_call, convert_like_real, build_over_call):
{
DECL_ORIGINAL_TYPE (r) = NULL_TREE;
set_underlying_type (r);
+ if (TYPE_DECL_ALIAS_P (r) && type != error_mark_node)
+ /* An alias template specialization can be dependent
+ even if its underlying type is not. */
+ TYPE_DEPENDENT_P_VALID (TREE_TYPE (r)) = false;
}
layout_decl (r, 0);
--- /dev/null
+// PR c++/67021
+// { dg-do compile { target c++11 } }
+
+template<typename> struct Dummy;
+template<> struct Dummy<int> {};
+
+template <class...>
+struct all_same { static constexpr bool value = true; };
+template <class T, class...Rest>
+struct all_same<T, T, Rest...> : all_same<T, Rest...> {};
+template <class T, class U, class...Rest>
+struct all_same<T, U, Rest...> { static constexpr bool value = false; };
+
+template <class R>
+using ValueType = int;
+
+template <class I>
+constexpr bool A(I i) {
+ return all_same<ValueType<I>, ValueType<decltype(i++)>>::value;
+}
+
+int main() {
+ static_assert(A(42), "");
+}