Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60487 - in sandbox/statistics/detail/assign/boost/assign/auto_size: detail reference_wrapper
From: erwann.rogard_at_[hidden]
Date: 2010-03-11 14:22:11


Author: e_r
Date: 2010-03-11 14:22:10 EST (Thu, 11 Mar 2010)
New Revision: 60487
URL: http://svn.boost.org/trac/boost/changeset/60487

Log:
m
Added:
   sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/assign_reference_copy.hpp
      - copied unchanged from r60486, /sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_reference_copy.hpp
Removed:
   sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_reference_copy.hpp

Deleted: sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_reference_copy.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_reference_copy.hpp 2010-03-11 14:22:10 EST (Thu, 11 Mar 2010)
+++ (empty file)
@@ -1,95 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// assign::detail::assign_reference_copy.hpp //
-// //
-// (C) Copyright 2010 Manuel Peinado Gallego //
-// Use, modification and distribution are subject to the //
-// Boost Software License, Version 1.0. (See accompanying file //
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_ASSIGN_DETAIL_ASSIGN_REFERENCE_COPY_MPG_2010_HPP
-#define BOOST_ASSIGN_DETAIL_ASSIGN_REFERENCE_COPY_MPG_2010_HPP
-
-namespace boost{
-namespace assign{
-namespace detail{
-
- // This is a reference wrapper whose assignment operator copies the value of
- // the rhs to the object pointed to.
- //
- // This is in contrast to assign_reference whose assignement operator
- // rebinds the address of the internal pointer. For the same effect, here,
- // use rebind().
- template< class T >
- struct assign_reference_copy
- {
- assign_reference_copy()
- { /* intentionally empty */ }
-
- explicit assign_reference_copy( T& r ) : ref_(&r)
- { }
-
- void operator=( const T& r )
- {
- *ref_ = r;
- }
-
- operator T&() const
- {
- return *ref_;
- }
-
- void swap( assign_reference_copy& r )
- {
- std::swap( *ref_, *r.ref_ );
- }
-
- T& get_ref() const
- {
- return *ref_;
- }
-
- void rebind( T & r )
- {
- ref_ = &r;
- }
-
- private:
- T* ref_;
-
- };
-
- // Added by ER March 10, 2010
- template<typename T>
- void rebind(assign_reference_copy<T>& a,T& r){
- a.rebind(r);
- }
-
- // Added by ER March 7, 2010
- template< class T >
- inline bool operator<( const assign_reference_copy<T>& l,
- const assign_reference_copy<T>& r )
- {
- return l.get_ref() < r.get_ref();
- }
-
- template< class T >
- inline bool operator>( const assign_reference_copy<T>& l,
- const assign_reference_copy<T>& r )
- {
- return l.get_ref() > r.get_ref();
- }
-
- template< class T >
- inline void swap( assign_reference_copy<T>& l,
- assign_reference_copy<T>& r )
- {
- l.swap( r );
- }
-
-
-}// detail
-}// assign
-}// boost
-
-#endif
-


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