1 2 // Copyright 2018 Peter Dimov. 3 // Distributed under the Boost Software License, Version 1.0. 4 5 #include <boost/system/error_code.hpp> 6 #include <boost/core/lightweight_test.hpp> 7 #include <boost/core/quick_exit.hpp> 8 #include <cerrno> 9 10 using namespace boost::system; 11 12 struct Z 13 { ~ZZ14 ~Z() 15 { 16 BOOST_TEST_CSTR_EQ( generic_category().name(), "generic" ); 17 BOOST_TEST_CSTR_EQ( system_category().name(), "system" ); 18 19 boost::quick_exit( boost::report_errors() ); 20 } 21 }; 22 23 static Z z; 24 25 static error_code e1( 1, system_category() ); 26 static error_code e2( ENOENT, generic_category() ); 27 main()28int main() 29 { 30 } 31