Summary:
Using folly on OSX using gcc-5.3 causes errors due to extra ';' in macro expansion in Traits.h.
Closes https://github.com/facebook/folly/pull/394
Reviewed By: yfeldblum
Differential Revision:
D3205265
Pulled By: elliottneilclark
fbshipit-source-id:
f49ab04add382660719b3bb83bce3c8dc303db8b
namespace traits_detail {
namespace traits_detail {
-#define FOLLY_HAS_TRUE_XXX(name) \
- BOOST_MPL_HAS_XXX_TRAIT_DEF(name); \
- template <class T> struct name ## _is_true \
- : std::is_same<typename T::name, std::true_type> {}; \
- template <class T> struct has_true_ ## name \
- : std::conditional< \
- has_ ## name <T>::value, \
- name ## _is_true<T>, \
- std::false_type \
- >:: type {};
+#define FOLLY_HAS_TRUE_XXX(name) \
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \
+ template <class T> \
+ struct name##_is_true : std::is_same<typename T::name, std::true_type> {}; \
+ template <class T> \
+ struct has_true_##name : std::conditional< \
+ has_##name<T>::value, \
+ name##_is_true<T>, \
+ std::false_type>::type {};
FOLLY_HAS_TRUE_XXX(IsRelocatable)
FOLLY_HAS_TRUE_XXX(IsZeroInitializable)
FOLLY_HAS_TRUE_XXX(IsRelocatable)
FOLLY_HAS_TRUE_XXX(IsZeroInitializable)
// gcc-5.0 changed string's implementation in libgcc to be non-relocatable
#if __GNUC__ < 5
// gcc-5.0 changed string's implementation in libgcc to be non-relocatable
#if __GNUC__ < 5
-FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3(std::basic_string);
+FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3(std::basic_string)
-FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::vector);
-FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::list);
-FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::deque);
-FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::unique_ptr);
-FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(std::shared_ptr);
-FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(std::function);
+FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::vector)
+FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::list)
+FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::deque)
+FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::unique_ptr)
+FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(std::shared_ptr)
+FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(std::function)
-FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(boost::shared_ptr);
+FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(boost::shared_ptr)
#define FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(classname, type_name) \
template <typename T> \
#define FOLLY_CREATE_HAS_MEMBER_TYPE_TRAITS(classname, type_name) \
template <typename T> \