Fix an ICE in MSVC from functional/Invoke.h v2017.11.13.00
authorAndrew Krieger <andrew.krieger@oculus.com>
Sun, 12 Nov 2017 22:31:02 +0000 (14:31 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 12 Nov 2017 22:41:34 +0000 (14:41 -0800)
Summary:
Similar to https://github.com/facebook/folly/commit/29ffcc50981fd50dd2ab1a69f8a262c4b7c27ad4,
(D6254219), this was manifesting as random ICEs that repro consistently in a given file on a given machine,
but in different files for different machines and sometimes not at all.

Reviewed By: Orvid, yfeldblum

Differential Revision: D6303186

fbshipit-source-id: d91ad633352fc5c28640e71fd1539f6a4ba8f70f

folly/functional/Invoke.h

index 71eabb5..6dce01c 100644 (file)
@@ -86,9 +86,10 @@ using invoke_result_ =
     decltype(invoke(std::declval<F>(), std::declval<Args>()...));
 
 template <typename F, typename... Args>
-using invoke_nothrow_ = std::integral_constant<
-    bool,
-    noexcept(invoke(std::declval<F>(), std::declval<Args>()...))>;
+struct invoke_nothrow_
+    : std::integral_constant<
+          bool,
+          noexcept(invoke(std::declval<F>(), std::declval<Args>()...))> {};
 
 //  from: http://en.cppreference.com/w/cpp/types/result_of, CC-BY-SA