|
Boost : |
Subject: Re: [boost] [function] minor doc issues
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-11-20 04:18:59
Steven Watanabe skrev:
> AMDG
>
> Thorsten Ottosen wrote:
>> Hm. Right, but I did get that from reading the docs. That could be
>> said more directly IMO. And the fix to the code would be to say
>>
>> return static_cast<ResultType>(f(arg1,....))
>>
>> would that not "swallow the return value" too?
>
> It would also allow explicit conversions:
>
> int f() { return 1; }
>
> boost::function<std::vector<double>() > func(&f);
I can't compile
std::vector<double> v = static_cast<std::vector<double>>(42);
what am I overlooking?
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk