Commit 3851f0ea authored by Sathya Gunasekar's avatar Sathya Gunasekar Committed by Sara Golemon

Include cpp only when needed

Summary:
D1008921 broke compilation for tao which uses folly/Portability.h
This diff guards the change for only c++ code. Not sure if this breaks the
definition of portability.

Test Plan: Compile tao, fbconfig -r folly and fbmake runtests

Reviewed By: simpkins@fb.com

FB internal diff: D1010967

@override-unit-failures
parent 040c3387
......@@ -137,6 +137,7 @@ struct MaxAlign { char c; } __attribute__((aligned));
#include "folly/detail/Clock.h"
#endif
#if defined(__cplusplus)
// Unfortunately, boost::has_trivial_copy<T> is broken in libc++ due to its
// usage of __has_trivial_copy(), so we can't use it as a
// least-common-denominator for C++11 implementations that don't support
......@@ -153,5 +154,6 @@ struct MaxAlign { char c; } __attribute__((aligned));
#include <boost/type_traits.hpp>
#define FOLLY_IS_TRIVIALLY_COPYABLE(T) (boost::has_trivial_copy<T>::value)
#endif
#endif // __cplusplus
#endif // FOLLY_PORTABILITY_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment