From e919caa2b43b6c6343d4538c9f5bac14ebaed176 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 27 Aug 2020 16:35:32 +0300 Subject: [PATCH] Add generic_category.hpp --- include/boost/system/generic_category.hpp | 13 +++++++++++++ test/Jamfile.v2 | 1 + test/generic_category_test2.cpp | 21 +++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 include/boost/system/generic_category.hpp create mode 100644 test/generic_category_test2.cpp diff --git a/include/boost/system/generic_category.hpp b/include/boost/system/generic_category.hpp new file mode 100644 index 0000000..f374c2a --- /dev/null +++ b/include/boost/system/generic_category.hpp @@ -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 +#include + +#endif // #ifndef BOOST_SYSTEM_GENERIC_CATEGORY_HPP_INCLUDED diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 6852590..0739890 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -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 ; diff --git a/test/generic_category_test2.cpp b/test/generic_category_test2.cpp new file mode 100644 index 0000000..10396bd --- /dev/null +++ b/test/generic_category_test2.cpp @@ -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 +#include +#include + +// 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(); +}