friend template class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx
          2004-06-11


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux