> Hello,
>
[quoted text clipped - 12 lines]
> friend class A::Foo<T>;
> };
This works in VS2003 (at least it compiles):
template<class T>
class Foo : public A::Foo<T>
{
typedef A::Foo<T> AFoo;
friend class Afoo;
};
David Wilkinson
Staffan Langin - 31 Oct 2005 18:56 GMT
> This works in VS2003 (at least it compiles):
>
[quoted text clipped - 6 lines]
>
> David Wilkinson
David,
It seems to work with VS2005 aswell. Thanks!
Best regards,
Staffan Langin
> Is there a workaround for the code-snippet below?
VC is known to have issue with templates and friends.
> namespace A {
> template<class T>
[quoted text clipped - 7 lines]
> {
> friend class A::Foo<T>;
I've seen VC treat class X in a friend declaration as
a ETS introducing a new type in the innermost containing
namespace scope.
You could try to omit class and it should work for VC++
(but not for other compilers)
-hg
Staffan Langin - 31 Oct 2005 13:41 GMT
> You could try to omit class and it should work for VC++
> (but not for other compilers)
Yes, that seems to work for VS2005. Thanks.
Best regards,
Staffan Langin