Drop support for deprecated associative containers
authorYedidya Feldblum <yfeldblum@fb.com>
Mon, 15 May 2017 19:31:24 +0000 (12:31 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 15 May 2017 19:36:18 +0000 (12:36 -0700)
Summary:
[Folly] Drop support for deprecated associative containers.

Namely, `__gnu_cxx::hash_set` and `__gnu_cxx::hash_map`.

Reviewed By: wqfish

Differential Revision: D5058813

fbshipit-source-id: ebbcf10765f5d06776ee8f697cfb78614a3a566c

folly/FBString.h
folly/String.h
folly/configure.ac
folly/test/AtomicHashMapTest.cpp

index 0ff4ba9..45ba6cb 100644 (file)
 #include <folly/Traits.h>
 #include <folly/portability/BitsFunctexcept.h>
 
-#if FOLLY_HAVE_DEPRECATED_ASSOC
-#ifdef _GLIBCXX_SYMVER
-#include <ext/hash_set>
-#include <ext/hash_map>
-#endif
-#endif
-
 // When used in folly, assertions are not disabled.
 #define FBSTRING_ASSERT(expr) assert(expr)
 
@@ -2874,16 +2867,6 @@ FOLLY_FBSTRING_HASH
 
 }  // namespace std
 
-#if FOLLY_HAVE_DEPRECATED_ASSOC
-#if defined(_GLIBCXX_SYMVER) && !defined(__BIONIC__)
-namespace __gnu_cxx {
-
-FOLLY_FBSTRING_HASH
-
-}  // namespace __gnu_cxx
-#endif // _GLIBCXX_SYMVER && !__BIONIC__
-#endif // FOLLY_HAVE_DEPRECATED_ASSOC
-
 #undef FOLLY_FBSTRING_HASH
 #undef FOLLY_FBSTRING_HASH1
 
index 39dc11e..80d3e23 100644 (file)
 #include <boost/type_traits.hpp>
 #include <boost/regex/pending/unicode_iterator.hpp>
 
-#ifdef FOLLY_HAVE_DEPRECATED_ASSOC
-#ifdef _GLIBCXX_SYMVER
-#include <ext/hash_set>
-#include <ext/hash_map>
-#endif
-#endif
-
 #include <unordered_set>
 #include <unordered_map>
 
index 185b25e..ebcabe0 100644 (file)
@@ -28,13 +28,6 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc subdir-objects])
 
 AC_CONFIG_MACRO_DIR([m4])
 
-AX_CONFIG_FEATURE_DEFAULT_DISABLED
-AX_CONFIG_FEATURE(
-        [deprecated-assoc],
-        [supports deprecated associative containers (hash_map/hash_set)],
-        [HAVE_DEPRECATED_ASSOC],
-        [Define if you want to support deprecated associative containers])
-
 AC_PROG_INSTALL
 AM_PROG_LIBTOOL
 
index 6fb8d84..e3f3ab0 100644 (file)
@@ -403,7 +403,7 @@ namespace {
 inline KeyT randomizeKey(int key) {
   // We deterministically randomize the key to more accurately simulate
   // real-world usage, and to avoid pathalogical performance patterns (e.g.
-  // those related to __gnu_cxx::hash<int64_t>()(1) == 1).
+  // those related to std::hash<int64_t>()(1) == 1).
   //
   // Use a hash function we don't normally use for ints to avoid interactions.
   return folly::hash::jenkins_rev_mix32(key);