Workaround a bug in MSVC
authorChristopher Dykes <cdykes@fb.com>
Tue, 7 Nov 2017 21:53:30 +0000 (13:53 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 7 Nov 2017 22:06:51 +0000 (14:06 -0800)
Summary:
It was broken, now it is fixed.
https://developercommunity.visualstudio.com/content/problem/145407/incorrect-c3520-within-noexcept-expression-in-alia.html

Reviewed By: yfeldblum

Differential Revision: D6254219

fbshipit-source-id: a03961db97d7ac211103655229c1ea703405826a

folly/functional/Invoke.h

index 2eab3ff..71eabb5 100644 (file)
@@ -227,9 +227,10 @@ struct is_nothrow_invocable_r
     using result_ =                                                           \
         decltype(::std::declval<F>().membername(::std::declval<Args>()...));  \
     template <typename F, typename... Args>                                   \
-    using nothrow_ = ::std::integral_constant<                                \
-        bool,                                                                 \
-        noexcept(::std::declval<F>().membername(::std::declval<Args>()...))>; \
+    struct nothrow_ : std::integral_constant<                                 \
+                          bool,                                               \
+                          noexcept(::std::declval<F>().membername(            \
+                              ::std::declval<Args>()...))> {};                \
                                                                               \
     template <typename, typename F, typename... Args>                         \
     struct invoke_result_ {};                                                 \