mirror of
https://github.com/boostorg/utility.git
synced 2025-05-08 18:34:02 +00:00
Fixed const issue of value_initialized according to ticket #2548. See also http://lists.boost.org/Archives/boost/2009/02/148489.php
[SVN r51355]
This commit is contained in:
parent
0282c8a141
commit
5f0cf4f5de
@ -8,6 +8,7 @@
|
||||
// 24 Dec 2007 (Refactored and worked around various compiler bugs) Fernando Cacciola, Niels Dekker
|
||||
// 23 May 2008 (Fixed operator= const issue, added initialized_value) Niels Dekker, Fernando Cacciola
|
||||
// 21 Ago 2008 (Added swap) Niels Dekker, Fernando Cacciola
|
||||
// 20 Feb 2009 (Fixed logical const-ness issues) Niels Dekker, Fernando Cacciola
|
||||
//
|
||||
#ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
|
||||
#define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
|
||||
@ -90,7 +91,12 @@ class value_initialized
|
||||
wrapper_address()->wrapper::~wrapper();
|
||||
}
|
||||
|
||||
T& data() const
|
||||
T const & data() const
|
||||
{
|
||||
return wrapper_address()->data;
|
||||
}
|
||||
|
||||
T& data()
|
||||
{
|
||||
return wrapper_address()->data;
|
||||
}
|
||||
@ -100,7 +106,9 @@ class value_initialized
|
||||
::boost::swap( this->data(), arg.data() );
|
||||
}
|
||||
|
||||
operator T&() const { return this->data(); }
|
||||
operator T const &() const { return this->data(); }
|
||||
|
||||
operator T&() { return this->data(); }
|
||||
|
||||
} ;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user