diff --git a/include/abg-sptr-utils.h b/include/abg-sptr-utils.h index a160601e..7012d8e9 100644 --- a/include/abg-sptr-utils.h +++ b/include/abg-sptr-utils.h @@ -73,6 +73,15 @@ template<> regex_t_sptr build_sptr(regex_t *p); +/// A deleter for shared pointers that ... doesn't delete the object +/// managed by the shared pointer. +struct noop_deleter +{ + template + void + operator()(const T*) + {} +}; }// end namespace sptr_utils }// end namespace abigail diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc index 8d835833..f9aed71d 100644 --- a/src/abg-comparison.cc +++ b/src/abg-comparison.cc @@ -29,6 +29,7 @@ #include "abg-hash.h" #include "abg-comparison.h" #include "abg-comp-filter.h" +#include "abg-sptr-utils.h" namespace abigail { @@ -40,16 +41,7 @@ namespace comparison using std::vector; using std::tr1::dynamic_pointer_cast; using std::tr1::static_pointer_cast; - -/// A deleter for shared pointers that ... doesn't delete the object -/// managed by the shared pointer. -struct noop_deleter -{ - template - void - operator()(const T*) - {} -}; +using abigail::sptr_utils::noop_deleter; /// Convenience typedef for a pair of decls. typedef std::pair decls_type;