Boost logo

Boost :

Subject: Re: [boost] [review] Conversion review ends today
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2011-09-01 02:42:37


On 01/09/2011 3:13, Jeffrey Lee Hellrung, Jr. wrote:
> The following does
> not compile for me if I remove the comment from "//x(0);" (MSVC9):
>
> struct X
> {
> struct Y
> { void operator()(int) const { } };
> operator Y() const { return Y(); }
> };
>
> int main(int argc, const char* argv[])
> {
> X x;
> //x(0);
> static_cast< X::Y>(x)(0);
> return 0;
> }
>
> Is this what you had in mind, or something else?

Indeed, it seems I have been confused. Probably by the fact that it
works for function pointers. I will take another look at the whole
overloaded function object in the morning.

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