From: Christopher Dykes Date: Fri, 14 Jul 2017 22:17:31 +0000 (-0700) Subject: Switch future's Core to std::is_nothrow_constructible X-Git-Tag: v2017.07.17.00~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=616842014ae7ca8f6ada6083087eb661b0313a56;p=folly.git Switch future's Core to std::is_nothrow_constructible Summary: MSVC has issues with the way it was written, so just use the standard version instead. Upstream bug report: https://developercommunity.visualstudio.com/content/problem/80433/incorrect-error-c2462-cannot-define-a-type-in-a-ne.html Reviewed By: yfeldblum Differential Revision: D5427029 fbshipit-source-id: ae3737175d5b8e9738ed6b9573412d1d566b0e1c --- diff --git a/folly/futures/detail/Core.h b/folly/futures/detail/Core.h index dc91729f..6cbdebba 100644 --- a/folly/futures/detail/Core.h +++ b/folly/futures/detail/Core.h @@ -91,7 +91,7 @@ class Core final { template explicit Core(in_place_t, Args&&... args) noexcept( - noexcept(::new (nullptr) T(std::declval()...))) + std::is_nothrow_constructible::value) : result_(in_place, in_place, std::forward(args)...), fsm_(State::OnlyResult), attached_(1) {}