mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Remove use of shared_ptr in test/value_init_test.cpp
This commit is contained in:
parent
9d46de1578
commit
96fbce5759
@ -16,7 +16,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "boost/utility/value_init.hpp"
|
#include "boost/utility/value_init.hpp"
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@ -270,9 +269,12 @@ bool test ( T const& y, T const& z )
|
|||||||
boost::value_initialized<T> copy2;
|
boost::value_initialized<T> copy2;
|
||||||
copy2 = x;
|
copy2 = x;
|
||||||
BOOST_TEST ( boost::get(copy2) == boost::get(x) ) ;
|
BOOST_TEST ( boost::get(copy2) == boost::get(x) ) ;
|
||||||
|
|
||||||
boost::shared_ptr<boost::value_initialized<T> > ptr( new boost::value_initialized<T> );
|
{
|
||||||
BOOST_TEST ( y == *ptr ) ;
|
boost::value_initialized<T> * ptr = new boost::value_initialized<T>;
|
||||||
|
BOOST_TEST ( y == *ptr ) ;
|
||||||
|
delete ptr;
|
||||||
|
}
|
||||||
|
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||||
boost::value_initialized<T const> cx ;
|
boost::value_initialized<T const> cx ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user