|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77334 - trunk/boost/local_function/aux_
From: lorcaminiti_at_[hidden]
Date: 2012-03-14 13:47:22
Author: lcaminiti
Date: 2012-03-14 13:47:21 EDT (Wed, 14 Mar 2012)
New Revision: 77334
URL: http://svn.boost.org/trac/boost/changeset/77334
Log:
Added local_function::aux::member specializations for outer const qualifiers (T * const and T const* const).
Added dummy func (never called) to suppress an unused variable warning for nobind.
Text files modified:
trunk/boost/local_function/aux_/member.hpp | 12 ++++++++++++
trunk/boost/local_function/aux_/nobind.hpp | 6 +++++-
2 files changed, 17 insertions(+), 1 deletions(-)
Modified: trunk/boost/local_function/aux_/member.hpp
==============================================================================
--- trunk/boost/local_function/aux_/member.hpp (original)
+++ trunk/boost/local_function/aux_/member.hpp 2012-03-14 13:47:21 EDT (Wed, 14 Mar 2012)
@@ -16,15 +16,27 @@
typedef T& reference;
typedef T* pointer;
};
+
template<typename T> struct member_type<T*> {
typedef T*& reference;
typedef T* pointer;
};
+
+template<typename T> struct member_type<T* const> {
+ typedef T* const& reference;
+ typedef T* pointer;
+};
+
template<typename T> struct member_type<T const*> {
typedef T const*& reference;
typedef T const* pointer;
};
+template<typename T> struct member_type<T const* const> {
+ typedef T const* const& reference;
+ typedef T const* pointer;
+};
+
template<typename T> T* member_addr(T& data) { return &data; }
template<typename T> T const* member_addr(T const& data) { return &data; }
template<typename T> T* member_addr(T* data) { return data; }
Modified: trunk/boost/local_function/aux_/nobind.hpp
==============================================================================
--- trunk/boost/local_function/aux_/nobind.hpp (original)
+++ trunk/boost/local_function/aux_/nobind.hpp 2012-03-14 13:47:21 EDT (Wed, 14 Mar 2012)
@@ -18,7 +18,11 @@
typedef int nobind_t; // Tag no-bind type.
-nobind_t nobind; // Global variable so all no-binds can reference it.
+static nobind_t nobind; // Global variable so all no-binds can reference it.
+
+// NOTE: Used only to get rid of unused static variable `nobind` (this function
+// is never actually called so it does not need to be defined).
+void no_unused_nobind_warning_(nobind_t* ptr = &nobind);
} } } // namespace
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk