Topic: temp instant vs member of temp instant
Author: isi@panix.com (Atman Jacob Binstock)
Date: 8 Feb 1995 14:33:23 -0500 Raw View
Hi,
Could anyone tell me what the current standard says about when members of
class templates are instantiated?
For example:
template<class T> class temp {
public:
temp() { }
bool operator==(const temp<T>& t) const { return d==t.d; }
T d;
};
class X {
bool operator==(const X&) const;
public:
X() { }
};
int main()
{
temp<X> z;
return 0;
}
Should this produce an error, as X::op== is private, or should this
compile ok, as temp<X>::op== is not used.
Thanks you very much,
--
Atman Binstock Integrated Software Inc.
isi@panix.com speaking only for myself