Drop a remnant of gcc48 support in futures
[folly.git] / folly / futures / Future.h
index 56f244833ecef2f31468a52620f6e1e491083be3..919b2391e47973a912a46900ea40532178e3661b 100644 (file)
@@ -202,20 +202,9 @@ class Future {
     value(), which may rethrow if this has captured an exception. If func
     throws, the exception will be captured in the Future that is returned.
     */
-  // gcc 4.8 requires that we cast function reference types to function pointer
-  // types. Fore more details see the comment on FunctionReferenceToPointer
-  // in Future-pre.h.
-  // gcc versions 4.9 and above (as well as clang) do not require this hack.
-  // For those, the FF tenplate parameter can be removed and occurences of FF
-  // replaced with F.
-  template <
-      typename F,
-      typename FF =
-          typename futures::detail::FunctionReferenceToPointer<F>::type,
-      typename R = futures::detail::callableResult<T, FF>>
+  template <typename F, typename R = futures::detail::callableResult<T, F>>
   typename R::Return then(F&& func) {
-    typedef typename R::Arg Arguments;
-    return thenImplementation<FF, R>(std::forward<FF>(func), Arguments());
+    return thenImplementation<F, R>(std::forward<F>(func), typename R::Arg());
   }
 
   /// Variant where func is an member function