Add equality tests using two libraries returning equivalent error codes, to check that the categories have sigle instances

This commit is contained in:
Peter Dimov
2018-01-21 22:29:58 +02:00
parent ecb77edb81
commit 3ee2c53cbf
3 changed files with 25 additions and 6 deletions

View File

@@ -2,19 +2,26 @@
// Copyright 2018 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
#include <boost/system/error_code.hpp>
#include <boost/config.hpp>
#if defined(SINGLE_INSTANCE_DYN_LINK) && defined(BOOST_HAS_DECLSPEC)
# define EXPORT __declspec(dllexport)
#else
# define EXPORT
#endif
#include <boost/system/error_code.hpp>
using namespace boost::system;
namespace lib2
{
error_code get_system_code()
EXPORT error_code get_system_code()
{
return error_code( 0, system_category() );
}
error_code get_generic_code()
EXPORT error_code get_generic_code()
{
return error_code( 0, generic_category() );
}