From: Christopher Dykes Date: Wed, 16 Nov 2016 01:30:09 +0000 (-0800) Subject: Don't assume standard library types are relocatable X-Git-Tag: v2016.11.21.00~30 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4a78b42b591b115f6881232d9c3ea0a4eb935664;p=folly.git Don't assume standard library types are relocatable Summary: Although currently the only one of these that isn't relocatable is `std::string`, making assumptions about the standard library is a terrible idea, so disable all of them. Reviewed By: yfeldblum Differential Revision: D4186024 fbshipit-source-id: 4d2a54d232df0cb05959a8d9cb1a2d2cf34d1302 --- diff --git a/folly/Traits.h b/folly/Traits.h index ece58c30..a78f6e05 100644 --- a/folly/Traits.h +++ b/folly/Traits.h @@ -578,6 +578,8 @@ constexpr initlist_construct_t initlist_construct{}; } // namespace folly +// Assume nothing when compiling with MSVC. +#ifndef _MSC_VER // gcc-5.0 changed string's implementation in libgcc to be non-relocatable #if __GNUC__ < 5 FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3(std::basic_string) @@ -591,6 +593,7 @@ FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(std::function) // Boost FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(boost::shared_ptr) +#endif #define FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(classname, type_name) \ template \