Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::ptr_vector::sort with c++11 lambdas
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-11-11 18:06:06


Le 11/11/11 18:58, Michel Morin a écrit :
> qplace wrote:
>> Exactly, thank you for the solution, it compiles fine now. A follow-up
>> question: what this #define does? Google'ing it it does not provide a reference
>> to the doc, only to unrelated discussions. May be you have a direct link to the
>> documentation page?
> `indirect_fun` uses `result_of` to determine the return type of a functor.
> So the functor should have `result_type` nested-type or struct `result`.
> If the functor do not have them, we can use C++11 `decltype` feature to
> determine its return type (C++11 lambdas do not have them). To enable
> this feature, we have to define `BOOST_RESULT_OF_USE_DECLTYPE`.
>
> For BOOST_RESULT_OF_USE_DECLTYPE, please see
> http://www.boost.org/doc/libs/1_47_0/libs/utility/utility.htm#result_of
>
>

Hi,

is there any reason result_of couldn't use decltype when available? That
is, could Boost define BOOST_RESULT_OF_USE_DECLTYPE when decltype is
supporeted?

Best,
Vicente


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net