Add system_category.hpp

This commit is contained in:
Peter Dimov committed 2020-08-27 17:22:24 +03:00
1 parent e919caa2b4
commit b7e3be2798
8 files changed
+432 -347

No files matched your search

+1
View File
@@ -81,3 +81,4 @@ run error_category_test2.cpp ;
run error_condition_test.cpp ;
run error_condition_test2.cpp ;
run generic_category_test2.cpp ;
run system_category_test2.cpp ;
+21
View File
@@ -0,0 +1,21 @@
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/system/system_category.hpp>
#include <boost/core/lightweight_test.hpp>
#include <cstring>
// Tests whether system_category() is functional when only
// system_category.hpp is included
namespace sys = boost::system;
int main()
{
sys::error_category const & cat = sys::system_category();
BOOST_TEST_CSTR_EQ( cat.name(), "system" );
return boost::report_errors();
}