Boost logo

Boost :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2004-11-04 15:53:20

On Nov 4, 2004, at 1:49 PM, Peter Dimov wrote:
> Aleksey Gurtovoy wrote:
>> I ended up with 'f = always( whatever )',
> What an amazing coincidence. :-)
>> which grew on me to the point that I don't wish for the above anymore.
> Well, I still do. is_enabled( true ) is much better than is_enabled(
> always(true) ). _I_ can handle either syntax, but other programmers
> find the former much more accessible.
> The =0 collision didn't occur to me, mostly because I've never treated
> boost::function as a function pointer. I know which feature I'd prefer
> if given the choice.

As do I, but I'm sure we disagree :)

> I'm not sure what Doug had in mind when he said that it would be
> unimplementable, as the scalar constructor and the scalar assignment
> are not templates.

Oh, dear, I really should avoid the "u" word.

Just dropping operator=(const result_type&) and function(const
result_type&) into function would work, but changes the meaning of some
existing code:

        function<int()> f;
        f = 0;

I don't think we can do that.


Boost list run by bdawes at, gregod at, cpdaniel at, john at