http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45942

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-10-08 
14:46:16 UTC ---
This variation uses B1 for your first attempt and B2 for your second attempt.

template <class T, int C> class A;

template <class T, int C, A<T,C> &a> class B1;

template <class T, int C, A<T,C> &a> class B2;

template <class T, int C> class A
{
  template <A &a> friend class B1;

  template <A &a> friend class B2<T,C,a>;
};

// instantiation
template class A<char,128>;


This code is not valid, G++ is correct to reject it.

Reply via email to