Summary:
- Use the BOOST_STD_EXTENSION_NAMESPACE macro to pick the namespace to
use for hash specializations
Test Plan:
- fbconfig -r unicorn/utils/ && fbmake opt
- fbconfig -r folly && fbmake runtests
- Build in fbobjc with libc++
@override-unit-failures
Reviewed By: rajatr@fb.com
FB internal diff:
D1153422
Blame Revision:
D1152140
#include <string>
#include <boost/type_traits.hpp>
#include <string>
#include <boost/type_traits.hpp>
+#ifdef _GLIBCXX_SYMVER
+#include <ext/hash_set>
+#include <ext/hash_map>
+#endif
+
#include <unordered_set>
#include <unordered_map>
#include <unordered_set>
#include <unordered_map>
} // namespace folly
// Hash functions for string and fbstring usable with e.g. hash_map
} // namespace folly
// Hash functions for string and fbstring usable with e.g. hash_map
-FOLLY_NAMESPACE_STD_BEGIN
+//
+// We let Boost pick the namespace here for us, since it has logic to do the
+// right thing based on the C++ standard library implementation being used.
+namespace BOOST_STD_EXTENSION_NAMESPACE {
template <class C>
struct hash<folly::basic_fbstring<C> > : private hash<const C*> {
template <class C>
struct hash<folly::basic_fbstring<C> > : private hash<const C*> {
// Hook into boost's type traits
namespace boost {
// Hook into boost's type traits
namespace boost {