Boost logo

Boost :

From: Doug Gregor (gregod_at_[hidden])
Date: 2001-04-09 21:11:09


On Monday 09 April 2001 09:48, you wrote:
[snip]
> Looks mostly good to me from this posting, but I need to look at the
> actual code yet. The only thing that jumps out is the assignment to
> int. This would allow code such as the following:
>
> any_function func(myfunctor);
> func = 10; // clears out the target, but this line doesn't make sense
>
> I also worry about possible ambiguities resulting between this
> assignment and the templated assignment, though I'm not sure what
> interactions could cause this. I'd lean towards eliminating this
> assignment entirely, since clear will accomplish the same thing and
> is more understandable in any event.
>
> Bill Kempf

I've found no problem with ambiguities thus far. So far I'm outnumbered, but
I like the ability to say:

any_function<...> func();
func = 0;

Because it more closely mirrors a normal function pointer. Would a (runtime)
assertion change your mind?

        Doug


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