Define a new interned_string_set_type typedef
authorDodji Seketeli <dodji@redhat.com>
Thu, 6 Oct 2016 11:53:49 +0000 (13:53 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 10 Oct 2016 10:55:02 +0000 (12:55 +0200)
In order to prepare other changes to come, this patch declares an
unordered set of abigail::interned_string.

* include/abg-interned-str.h (interned_string_set_type): Define a new
typedef for unordered_set<interned_string>.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-interned-str.h

index 51e93ab8d525d6d0f845db941867153003db6a7e..7c351c13e247a214b0a75d9373c4a3f6dd92ffcd 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <tr1/memory>
 #include <tr1/functional>
+#include <tr1/unordered_set>
 #include <ostream>
 #include <string>
 
@@ -40,6 +41,8 @@ using std::tr1::shared_ptr;
 
 namespace abigail
 {
+// Inject some std types into this namespace.
+using std::tr1::unordered_set;
 
 /// The abstraction of an interned string.
 ///
@@ -242,6 +245,10 @@ public:
   ~interned_string_pool();
 }; // end class interned_string_pool
 
+/// Convenience typedef for a set of @ref interned_string
+typedef unordered_set<interned_string,
+                     hash_interned_string> interned_string_set_type;
+
 } // end namespace abigail
 
 #endif // __ABG_INTERNED_STR_H__