mirror of
https://github.com/boostorg/variant2.git
synced 2025-07-29 11:47:36 +02:00
Support -fno-exceptions
This commit is contained in:
19
test/throw_exception.cpp
Normal file
19
test/throw_exception.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
// Copyright 2019 Peter Dimov.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <exception>
|
||||
#include <cstdio>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
void throw_exception( std::exception const & e )
|
||||
{
|
||||
std::fprintf( stderr, "Exception: %s\n", e.what() );
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
} // namespace boost
|
Reference in New Issue
Block a user