+2016-02-24 Jason Merrill <jason@redhat.com>
+
+ PR c++/69323
+ * pt.c (instantiate_class_template_1): Set
+ processing_template_decl before substituting friend_type.
+
016-02-24 Martin Sebor <msebor@redhat.com>
PR c++/69912
template <class U> friend class T::C;
otherwise. */
+ /* Bump processing_template_decl in case this is something like
+ template <class T> friend struct A<T>::B. */
+ ++processing_template_decl;
friend_type = tsubst (friend_type, args,
tf_warning_or_error, NULL_TREE);
- /* Bump processing_template_decl for correct
- dependent_type_p calculation. */
- ++processing_template_decl;
if (dependent_type_p (friend_type))
adjust_processing_template_decl = true;
--processing_template_decl;
--- /dev/null
+// PR c++/69323
+
+template<int VALUE>
+struct Outer
+{
+ struct StupidValueTrick
+ {
+ template<int VAL> friend struct Outer<VAL>::StupidValueTrick;
+ };
+};
+typedef Outer<42>::StupidValueTrick GoodValue;
+GoodValue good;