|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65574 - sandbox/opaque/boost/opaque
From: vicente.botet_at_[hidden]
Date: 2010-09-24 11:10:07
Author: viboes
Date: 2010-09-24 11:10:06 EDT (Fri, 24 Sep 2010)
New Revision: 65574
URL: http://svn.boost.org/trac/boost/changeset/65574
Log:
Opaque: Refactor constructors and assignment
Text files modified:
sandbox/opaque/boost/opaque/new_type.hpp | 8 ++++----
sandbox/opaque/boost/opaque/opaque_type.hpp | 1 +
sandbox/opaque/boost/opaque/private_opaque_type.hpp | 15 ++++-----------
sandbox/opaque/boost/opaque/public_opaque_type.hpp | 14 +++-----------
4 files changed, 12 insertions(+), 26 deletions(-)
Modified: sandbox/opaque/boost/opaque/new_type.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/new_type.hpp (original)
+++ sandbox/opaque/boost/opaque/new_type.hpp 2010-09-24 11:10:06 EDT (Fri, 24 Sep 2010)
@@ -52,13 +52,13 @@
template <typename W>
explicit new_type(W v) : val_(v) {}
new_type(){}
- new_type(const new_type & rhs) : val_(rhs.val_) {}
+ //~ new_type(const new_type & rhs) : val_(rhs.val_) {}
explicit new_type(T v) : val_(v) {}
protected:
T val_;
- new_type & operator=(const new_type & rhs) {
- val_ = rhs.val_; return *this;
- }
+ //~ new_type & operator=(const new_type & rhs) {
+ //~ val_ = rhs.val_; return *this;
+ //~ }
public:
T const& underlying() const {
Modified: sandbox/opaque/boost/opaque/opaque_type.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/opaque_type.hpp (original)
+++ sandbox/opaque/boost/opaque/opaque_type.hpp 2010-09-24 11:10:06 EDT (Fri, 24 Sep 2010)
@@ -64,6 +64,7 @@
opaque_type() {}
opaque_type(const opaque_type & rhs) : base_type(rhs.val_) {}
+ opaque_type(const Final & rhs) : base_type(rhs.val_){}
explicit opaque_type(T v) : base_type(v) {}
};
Modified: sandbox/opaque/boost/opaque/private_opaque_type.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/private_opaque_type.hpp (original)
+++ sandbox/opaque/boost/opaque/private_opaque_type.hpp 2010-09-24 11:10:06 EDT (Fri, 24 Sep 2010)
@@ -36,17 +36,10 @@
//~ Can instances of UT be implicitly converted to instances of OT?
//~ Proposed answer: no.
- private_opaque_type()
- {};
- private_opaque_type(const opaque_type_t & rhs)
- : base_type(rhs.val_)
- {}
- private_opaque_type(const Final & rhs)
- : base_type(rhs.val_)
- {}
- explicit private_opaque_type(T v)
- : base_type(v)
- {};
+ private_opaque_type() {};
+ private_opaque_type(const opaque_type_t & rhs) : base_type(rhs.val_) {}
+ //~ private_opaque_type(const Final & rhs) : base_type(rhs.val_) {}
+ explicit private_opaque_type(T v) : base_type(v) {};
template <typename W>
explicit private_opaque_type(W v)
: base_type(v)
Modified: sandbox/opaque/boost/opaque/public_opaque_type.hpp
==============================================================================
--- sandbox/opaque/boost/opaque/public_opaque_type.hpp (original)
+++ sandbox/opaque/boost/opaque/public_opaque_type.hpp 2010-09-24 11:10:06 EDT (Fri, 24 Sep 2010)
@@ -155,17 +155,9 @@
//~ Proposed answer: no.
public_opaque_type() {}
-
- public_opaque_type(const opaque_type_t & rhs)
- : base_type(rhs.val_)
- {}
- public_opaque_type(const Final & rhs)
- : base_type(rhs.val_)
- {}
-
- explicit public_opaque_type(T v)
- : base_type(v)
- {}
+ public_opaque_type(const opaque_type_t & rhs) : base_type(rhs.val_){}
+ //~ public_opaque_type(const Final & rhs) : base_type(rhs.val_){}
+ explicit public_opaque_type(T v) : base_type(v) {}
template <typename W>
explicit public_opaque_type(W v)
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