From 3a7cbbe49433606c07f53a32cca05d7cb221e433 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Wed, 12 Apr 2017 18:19:37 -0700 Subject: [PATCH] Fix the last issues with exception_wrapper under MSVC Summary: Well, MSVC 2017 anyways. MSVC 2017 wasn't able to handle the decltype in the type specialization, which was also entirely unnecesary. Reviewed By: yfeldblum Differential Revision: D4880272 fbshipit-source-id: b6deed72a12d4b58d6eca200e7287e536f94ca30 --- folly/ExceptionWrapper-inl.h | 32 ++++++++++++++++++-------------- folly/ExceptionWrapper.h | 2 -- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/folly/ExceptionWrapper-inl.h b/folly/ExceptionWrapper-inl.h index 17548445..0de18b0c 100644 --- a/folly/ExceptionWrapper-inl.h +++ b/folly/ExceptionWrapper-inl.h @@ -21,32 +21,36 @@ namespace folly { template -struct exception_wrapper::arg_type2_ {}; +struct exception_wrapper::arg_type_ + : public arg_type_ { +}; template -struct exception_wrapper::arg_type2_ { +struct exception_wrapper::arg_type_ { using type = Arg; }; template -struct exception_wrapper::arg_type2_ { +struct exception_wrapper::arg_type_ { + using type = Arg; +}; +template +struct exception_wrapper::arg_type_ { + using type = Arg; +}; +template +struct exception_wrapper::arg_type_ { using type = Arg; }; template -struct exception_wrapper::arg_type2_ { +struct exception_wrapper::arg_type_ { using type = AnyException; }; template -struct exception_wrapper::arg_type2_ { +struct exception_wrapper::arg_type_ { using type = AnyException; }; - -template -struct exception_wrapper::arg_type_ {}; -template -struct exception_wrapper::arg_type_> - : public arg_type2_ {}; -template -struct exception_wrapper::arg_type_ { - using type = Arg; +template +struct exception_wrapper::arg_type_ { + using type = AnyException; }; template struct exception_wrapper::arg_type_ { diff --git a/folly/ExceptionWrapper.h b/folly/ExceptionWrapper.h index fa91d458..dcdf8628 100644 --- a/folly/ExceptionWrapper.h +++ b/folly/ExceptionWrapper.h @@ -168,8 +168,6 @@ class exception_wrapper final { }; template - struct arg_type2_; - template struct arg_type_; template using arg_type = _t>; -- 2.34.1