Do not map system::generic to std::generic directly

This commit is contained in:
Peter Dimov
2017-05-20 19:33:03 +03:00
parent c4238c745c
commit bdd1613898
2 changed files with 7 additions and 34 deletions
+3 -17
View File
@@ -24,28 +24,14 @@ int main() {}
static void test_generic_category()
{
int ev = ENOENT;
// check whether the standard generic category works
std::error_category const & st0 = std::generic_category();
bool has_roundtrip = st0.equivalent( ev, st0.default_error_condition( ev ) );
//
boost::system::error_category const & bt = boost::system::generic_category();
std::error_category const & st = bt;
BOOST_TEST_CSTR_EQ( bt.name(), st.name() );
if( has_roundtrip )
{
BOOST_TEST_EQ( &st, &std::generic_category() );
}
else
{
BOOST_TEST_EQ( bt.message( ev ), st.message( ev ) );
}
int ev = ENOENT;
BOOST_TEST_EQ( bt.message( ev ), st.message( ev ) );
{
boost::system::error_code bc( ev, bt );