[v1,02/16] abg-cxx-compat: more <functional> support: std::bind and friends
Commit Message
Add abg_compat::{bind,function,placeholders} to the compatibility layer.
That is made use of in a later patch. As usual, for C++ standards that
natively support this functionality (C++11 and later), the native
implementation is aliased into the abg_compat namespace.
* include/abg-cxx-compat.h: add support for
abg_compat::{bind,function,placeholders}
Reviewed-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
---
include/abg-cxx-compat.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
@@ -58,8 +58,15 @@ namespace abg_compat {
#if __cplusplus >= 201103L
// <functional>
+using std::bind;
+using std::function;
using std::hash;
+namespace placeholders
+{
+using namespace std::placeholders;
+}
+
// <memory>
using std::shared_ptr;
using std::weak_ptr;
@@ -75,8 +82,15 @@ using std::unordered_set;
#else
// <functional>
+using std::tr1::bind;
+using std::tr1::function;
using std::tr1::hash;
+namespace placeholders
+{
+using namespace std::tr1::placeholders;
+}
+
// <memory>
using std::tr1::shared_ptr;
using std::tr1::weak_ptr;