2 Apr
2013
2 Apr
'13
5:16 p.m.
Hi, I've started to use C++11 lambda functions with Boost.Thread. The following works with clang-3.2 boost::future<int> f1 = boost::async( []() -> int {return 123;} ); But it fails with gcc-4.6.2, 4.7.2 and 4.8.0 ../example/lambda_future.cpp:25:91: erreur: conversion from ‘boost::future<void>’ to non-scalar type ‘boost::future<int>’ requested boost::future<int> f1 = boost::async( []() -> int {return 123;} ); The current implementation of boost::async uses boost::result_of to get the result type of the callable parameter. Is this a know bug on boost::result_of or gcc compiler? Best, Vicente