Commit b844acfb authored by Peter Griess's avatar Peter Griess Committed by Sara Golemon

Use C++11 unordered collections instead of libstdc++ extensions

Summary:
- The fbobjc builds complain about use of deprecated <ext/hash_set> and
friends, and then fail because of -Werror. Just use the C++ standard
collections.

Test Plan:
- fbconfig -r folly && fbmake runtests
- Build for iOS and Android
@override-unit-failures

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1152140
parent 16f54fab
...@@ -21,14 +21,13 @@ ...@@ -21,14 +21,13 @@
#include <string> #include <string>
#include <boost/type_traits.hpp> #include <boost/type_traits.hpp>
#ifdef __GNUC__ #include <unordered_set>
# include <ext/hash_set> #include <unordered_map>
# include <ext/hash_map>
#endif
#include "folly/Conv.h" #include "folly/Conv.h"
#include "folly/FBString.h" #include "folly/FBString.h"
#include "folly/FBVector.h" #include "folly/FBVector.h"
#include "folly/Portability.h"
#include "folly/Range.h" #include "folly/Range.h"
#include "folly/ScopeGuard.h" #include "folly/ScopeGuard.h"
...@@ -492,8 +491,7 @@ std::string join(const Delim& delimiter, ...@@ -492,8 +491,7 @@ std::string join(const Delim& delimiter,
} // namespace folly } // namespace folly
// Hash functions for string and fbstring usable with e.g. hash_map // Hash functions for string and fbstring usable with e.g. hash_map
#ifdef __GNUC__ FOLLY_NAMESPACE_STD_BEGIN
namespace __gnu_cxx {
template <class C> template <class C>
struct hash<folly::basic_fbstring<C> > : private hash<const C*> { struct hash<folly::basic_fbstring<C> > : private hash<const C*> {
...@@ -509,8 +507,7 @@ struct hash<std::basic_string<C> > : private hash<const C*> { ...@@ -509,8 +507,7 @@ struct hash<std::basic_string<C> > : private hash<const C*> {
} }
}; };
} // namespace __gnu_cxx FOLLY_NAMESPACE_STD_END
#endif
// Hook into boost's type traits // Hook into boost's type traits
namespace boost { namespace boost {
......
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