|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-11-17 13:37:49
On Sunday 17 November 2002 11:45 am, Daryle Walker wrote:
> You have poisoned (in)equality operators, because of your safe_bool
> type. Are you using a data pointer type, like "void *" that the
> IOStreams use for their safe-Boolean type? If so, you should switch to
> an even more useless type. I used member-pointers for my modulo class
> template (in the Sandbox).
I'm already using member function pointers.
> Here, I used a safe_bool type that was based on the particular version
> of the class template, preventing cross-version comparisons. I have a
> valid (in)equality operators; if you don't want that either, then
> provide declarations for those operators as member functions, but make
> them private.
Cross-version comparisons were only a problem due to some unnecessary
factoring into a non-template base class. Member functions are feasible, but
I strongly dislike binary operators as member functions when they can be
global (different conversion rules).
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk