$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [utility]result_of - erroneous result type from a C++11 lambda
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2013-04-02 21:18:22
> Le 02/04/13 19:42, Evgeny Panasyuk a écrit :
> > 02.04.2013 21:16, Vicente J. Botet Escriba:
> >
> >> Is this a know bug on boost::result_of or gcc compiler?
> >
> > Try http://liveworkspace.org/code/J6bEg$0 :
> >
> > #define BOOST_THREAD_PROVIDES_FUTURE
> > #define BOOST_RESULT_OF_USE_DECLTYPE
> > #include <boost/thread.hpp>
> >
> > int main()
> > {
> > boost::future<int> f1 =
> > boost::async( []() -> int {return 123;} );
> > }
> > // ___________________________ //
> >
> > For additional info refer
> > http://www.boost.org/users/news/a_special_note_for_boost_1_52_0_and_higher.html
> > , http://www.boost.org/doc/libs/1_53_0/libs/utility/utility.htm#result_of
> >
> Thanks, this works.
>
> Should then the user of Boost.Thread define BOOST_RESULT_OF_USE_DECLTYPE
> explicitly?
I define it whenever I use lambdas with any Boost library, whether it be
Range, Thread, or something else.
Regards,
Nate