February 27, 2003
In article <b3jhvj$8s8$1@digitaldaemon.com>, Jim Jennings says...

>I know you are not in the business of worrying about other compilers, but I tried this program on g++ (mingw) and Borland, and
>neither of them would compile it. dmc does.

This should make them all pretty happy..

template <class T> class A;

template <class U> void fn(A<U>& a);

template <class T> class A {
int i;
template <class U> friend void fn(A<U>& a);
};

template <class U> void fn(A<U>& a) {
a.i = 1;
}

int main() {
A<int> a;
fn(a);
}

Richard


February 27, 2003
"Jim Jennings" <jwjenn@mindspring.com> wrote in message news:b3l6t5$190t$1@digitaldaemon.com...
> OK, get ready for the posts.

I've got my shields up!


1 2
Next ›   Last »