diff --git a/lib/hvec_map.h b/lib/hvec_map.h index 8423d3472d9..2bfbb2b9fa3 100644 --- a/lib/hvec_map.h +++ b/lib/hvec_map.h @@ -293,13 +293,6 @@ class hvec_map : hash_vector_base { } }; -// XXX(seth): We use this namespace to hide our get() overloads from ADL. GCC -// 4.8 has a bug which causes these overloads to be considered when get() is -// called on a type in the global namespace, even if the number of arguments -// doesn't match up, which can trigger template instantiations that cause -// errors. -namespace GetImpl { - template inline V get(const hvec_map &m, T key, V def = V()) { auto it = m.find(key); @@ -336,7 +329,4 @@ inline const V *getref(const hvec_map *m, T key) { return m ? getref(*m, key) : 0; } -} // namespace GetImpl -using namespace GetImpl; // NOLINT(build/namespaces) - #endif /* LIB_HVEC_MAP_H_ */ diff --git a/lib/map.h b/lib/map.h index e9db50bfce5..fcbf2d0a61c 100644 --- a/lib/map.h +++ b/lib/map.h @@ -19,13 +19,6 @@ limitations under the License. #include -// XXX(seth): We use this namespace to hide our get() overloads from ADL. GCC -// 4.8 has a bug which causes these overloads to be considered when get() is -// called on a type in the global namespace, even if the number of arguments -// doesn't match up, which can trigger template instantiations that cause -// errors. -namespace GetImpl { - template inline V get(const std::map &m, T key, V def = V()) { auto it = m.find(key); @@ -62,9 +55,6 @@ inline const V *getref(const std::map *m, T key) { return m ? getref(*m, key) : 0; } -} // namespace GetImpl -using namespace GetImpl; // NOLINT(build/namespaces) - /* iterate over the keys in a map */ template class IterKeys { diff --git a/lib/ordered_map.h b/lib/ordered_map.h index e49e3f86058..1608b852060 100644 --- a/lib/ordered_map.h +++ b/lib/ordered_map.h @@ -255,13 +255,6 @@ class ordered_map { } }; -// XXX(seth): We use this namespace to hide our get() overloads from ADL. GCC -// 4.8 has a bug which causes these overloads to be considered when get() is -// called on a type in the global namespace, even if the number of arguments -// doesn't match up, which can trigger template instantiations that cause -// errors. -namespace GetImpl { - template inline V get(const ordered_map &m, T key, V def = V()) { auto it = m.find(key); @@ -298,7 +291,4 @@ inline const V *getref(const ordered_map *m, T key) { return m ? getref(*m, key) : 0; } -} // namespace GetImpl -using namespace GetImpl; // NOLINT(build/namespaces) - #endif /* LIB_ORDERED_MAP_H_ */