On Wed, Nov 21, 2012 at 9:26 PM, Eric Niebler <eric@boostpro.com> wrote:
It's *mostly* safe on *most* modern compilers to do that. Boost has beenOn 11/21/2012 11:27 AM, Nathan Ridge wrote:
>
>> On Wed, Nov 21, 2012 at 5:15 PM, Nathan Crookston
>> <nathan.crookston@gmail.com<mailto:nathan.crookston@gmail.com>> wrote:
>> Rob,
>>
>> On Wed, Nov 21, 2012 at 6:39 AM, Robert Jones
>> <robertgbjones@gmail.com<mailto:robertgbjones@gmail.com>> wrote:
>> Can the last line, labelled NOT Ok, be made to work? I think the lambda does
>> not publish its result as a bind does, so I suspect it's hopeless. Any
>> thoughts?
>> // NOT Ok
>> boost::range::push_back( out, in | transformed( []( S & s ) {
>> return s.i; } ) );
>> }
>>
>> It seems trivial to have a nested result_type in all cases with a
>> lambda. However, in C++11 there's no need for it due to decltype.
>>
>> - Rob.
>
> I've been turning on BOOST_RESULT_OF_USE_DECLTYPE for such occasions
> and haven't had any problems with it.
very cautious about rolling out its decltype-based result_of
implementation because "mostly" doesn't cut it. But starting with 1.52,
it's enabled by default on clang 3.1 and higher. More compilers will be
added as their decltype support improves.
--
Eric Niebler
BoostPro Computing
http://www.boostpro.com
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users