mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Merged value_init_test from trunk, inc. [51356], anticipating the fix of ticket #2548, which will remove implicit conversion from const value_initialized<T> to non-const T&.
[SVN r56543]
This commit is contained in:
parent
e54cbf3053
commit
f8bef7ba95
@ -260,7 +260,7 @@ bool test ( T const& y, T const& z )
|
|||||||
boost::value_initialized<T> const x_c ;
|
boost::value_initialized<T> const x_c ;
|
||||||
BOOST_CHECK ( y == x_c ) ;
|
BOOST_CHECK ( y == x_c ) ;
|
||||||
BOOST_CHECK ( y == boost::get(x_c) ) ;
|
BOOST_CHECK ( y == boost::get(x_c) ) ;
|
||||||
T& x_c_ref = x_c ;
|
T& x_c_ref = const_cast<T&>( boost::get(x_c) ) ;
|
||||||
x_c_ref = z ;
|
x_c_ref = z ;
|
||||||
BOOST_CHECK ( x_c == z ) ;
|
BOOST_CHECK ( x_c == z ) ;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user