PR c++/69323 - valid
* pt.c (instantiate_class_template_1): Set processing_template_decl before substituting friend_type. From-SVN: r233681
This commit is contained in:
parent
4e7bcf32fe
commit
b8599b68ed
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -10180,11 +10180,11 @@ instantiate_class_template_1 (tree type)
|
|||
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;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// 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;
|
Loading…
Reference in New Issue