Future<T>::then([](T&&)), aka next()
[folly.git] / folly / wangle / test / Thens.cpp
index a0e1be3250f7bccfdf983036c3f09eeeb65f84ab..2a9cdca19bad79797002a328d22c12dced346625 100644 (file)
@@ -1,24 +1,37 @@
-// This file is @generated by thens.rb
+// This file is @generated by thens.rb. Do not edit directly.
 
 // TODO: fails to compile with clang:dev.  See task #4412111
 #ifndef __clang__
 
 #include <folly/wangle/test/Thens.h>
 
+#ifndef __clang__
+// TODO: fails to compile with clang:dev.  See task #4412111
+
 TEST(Future, thenVariants) {
   SomeClass anObject;
   Executor* anExecutor;
 
-  {Future<B> f = someFuture<A>().then(aFunction<Future<B>, Try<A>&&>);}
+  {Future<B> f = someFuture<A>().then(&aFunction<Future<B>, Try<A>&&>);}
   {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<Future<B>, Try<A>&&>);}
   {Future<B> f = someFuture<A>().then(&anObject, &SomeClass::aMethod<Future<B>, Try<A>&&>);}
   {Future<B> f = someFuture<A>().then(aStdFunction<Future<B>, Try<A>&&>());}
   {Future<B> f = someFuture<A>().then([&](Try<A>&&){return someFuture<B>();});}
-  {Future<B> f = someFuture<A>().then(aFunction<B, Try<A>&&>);}
+  {Future<B> f = someFuture<A>().then(&aFunction<Future<B>, A&&>);}
+  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<Future<B>, A&&>);}
+  {Future<B> f = someFuture<A>().then(&anObject, &SomeClass::aMethod<Future<B>, A&&>);}
+  {Future<B> f = someFuture<A>().then(aStdFunction<Future<B>, A&&>());}
+  {Future<B> f = someFuture<A>().then([&](A&&){return someFuture<B>();});}
+  {Future<B> f = someFuture<A>().then(&aFunction<B, Try<A>&&>);}
   {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<B, Try<A>&&>);}
   {Future<B> f = someFuture<A>().then(&anObject, &SomeClass::aMethod<B, Try<A>&&>);}
   {Future<B> f = someFuture<A>().then(aStdFunction<B, Try<A>&&>());}
   {Future<B> f = someFuture<A>().then([&](Try<A>&&){return B();});}
+  {Future<B> f = someFuture<A>().then(&aFunction<B, A&&>);}
+  {Future<B> f = someFuture<A>().then(&SomeClass::aStaticMethod<B, A&&>);}
+  {Future<B> f = someFuture<A>().then(&anObject, &SomeClass::aMethod<B, A&&>);}
+  {Future<B> f = someFuture<A>().then(aStdFunction<B, A&&>());}
+  {Future<B> f = someFuture<A>().then([&](A&&){return B();});}
 }
 
 #endif