mirror of
https://github.com/boostorg/optional.git
synced 2025-07-18 06:42:06 +02:00
*** empty log message ***
[SVN r20549]
This commit is contained in:
@ -308,12 +308,23 @@ void test_with_class_type()
|
|||||||
BOOST_CHECK ( X::count == 0 ) ;
|
BOOST_CHECK ( X::count == 0 ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void test_aliasing()
|
||||||
|
{
|
||||||
|
int a = 1 ;
|
||||||
|
optional<int&> opt(a);
|
||||||
|
int b = 2 ;
|
||||||
|
opt = b;
|
||||||
|
BOOST_CHECK( a == b ) ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int test_main( int, char* [] )
|
int test_main( int, char* [] )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
test_with_class_type();
|
test_with_class_type();
|
||||||
test_with_builtin_types();
|
test_with_builtin_types();
|
||||||
|
test_aliasing();
|
||||||
}
|
}
|
||||||
catch ( ... )
|
catch ( ... )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user