Boost logo

Boost :

From: ivan66_at_[hidden]
Date: 1999-11-09 22:45:33


bill klein <bil-_at_[hidden]> wrote:
original article:http://www.egroups.com/group/boost/?start=915
> Ivan,
>
> >If operator== were defined in the boost library as a non-member
> >template, then you could specialize it for your particular type
> >to give it the semantics you want when you need them. Would that
> >satisfy your concerns?
>
> Yes, I think that sounds like a good compromise. Is
> there any disadvantage to doing it this way?
>
>
> -Bill Klein <bill_at_[hidden]>
>
>

Only that, as Dave Abrahams points out, it's potentially confusing. In
other words, while specialization is possible, it's not necessarily a
good idea.

On the other hand, letting users define an operator== for each type as
they see fit could lead to confusion, too, so I don't think it's a good
reason avoid putting operator== into the smart_ptr library.

-- Ivan J. Johnson


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk