|
Boost : |
Subject: Re: [boost] [review] Conversion review ends today
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2011-09-01 01:44:10
On 01/09/2011 2:33, Jeffrey Lee Hellrung, Jr. wrote:
>> Create a new class that keeps references to all such function objects, and
>> > implements implicit conversions to each of them. Then you can use an
>> > instance of this class as an "overloaded function object".
>> >
> Wouldn't that result in a conversion ambiguity? How would the compiler know
> which function object to implicitly convert to when invoking operator()?
Of course, that technique only works as long as the function call is not
ambiguous. I confess not having read the entire thread; I just assumed
that this was implied by "function overloads", same overload resolution
rules that work for regular functions do apply in this case.
Agustín K-ballo Bergé.-
http://talesofcpp.blogspot.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk