Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83061 - sandbox/tuple-move/detail
From: adam.wulkiewicz_at_[hidden]
Date: 2013-02-21 08:53:24


Author: awulkiew
Date: 2013-02-21 08:53:23 EST (Thu, 21 Feb 2013)
New Revision: 83061
URL: http://svn.boost.org/trac/boost/changeset/83061

Log:
tuple, cons: added explicit default and move ctors which may be deleted in C++11.
Text files modified:
   sandbox/tuple-move/detail/tuple_basic.hpp | 14 ++++++++++++++
   1 files changed, 14 insertions(+), 0 deletions(-)

Modified: sandbox/tuple-move/detail/tuple_basic.hpp
==============================================================================
--- sandbox/tuple-move/detail/tuple_basic.hpp (original)
+++ sandbox/tuple-move/detail/tuple_basic.hpp 2013-02-21 08:53:23 EST (Thu, 21 Feb 2013)
@@ -268,6 +268,7 @@
   cons& operator=(std::pair<T1, T2> & t)
   { this->operator=(static_cast<const ::boost::rv<std::pair<T1, T2> > &>(const_cast<const std::pair<T1, T2> &>(t))); return *this;}
 
+ // needed for const templated other
   template <class HT2, class TT2>
   cons& operator=(const cons<HT2, TT2> & t)
   { this->operator=(static_cast<const ::boost::rv<cons<HT2, TT2> > &>(t)); return *this;}
@@ -337,6 +338,10 @@
   template <class HT2, class TT2>
   cons( BOOST_RV_REF_2_TEMPL_ARGS(cons, HT2, TT2) u ) : head(::boost::move(u.head)), tail(::boost::move(u.tail)) {}
 
+ // implicit version may be deleted in C++11
+ cons( const cons& u ) : head(u.head), tail(u.tail) {}
+ cons( BOOST_RV_REF(cons) u ) : head(::boost::move(u.head)), tail(::boost::move(u.tail)) {}
+
   template <class HT2, class TT2>
   cons& operator=( BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(cons, HT2, TT2) u ) {
     head=u.head; tail=u.tail; return *this;
@@ -394,6 +399,7 @@
   cons& operator=(cons<HT2, null_type> & t)
   { this->operator=(static_cast<const ::boost::rv<cons<HT2, null_type> > &>(const_cast<const cons<HT2, null_type> &>(t))); return *this;}
 
+ // needed for const templated other
   template <class HT2>
   cons& operator=(const cons<HT2, null_type> & t)
   { this->operator=(static_cast<const ::boost::rv<cons<HT2, null_type> > &>(t)); return *this;}
@@ -446,6 +452,10 @@
   template <class HT2>
   cons( BOOST_RV_REF_2_TEMPL_ARGS(cons, HT2, null_type) u ) : head(::boost::move(u.head)) {}
 
+ // implicit version may be deleted in C++11
+ cons( const cons& u ) : head(u.head) {}
+ cons( BOOST_RV_REF(cons) u ) : head(::boost::move(u.head)) {}
+
   template <class HT2>
   cons& operator=(BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(cons, HT2, null_type) u )
   { head = u.head; return *this; }
@@ -669,6 +679,10 @@
       : inherited(boost::move(static_cast<typename tuple<U0, U1, U2, U3, U4, U5, U6, U7, U8, U9>::inherited &>(p)))
   {}
 
+ // implicit version may be deleted in C++11
+ tuple(const tuple & p) : inherited(p) {}
+ tuple(BOOST_RV_REF(tuple) p) : inherited(boost::move(static_cast<inherited &>(p))) {}
+
   template<class U1, class U2>
   tuple(const cons<U1, U2>& p) : inherited(p) {}
   template<class U1, class U2>


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