Update make_exception_ptr_nx tests to use boost::make_exception_ptr

This commit is contained in:
Peter Dimov
2021-09-30 20:49:40 +03:00
parent 9f6a2e7b89
commit b432f24664
2 changed files with 4 additions and 28 deletions

View File

@ -10,25 +10,13 @@
#define BOOST_EXCEPTION_DISABLE
//#include <boost/exception_ptr.hpp>
#include <boost/throw_exception.hpp>
#include <boost/exception/exception.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
typedef boost::shared_ptr<boost::exception_detail::clone_base const> exception_ptr;
template<class E> exception_ptr make_exception_ptr( E const& e )
{
return boost::make_shared< boost::wrapexcept<E> >( e );
}
#include <boost/exception_ptr.hpp>
class my_exception: public std::exception {};
int main()
{
::make_exception_ptr( my_exception() );
boost::make_exception_ptr( my_exception() );
}
namespace boost