proxygen
ThenCompileTest.cpp
Go to the documentation of this file.
1 // This file is @generated by then_compile_test.rb. Do not edit directly.
2 
4 
5 using namespace folly;
6 
7 TEST(Basic, thenVariants) {
8  SomeClass anObject;
9 
10  // clang-format off
11  {Future<B> f = someFuture<A>().then(&aFunction<Future<B>, Try<A>&&>);}
12  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<Future<B>, Try<A>&&>);}
13  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<Future<B>, Try<A>&&>, &anObject);}
14  {Future<B> f = someFuture<A>().then(aStdFunction<Future<B>, Try<A>&&>());}
15  {Future<B> f = someFuture<A>().then([&](Try<A>&&){return someFuture<B>();});}
16  {Future<B> f = someFuture<A>().then(&aFunction<Future<B>, Try<A> const&>);}
17  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<Future<B>, Try<A> const&>);}
18  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<Future<B>, Try<A> const&>, &anObject);}
19  {Future<B> f = someFuture<A>().then(aStdFunction<Future<B>, Try<A> const&>());}
20  {Future<B> f = someFuture<A>().then([&](Try<A> const&){return someFuture<B>();});}
21  {Future<B> f = someFuture<A>().then(&aFunction<Future<B>, Try<A>>);}
22  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<Future<B>, Try<A>>);}
23  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<Future<B>, Try<A>>, &anObject);}
24  {Future<B> f = someFuture<A>().then(aStdFunction<Future<B>, Try<A>>());}
25  {Future<B> f = someFuture<A>().then([&](Try<A>){return someFuture<B>();});}
26  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<Future<B>, Try<A>&>, &anObject);}
27  {Future<B> f = someFuture<A>().then(&aFunction<Future<B>, A&&>);}
28  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<Future<B>, A&&>);}
29  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<Future<B>, A&&>, &anObject);}
30  {Future<B> f = someFuture<A>().then(aStdFunction<Future<B>, A&&>());}
31  {Future<B> f = someFuture<A>().then([&](A&&){return someFuture<B>();});}
32  {Future<B> f = someFuture<A>().then(&aFunction<Future<B>, A const&>);}
33  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<Future<B>, A const&>);}
34  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<Future<B>, A const&>, &anObject);}
35  {Future<B> f = someFuture<A>().then(aStdFunction<Future<B>, A const&>());}
36  {Future<B> f = someFuture<A>().then([&](A const&){return someFuture<B>();});}
37  {Future<B> f = someFuture<A>().then(&aFunction<Future<B>, A>);}
38  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<Future<B>, A>);}
39  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<Future<B>, A>, &anObject);}
40  {Future<B> f = someFuture<A>().then(aStdFunction<Future<B>, A>());}
41  {Future<B> f = someFuture<A>().then([&](A){return someFuture<B>();});}
42  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<Future<B>, A&>, &anObject);}
43  {Future<B> f = someFuture<A>().then(&aFunction<B, Try<A>&&>);}
44  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<B, Try<A>&&>);}
45  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<B, Try<A>&&>, &anObject);}
46  {Future<B> f = someFuture<A>().then(aStdFunction<B, Try<A>&&>());}
47  {Future<B> f = someFuture<A>().then([&](Try<A>&&){return B();});}
48  {Future<B> f = someFuture<A>().then(&aFunction<B, Try<A> const&>);}
49  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<B, Try<A> const&>);}
50  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<B, Try<A> const&>, &anObject);}
51  {Future<B> f = someFuture<A>().then(aStdFunction<B, Try<A> const&>());}
52  {Future<B> f = someFuture<A>().then([&](Try<A> const&){return B();});}
53  {Future<B> f = someFuture<A>().then(&aFunction<B, Try<A>>);}
54  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<B, Try<A>>);}
55  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<B, Try<A>>, &anObject);}
56  {Future<B> f = someFuture<A>().then(aStdFunction<B, Try<A>>());}
57  {Future<B> f = someFuture<A>().then([&](Try<A>){return B();});}
58  {Future<B> f = someFuture<A>().then(&SomeClass::aMethod<B, Try<A>&>, &anObject);}
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);}
75  // clang-format on
76 }
auto f
std::unique_ptr< int > A
—— Concurrent Priority Queue Implementation ——
Definition: AtomicBitSet.h:29
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...)
Definition: Try.h:51
TEST(SequencedExecutor, CPUThreadPoolExecutor)
#define B(name, bit)
Definition: CpuId.h:178
std::function< Ret(Params...)> aStdFunction(typename std::enable_if<!isFuture< Ret >::value, bool >::type=false)