forked from boostorg/throw_exception
Update make_exception_ptr_nx tests to use boost::make_exception_ptr
This commit is contained in:
@ -8,25 +8,13 @@
|
|||||||
# pragma warning(disable: 4530) // C++ exception handler used
|
# pragma warning(disable: 4530) // C++ exception handler used
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#include <boost/exception_ptr.hpp>
|
#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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
class my_exception: public std::exception {};
|
class my_exception: public std::exception {};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
::make_exception_ptr( my_exception() );
|
boost::make_exception_ptr( my_exception() );
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
|
@ -10,25 +10,13 @@
|
|||||||
|
|
||||||
#define BOOST_EXCEPTION_DISABLE
|
#define BOOST_EXCEPTION_DISABLE
|
||||||
|
|
||||||
//#include <boost/exception_ptr.hpp>
|
#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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
class my_exception: public std::exception {};
|
class my_exception: public std::exception {};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
::make_exception_ptr( my_exception() );
|
boost::make_exception_ptr( my_exception() );
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
|
Reference in New Issue
Block a user