diff --git a/folly/Traits.h b/folly/Traits.h index 121f12eb413..4035e22eba0 100644 --- a/folly/Traits.h +++ b/folly/Traits.h @@ -196,8 +196,8 @@ struct is_constexpr_default_constructible_ { static std::true_type sfinae(T*); static std::false_type sfinae(void*); template - static constexpr bool apply = sizeof(T) && - decltype(sfinae(static_cast(nullptr)))::value; + static constexpr bool apply = + !require_sizeof || decltype(sfinae(static_cast(nullptr)))::value; }; } // namespace detail @@ -405,7 +405,7 @@ struct detected_>, D, T, A...> { // // mimic: std::experimental::detected_or, Library Fundamentals TS v2 // -// Note: not resilient agaist incomplete types; may violate ODR. +// Note: not resilient against incomplete types; may violate ODR. template class T, typename... A> using detected_or = detail::detected_; @@ -418,7 +418,7 @@ using detected_or = detail::detected_; // // mimic: std::experimental::detected_or_t, Library Fundamentals TS v2 // -// Note: not resilient agaist incomplete types; may violate ODR. +// Note: not resilient against incomplete types; may violate ODR. template class T, typename... A> using detected_or_t = typename detected_or::type; @@ -431,7 +431,7 @@ using detected_or_t = typename detected_or::type; // // mimic: std::experimental::detected_t, Library Fundamentals TS v2 // -// Note: not resilient agaist incomplete types; may violate ODR. +// Note: not resilient against incomplete types; may violate ODR. template