Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73523 - in sandbox/local/boost/utility: . aux_
From: lorcaminiti_at_[hidden]
Date: 2011-08-03 20:30:36


Author: lcaminiti
Date: 2011-08-03 20:30:35 EDT (Wed, 03 Aug 2011)
New Revision: 73523
URL: http://svn.boost.org/trac/boost/changeset/73523

Log:
Fixed type in function_traits for BOOST_IDENTITY_TYPE.
Using add_reference for BOOST_IDENTITY_VALUE.
Removed:
   sandbox/local/boost/utility/aux_/
Text files modified:
   sandbox/local/boost/utility/identity.hpp | 17 ++++++++++++++---
   1 files changed, 14 insertions(+), 3 deletions(-)

Modified: sandbox/local/boost/utility/identity.hpp
==============================================================================
--- sandbox/local/boost/utility/identity.hpp (original)
+++ sandbox/local/boost/utility/identity.hpp 2011-08-03 20:30:35 EDT (Wed, 03 Aug 2011)
@@ -21,8 +21,19 @@
 #ifndef BOOST_IDENTITY_HPP_
 #define BOOST_IDENTITY_HPP_
 
-#include "aux_/identity.hpp"
-#include <boost/type_tratis/function_traits.hpp>
+#include <boost/type_traits/function_traits.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+namespace boost { namespace aux {
+
+// Identity for values (compilers should be able to optimize call overhead).
+template<typename T>
+inline typename boost::add_reference<T>::type identity_value(
+ typename boost::add_reference<T>::type value) {
+ return value;
+}
+
+}} // namespace boost::aux
 
 /**
  * @brief This macro wraps the specified type expression within extra
@@ -56,7 +67,7 @@
  */
 #define BOOST_IDENTITY_TYPE(parenthesized_type) \
     /* must NOT prefix this with `::` to work with parenthesized syntax */ \
- boost::function_tratis< void parenthesized_type >::arg1_type
+ boost::function_traits< void parenthesized_type >::arg1_type
 
 /**
  * @brief This macro wraps the specified value expression within extra


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