7 TEST(Basic, thenVariants) {
15 {
Future<B> f = someFuture<A>().then([&](
Try<A>&&){
return someFuture<B>();});}
20 {
Future<B> f = someFuture<A>().then([&](
Try<A> const&){
return someFuture<B>();});}
31 {
Future<B> f = someFuture<A>().then([&](
A&&){
return someFuture<B>();});}
36 {
Future<B> f = someFuture<A>().then([&](
A const&){
return someFuture<B>();});}
41 {
Future<B> f = someFuture<A>().then([&](
A){
return someFuture<B>();});}
59 {
Future<B> f = someFuture<A>().then(&aFunction<B, A&&>);}
60 {
Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<B, A&&>);}
61 {
Future<B> f = someFuture<A>().then(&SomeClass::aMethod<B, A&&>, &anObject);}
62 {
Future<B> f = someFuture<A>().then(aStdFunction<B, A&&>());}
63 {
Future<B> f = someFuture<A>().then([&](
A&&){
return B();});}
64 {
Future<B> f = someFuture<A>().then(&aFunction<B, A const&>);}
65 {
Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<B, A const&>);}
66 {
Future<B> f = someFuture<A>().then(&SomeClass::aMethod<B, A const&>, &anObject);}
67 {
Future<B> f = someFuture<A>().then(aStdFunction<B, A const&>());}
68 {
Future<B> f = someFuture<A>().then([&](
A const&){
return B();});}
69 {
Future<B> f = someFuture<A>().then(&aFunction<B, A>);}
70 {
Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<B, A>);}
71 {
Future<B> f = someFuture<A>().then(&SomeClass::aMethod<B, A>, &anObject);}
72 {
Future<B> f = someFuture<A>().then(aStdFunction<B, A>());}
73 {
Future<B> f = someFuture<A>().then([&](
A){
return B();});}
74 {
Future<B> f = someFuture<A>().then(&SomeClass::aMethod<B, A&>, &anObject);}
—— Concurrent Priority Queue Implementation ——
std::enable_if< isFuture< Ret >::value, Ret >::type aFunction(Params...)
static std::enable_if<!isFuture< Ret >::value, Ret >::type aStaticMethod(Params...)
std::enable_if<!isFuture< Ret >::value, Ret >::type aMethod(Params...)
TEST(SequencedExecutor, CPUThreadPoolExecutor)
std::function< Ret(Params...)> aStdFunction(typename std::enable_if<!isFuture< Ret >::value, bool >::type=false)