UnboundedQueue: Use alignas instead of FOLLY_ALIGNED
[folly.git] / folly / ExceptionWrapper-inl.h
index 6e4fe11482e282c936f1650a72d6691450133d43..1d74c030d9fbd5e06e98ee4d9b44e956d6731409 100644 (file)
@@ -280,6 +280,15 @@ inline exception_wrapper exception_wrapper::SharedPtr::get_exception_ptr_(
   return that->sptr_.ptr_->get_exception_ptr_();
 }
 
+template <class Ex, typename... As>
+inline exception_wrapper::exception_wrapper(
+    ThrownTag,
+    in_place_type_t<Ex>,
+    As&&... as)
+    : eptr_{std::make_exception_ptr(Ex(std::forward<As>(as)...)),
+            reinterpret_cast<std::uintptr_t>(std::addressof(typeid(Ex))) + 1u},
+      vptr_(&ExceptionPtr::ops_) {}
+
 template <class Ex, typename... As>
 inline exception_wrapper::exception_wrapper(
     OnHeapTag,