I don't know anything about Boost.Function except what I've seen
checking out the sample documentations. I have some thoughts on the ==
and != operators.
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).
template < int N >
class modulo
{
typename modulo self_type;
int r_;
public:
typename int self_type::* safe_bool;
operator safe_bool() const;
//...
};
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.
Daryle
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
- Re: [boost] Suggestion for Boost.Function Daryle Walker
- Re: [boost] Suggestion for Boost.Function Douglas Gregor