Fix 1/2 of exception_wrapper under MSVC
[folly.git] / folly / ExceptionWrapper.cpp
index c1440a57a40a9f67d84d8301ba4babd081560be6..0079db866d7160f368b869983e22370c3210109c 100644 (file)
 
 namespace folly {
 
 
 namespace folly {
 
-constexpr exception_wrapper::VTable const exception_wrapper::uninit_;
-constexpr exception_wrapper::VTable const exception_wrapper::ExceptionPtr::ops_;
-constexpr exception_wrapper::VTable const exception_wrapper::SharedPtr::ops_;
+exception_wrapper::VTable const exception_wrapper::uninit_{
+    &noop_<void, exception_wrapper const*, exception_wrapper*>,
+    &noop_<void, exception_wrapper*, exception_wrapper*>,
+    &noop_<void, exception_wrapper*>,
+    &noop_<void, exception_wrapper const*>,
+    &uninit_type_,
+    &noop_<std::exception const*, exception_wrapper const*>,
+    &noop_<exception_wrapper, exception_wrapper const*>};
+
+exception_wrapper::VTable const exception_wrapper::ExceptionPtr::ops_{
+    copy_,
+    move_,
+    delete_,
+    throw_,
+    type_,
+    get_exception_,
+    get_exception_ptr_};
+
+exception_wrapper::VTable const exception_wrapper::SharedPtr::ops_{
+    copy_,
+    move_,
+    delete_,
+    throw_,
+    type_,
+    get_exception_,
+    get_exception_ptr_};
 
 namespace {
 std::exception const* get_std_exception_(std::exception_ptr eptr) noexcept {
 
 namespace {
 std::exception const* get_std_exception_(std::exception_ptr eptr) noexcept {