From b844acfb5649de67459464ed2ae30458a3045f23 Mon Sep 17 00:00:00 2001 From: Peter Griess Date: Thu, 30 Jan 2014 16:15:48 -0800 Subject: [PATCH] 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 --- folly/String.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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 { -- 2.34.1