[1/6] Drop C++03 compatibility layer

Message ID 20201214230855.1574934-2-maennich@google.com
State Committed
Headers
Series Drop C++03 compatibility layer from abg-cxx-compat.h |

Commit Message

Matthias Männich Dec. 14, 2020, 11:08 p.m. UTC
  Now with C++11 as minimum standard, we can drop the facilities required
to support earlier standards. Hence purge the use of std::tr1 from the
sources.

	* include/abg-cxx-compat.h: remove compatibility with pre C++11.
	* include/abg-ir.h: Remove mention of std::tr1 from comments.
	* include/abg-sptr-utils.h: Likewise.

Signed-off-by: Matthias Maennich <maennich@google.com>
---
 include/abg-cxx-compat.h | 32 --------------------------------
 include/abg-ir.h         |  4 ++--
 include/abg-sptr-utils.h |  4 ++--
 3 files changed, 4 insertions(+), 36 deletions(-)
  

Patch

diff --git a/include/abg-cxx-compat.h b/include/abg-cxx-compat.h
index 46b2ac3aa564..1d5dab48be75 100644
--- a/include/abg-cxx-compat.h
+++ b/include/abg-cxx-compat.h
@@ -8,26 +8,13 @@ 
 #ifndef __ABG_CXX_COMPAT_H
 #define __ABG_CXX_COMPAT_H
 
-#if __cplusplus >= 201103L
-
 #include <functional>
 #include <memory>
 #include <unordered_map>
 #include <unordered_set>
 
-#else
-
-#include <tr1/functional>
-#include <tr1/memory>
-#include <tr1/unordered_map>
-#include <tr1/unordered_set>
-
-#endif
-
 namespace abg_compat {
 
-#if __cplusplus >= 201103L
-
 // <functional>
 using std::hash;
 
@@ -43,25 +30,6 @@  using std::unordered_map;
 // <unordered_set>
 using std::unordered_set;
 
-#else
-
-// <functional>
-using std::tr1::hash;
-
-// <memory>
-using std::tr1::shared_ptr;
-using std::tr1::weak_ptr;
-using std::tr1::dynamic_pointer_cast;
-using std::tr1::static_pointer_cast;
-
-// <unordered_map>
-using std::tr1::unordered_map;
-
-// <unordered_set>
-using std::tr1::unordered_set;
-
-#endif
-
 }
 
 #endif  // __ABG_CXX_COMPAT_H
diff --git a/include/abg-ir.h b/include/abg-ir.h
index 165b336aacee..11af6b00647d 100644
--- a/include/abg-ir.h
+++ b/include/abg-ir.h
@@ -35,7 +35,7 @@ 
 /// How objects' lifetime is handled in libabigail.
 ///
 /// For memory management and garbage collection of libabigail's IR
-/// artifacts, we use std::tr1::shared_ptr and std::tr1::weak_ptr.
+/// artifacts, we use std::shared_ptr and std::weak_ptr.
 ///
 /// When manipulating these IR artifacts, there are a few rules to keep in
 /// mind.
@@ -90,7 +90,7 @@  namespace abigail
 namespace ir
 {
 
-// Inject some std::tr1 types in here.
+// Inject some std types in here.
 using abg_compat::unordered_map;
 
 /// A convenience typedef fo r an ordered set of size_t.
diff --git a/include/abg-sptr-utils.h b/include/abg-sptr-utils.h
index 8259c8e11f21..3f328522a153 100644
--- a/include/abg-sptr-utils.h
+++ b/include/abg-sptr-utils.h
@@ -5,7 +5,7 @@ 
 
 /// @file
 ///
-/// Utilities to ease the wrapping of C types into std::tr1::shared_ptr
+/// Utilities to ease the wrapping of C types into std::shared_ptr
 
 #ifndef __ABG_SPTR_UTILS_H__
 #define __ABG_SPTR_UTILS_H__
@@ -17,7 +17,7 @@ 
 namespace abigail
 {
 
-/// Namespace for the utilities to wrap C types into std::tr1::shared_ptr.
+/// Namespace for the utilities to wrap C types into std::shared_ptr.
 namespace sptr_utils
 {