forked from boostorg/system
Add generic_category.hpp
This commit is contained in:
13
include/boost/system/generic_category.hpp
Normal file
13
include/boost/system/generic_category.hpp
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef BOOST_SYSTEM_GENERIC_CATEGORY_HPP_INCLUDED
|
||||
#define BOOST_SYSTEM_GENERIC_CATEGORY_HPP_INCLUDED
|
||||
|
||||
// Copyright 2020 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
// See library home page at http://www.boost.org/libs/system
|
||||
|
||||
#include <boost/system/detail/generic_category.hpp>
|
||||
#include <boost/system/detail/error_category_impl.hpp>
|
||||
|
||||
#endif // #ifndef BOOST_SYSTEM_GENERIC_CATEGORY_HPP_INCLUDED
|
@ -80,3 +80,4 @@ run errc_test.cpp ;
|
||||
run error_category_test2.cpp ;
|
||||
run error_condition_test.cpp ;
|
||||
run error_condition_test2.cpp ;
|
||||
run generic_category_test2.cpp ;
|
||||
|
21
test/generic_category_test2.cpp
Normal file
21
test/generic_category_test2.cpp
Normal 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/generic_category.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <cstring>
|
||||
|
||||
// Tests whether generic_category() is functional when only
|
||||
// generic_category.hpp is included
|
||||
|
||||
namespace sys = boost::system;
|
||||
|
||||
int main()
|
||||
{
|
||||
sys::error_category const & cat = sys::generic_category();
|
||||
|
||||
BOOST_TEST_CSTR_EQ( cat.name(), "generic" );
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
Reference in New Issue
Block a user