B
BigMan
I have a class template like this:
template< typename t >
class c;
I'd also like to have an operator == for objects of types, which are
different specializations of c:
template< typename t1, typename t2 >
bool operator ==
(
s< t1 > const&
, s< t2 > const&
);
In order to implement this operator, I need it to be a friend of both
s< t1 > and s< t2 >. For the sake of safety, I'd like no other
specialization of c to have this operator as its friend. Is this
possible and, if so, how?
template< typename t >
class c;
I'd also like to have an operator == for objects of types, which are
different specializations of c:
template< typename t1, typename t2 >
bool operator ==
(
s< t1 > const&
, s< t2 > const&
);
In order to implement this operator, I need it to be a friend of both
s< t1 > and s< t2 >. For the sake of safety, I'd like no other
specialization of c to have this operator as its friend. Is this
possible and, if so, how?