From f0dfe0f699c68867eccde9dda9fe1617ef31303e Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Fri, 7 Jul 2017 02:59:14 -0700 Subject: [PATCH] Determine noexcept'ness of folly::Optional with std::is_nothrow_constructible Summary: Because MSVC is not happy about how it's written now. Reviewed By: yfeldblum Differential Revision: D5378740 fbshipit-source-id: 8b77d1a05da75b331e0cb72bd0ad859b89e54b36 --- folly/Optional.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/Optional.h b/folly/Optional.h index c6980c18..ce8bcf1a 100644 --- a/folly/Optional.h +++ b/folly/Optional.h @@ -128,8 +128,8 @@ class Optional { } template - explicit Optional(in_place_t, Args&&... args) - noexcept(noexcept(::new (nullptr) Value(std::declval()...))) { + explicit Optional(in_place_t, Args&&... args) noexcept( + std::is_nothrow_constructible::value) { construct(std::forward(args)...); } -- 2.34.1