Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::ptr_vector::sort with c++11 lambdas
From: Michel Morin (mimomorin_at_[hidden])
Date: 2011-11-11 12:58:39


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

Regards,
Michel


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