Avoid some g++ warnings in shared_ptr_test

This commit is contained in:
Peter Dimov
2018-12-23 05:06:24 +02:00
parent 2932ca4203
commit f380d4466c
2 changed files with 15 additions and 7 deletions

View File

@ -15,11 +15,19 @@ run quick.cpp ;
# full test suite
run smart_ptr_test.cpp ;
run shared_ptr_basic_test.cpp : : : <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor ;
run shared_ptr_test.cpp : : : <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor ;
run shared_ptr_basic_test.cpp
: : : <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor ;
run shared_ptr_test.cpp
: : :
<toolset>gcc:<cxxflags>-Wno-non-virtual-dtor
<toolset>gcc:<cxxflags>-Wno-deprecated-declarations ;
run weak_ptr_test.cpp ;
run weak_ptr_move_test.cpp ;
run shared_from_this_test.cpp : : : <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor ;
run shared_from_this_test.cpp
: : : <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor ;
run get_deleter_test.cpp ;
run intrusive_ptr_test.cpp ;
run intrusive_ptr_move_test.cpp ;

View File

@ -764,7 +764,7 @@ void weak_ptr_constructor()
boost::shared_ptr<Y> p2(wp);
BOOST_ERROR("shared_ptr<Y> p2(wp) failed to throw");
}
catch(boost::bad_weak_ptr)
catch(boost::bad_weak_ptr const&)
{
}
@ -773,7 +773,7 @@ void weak_ptr_constructor()
boost::shared_ptr<X> p3(wp);
BOOST_ERROR("shared_ptr<X> p3(wp) failed to throw");
}
catch(boost::bad_weak_ptr)
catch(boost::bad_weak_ptr const&)
{
}
}
@ -829,7 +829,7 @@ void weak_ptr_constructor()
boost::shared_ptr<Y> p2(wp);
BOOST_ERROR("shared_ptr<Y> p2(wp) failed to throw");
}
catch(boost::bad_weak_ptr)
catch(boost::bad_weak_ptr const&)
{
}
@ -838,7 +838,7 @@ void weak_ptr_constructor()
boost::shared_ptr<X> p3(wp);
BOOST_ERROR("shared_ptr<X> p3(wp) failed to throw");
}
catch(boost::bad_weak_ptr)
catch(boost::bad_weak_ptr const&)
{
}
}