This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

friend template class


Hi:
	I want to declare a templated class as a friend class but failed. the gcc verion is "gcc (GCC) 3.3.1 (cygming special)". Thanks in advance.

	template<class T>
struct release {
	friend class template<int i, class T> Tempx;
	
	void operator () (T t) {
	delete t;
	}
	
private:
	void foo () {
	}
};

template <int i, typename T>
class Tempx {
	void foo () {
		release <int> r;
		r.foo ();
	}
};

        He HongFu
        hhfesle1982@163.com
          2004-06-11

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]