From b432f24664c73c888507a929fde8e5bd70dae30c Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 30 Sep 2021 20:49:40 +0300 Subject: [PATCH] Update make_exception_ptr_nx tests to use boost::make_exception_ptr --- test/make_exception_ptr_nx_test.cpp | 16 ++-------------- test/make_exception_ptr_nx_test2.cpp | 16 ++-------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/test/make_exception_ptr_nx_test.cpp b/test/make_exception_ptr_nx_test.cpp index 0ebc7a4..72d2f7b 100644 --- a/test/make_exception_ptr_nx_test.cpp +++ b/test/make_exception_ptr_nx_test.cpp @@ -8,25 +8,13 @@ # pragma warning(disable: 4530) // C++ exception handler used #endif -//#include - -#include -#include -#include -#include - -typedef boost::shared_ptr exception_ptr; - -template exception_ptr make_exception_ptr( E const& e ) -{ - return boost::make_shared< boost::wrapexcept >( e ); -} +#include class my_exception: public std::exception {}; int main() { - ::make_exception_ptr( my_exception() ); + boost::make_exception_ptr( my_exception() ); } namespace boost diff --git a/test/make_exception_ptr_nx_test2.cpp b/test/make_exception_ptr_nx_test2.cpp index 21af15b..4ec8626 100644 --- a/test/make_exception_ptr_nx_test2.cpp +++ b/test/make_exception_ptr_nx_test2.cpp @@ -10,25 +10,13 @@ #define BOOST_EXCEPTION_DISABLE -//#include - -#include -#include -#include -#include - -typedef boost::shared_ptr exception_ptr; - -template exception_ptr make_exception_ptr( E const& e ) -{ - return boost::make_shared< boost::wrapexcept >( e ); -} +#include class my_exception: public std::exception {}; int main() { - ::make_exception_ptr( my_exception() ); + boost::make_exception_ptr( my_exception() ); } namespace boost