mirror of
https://github.com/boostorg/optional.git
synced 2025-07-15 21:32:17 +02:00
In-place factories moved from /detail to /utility
New value_initalized tests added [SVN r25436]
This commit is contained in:
@ -60,12 +60,16 @@ int test_main( int, char* [] )
|
|||||||
BOOST_CHECK( opt2 == opt2 ) ;
|
BOOST_CHECK( opt2 == opt2 ) ;
|
||||||
BOOST_CHECK( *opt2 == a0 ) ;
|
BOOST_CHECK( *opt2 == a0 ) ;
|
||||||
|
|
||||||
|
#ifndef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
|
||||||
|
|
||||||
opt2 = boost::in_place(a10,a11);
|
opt2 = boost::in_place(a10,a11);
|
||||||
BOOST_CHECK( *opt2 == a1 ) ;
|
BOOST_CHECK( *opt2 == a1 ) ;
|
||||||
|
|
||||||
opt3 = boost::in_place<A>(a10,a11);
|
opt3 = boost::in_place<A>(a10,a11);
|
||||||
BOOST_CHECK( *opt3 == a1 ) ;
|
BOOST_CHECK( *opt3 == a1 ) ;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
void optional_reference__test_no_converting_assignment()
|
void optional_reference__test_no_converting_assignment()
|
||||||
{
|
{
|
||||||
boost::optional<int&> opt ;
|
boost::optional<int&> opt ;
|
||||||
short v = 1 ;
|
double v = 1 ;
|
||||||
short& r = v ;
|
double& r = v ;
|
||||||
opt = r ;
|
opt = r ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user