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 0ff4ba9e6a05bd4a3895973f641507477a93ccb7..45ba6cb5afe358b1e8e4070084c968bd357dcaca 100644 (file)
 #include <folly/Traits.h>
 #include <folly/portability/BitsFunctexcept.h>
 
 #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)
 
 // When used in folly, assertions are not disabled.
 #define FBSTRING_ASSERT(expr) assert(expr)
 
@@ -2874,16 +2867,6 @@ FOLLY_FBSTRING_HASH
 
 }  // namespace std
 
 
 }  // 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
 
 #undef FOLLY_FBSTRING_HASH
 #undef FOLLY_FBSTRING_HASH1
 
index 39dc11e314a8d51f9d97019b33d1ec44bf022dc1..80d3e232375aa9c91d6dadbd2187748ca6d0db5b 100644 (file)
 #include <boost/type_traits.hpp>
 #include <boost/regex/pending/unicode_iterator.hpp>
 
 #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>
 
 #include <unordered_set>
 #include <unordered_map>
 
index 185b25e002d8f641f586bd64b241010b5796a67f..ebcabe0ef6e0fcc04e499db1e06d391d8791dcb0 100644 (file)
@@ -28,13 +28,6 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc subdir-objects])
 
 AC_CONFIG_MACRO_DIR([m4])
 
 
 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
 
 AC_PROG_INSTALL
 AM_PROG_LIBTOOL
 
index 6fb8d84f2d91fb6fc7e44d91054e95245427d63c..e3f3ab003e60e8f82dc81270ec5fb0a42332d3ec 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.
 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);
   //
   // Use a hash function we don't normally use for ints to avoid interactions.
   return folly::hash::jenkins_rev_mix32(key);