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 2eab3ff6ba76c81e2103ed2cfe03980bce7c6c89..71eabb5e7254a1ef8e98bbfd74aef5dab77268f0 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_ {};                                                 \