Switch future's Core<T> to std::is_nothrow_constructible
[folly.git] / folly / futures / detail / Core.h
index dc91729fad4b014dc7ab096d3cdea1dc17e887bc..6cbdebba25841a9677c824f54e38e0d2bb3ad037 100644 (file)
@@ -91,7 +91,7 @@ class Core final {
 
   template <typename... Args>
   explicit Core(in_place_t, Args&&... args) noexcept(
-      noexcept(::new (nullptr) T(std::declval<Args&&>()...)))
+      std::is_nothrow_constructible<T, Args&&...>::value)
       : result_(in_place, in_place, std::forward<Args>(args)...),
         fsm_(State::OnlyResult),
         attached_(1) {}