summaryrefslogtreecommitdiff
path: root/libs/conversion
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:33:54 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:36:09 +0900
commitd9ec475d945d3035377a0d89ed42e382d8988891 (patch)
tree34aff2cee4b209906243ab5499d61f3edee2982f /libs/conversion
parent71d216b90256936a9638f325af9bc69d720e75de (diff)
downloadboost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.gz
boost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.bz2
boost-d9ec475d945d3035377a0d89ed42e382d8988891.zip
Imported Upstream version 1.60.0
Change-Id: Ie709530d6d5841088ceaba025cbe175a4ef43050 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'libs/conversion')
-rw-r--r--libs/conversion/test/cast_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/conversion/test/cast_test.cpp b/libs/conversion/test/cast_test.cpp
index 5295e32f0a..e754dbb100 100644
--- a/libs/conversion/test/cast_test.cpp
+++ b/libs/conversion/test/cast_test.cpp
@@ -51,7 +51,8 @@ int main( int argc, char * argv[] )
// test polymorphic_cast ---------------------------------------------------//
// tests which should succeed
- Base * base = new Derived;
+ Derived derived_instance;
+ Base * base = &derived_instance;
Base2 * base2 = 0;
Derived * derived = 0;
derived = polymorphic_downcast<Derived*>( base ); // downcast
@@ -66,7 +67,8 @@ int main( int argc, char * argv[] )
// tests which should result in errors being detected
int err_count = 0;
- base = new Base;
+ Base base_instance;
+ base = &base_instance;
if ( argc > 1 && *argv[1] == '1' )
{ derived = polymorphic_downcast<Derived*>( base ); } // #1 assert failure