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:
Peter Dimov
2018-09-16 06:27:52 +03:00
parent 7a06df877d
commit 41de9d916a
3 changed files with 13 additions and 27 deletions
+2 -9
View File
@@ -21,19 +21,13 @@
#include <boost/system/system_error.hpp>
#include <iostream>
namespace boost
{
namespace system
{
BOOST_SYSTEM_DECL void throw_test();
}
}
void throw_test();
int main()
{
try
{
boost::system::throw_test();
throw_test();
}
catch (const boost::system::system_error& ex)
{
@@ -41,7 +35,6 @@ int main()
std::cout << " what() reports " << ex.what() << '\n';
return 0;
}
catch (const std::runtime_error& ex)
{
std::cout << " error: caught std::runtime_error instead of boost::system::system_error\n";