Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60493 - sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper
From: erwann.rogard_at_[hidden]
Date: 2010-03-11 16:58:48


Author: e_r
Date: 2010-03-11 16:58:47 EST (Thu, 11 Mar 2010)
New Revision: 60493
URL: http://svn.boost.org/trac/boost/changeset/60493

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

Deleted: sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/assign_reference_rebind.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/assign_reference_rebind.hpp 2010-03-11 16:58:47 EST (Thu, 11 Mar 2010)
+++ (empty file)
@@ -1,84 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// assign::detail::assign_reference_rebind.hpp //
-// //
-// (C) Copyright Thorsten Ottosen 2003-2004. Use, modification and //
-// (C) Copyright 2010 Erwann Rogard //
-// 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_REBIND_ER_2010_HPP
-#define BOOST_ASSIGN_DETAIL_ASSIGN_REFERENCE_REBNID_ER_2010_HPP
-
-namespace boost{
-namespace assign{
-namespace detail{
-
- // same as assign_detail::assign_reference except swaps by address
- template< class T >
- struct assign_reference_rebind
- {
- assign_reference_rebind()
- { /* intentionally empty */ }
-
- assign_reference_rebind( T& r ) : ref_(&r)
- { }
-
- void operator=( T& r )
- {
- ref_ = &r;
- }
-
- operator T&() const
- {
- return *ref_;
- }
-
- void swap( assign_reference_rebind& r )
- {
- T* tmp = this->ref_;
- ref_ = r.ref_;
- r.ref_ = tmp;
- }
-
- T& get_ref() const
- {
- return *ref_;
- }
-
- private:
- T* ref_;
-
- };
-
- template<typename T>
- void rebind(assign_reference_rebind<T>& a,T& r){
- a = r;
- }
-
- template< class T >
- inline bool operator<( const assign_reference_rebind<T>& l,
- const assign_reference_rebind<T>& r )
- {
- return l.get_ref() < r.get_ref();
- }
-
- template< class T >
- inline bool operator>( const assign_reference_rebind<T>& l,
- const assign_reference_rebind<T>& r )
- {
- return l.get_ref() > r.get_ref();
- }
-
- template< class T >
- inline void swap( assign_reference_rebind<T>& l,
- assign_reference_rebind<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