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

Michiel <MichieldeB at aim dot com> changed:

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

--- Comment #4 from Michiel <MichieldeB at aim dot com> 2010-10-08 14:58:42 UTC 
---
(In reply to comment #2)
> 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.

Please explain why the code is invalid, and do not click "Resolved invalid"
until ClassB is a friend of ClassA.

Reply via email to