From: Peter Griess Date: Fri, 31 Jan 2014 00:15:48 +0000 (-0800) Subject: Use C++11 unordered collections instead of libstdc++ extensions X-Git-Tag: v0.22.0~713 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b844acfb5649de67459464ed2ae30458a3045f23;p=folly.git Use C++11 unordered collections instead of libstdc++ extensions Summary: - The fbobjc builds complain about use of deprecated 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 --- diff --git a/folly/String.h b/folly/String.h index 31b21b1e..b7a05f1c 100644 --- a/folly/String.h +++ b/folly/String.h @@ -21,14 +21,13 @@ #include #include -#ifdef __GNUC__ -# include -# include -#endif +#include +#include #include "folly/Conv.h" #include "folly/FBString.h" #include "folly/FBVector.h" +#include "folly/Portability.h" #include "folly/Range.h" #include "folly/ScopeGuard.h" @@ -492,8 +491,7 @@ std::string join(const Delim& delimiter, } // namespace folly // Hash functions for string and fbstring usable with e.g. hash_map -#ifdef __GNUC__ -namespace __gnu_cxx { +FOLLY_NAMESPACE_STD_BEGIN template struct hash > : private hash { @@ -509,8 +507,7 @@ struct hash > : private hash { } }; -} // namespace __gnu_cxx -#endif +FOLLY_NAMESPACE_STD_END // Hook into boost's type traits namespace boost {