mirror of
https://github.com/boostorg/system.git
synced 2025-11-16 07:29:23 +01:00
Fix throw_test.cpp to not meddle with BOOST_SYSTEM_SOURCE as it needs to import from Boost.System while exporting throw_test()
This commit is contained in:
@@ -13,19 +13,16 @@
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
// define BOOST_SYSTEM_SOURCE so that <boost/system/config.hpp> knows
|
||||
// the library is being built (possibly exporting rather than importing code)
|
||||
#define BOOST_SYSTEM_SOURCE
|
||||
|
||||
#include <boost/system/system_error.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost
|
||||
#if defined(THROW_DYN_LINK)
|
||||
# define EXPORT BOOST_SYMBOL_EXPORT
|
||||
#else
|
||||
# define EXPORT
|
||||
#endif
|
||||
|
||||
EXPORT void throw_test()
|
||||
{
|
||||
namespace system
|
||||
{
|
||||
BOOST_SYSTEM_DECL void throw_test()
|
||||
{
|
||||
throw system_error(9999, system_category(), "boo boo");
|
||||
}
|
||||
}
|
||||
throw boost::system::system_error( 9999, boost::system::system_category(), "boo boo" );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user