mirror of
https://github.com/boostorg/system.git
synced 2025-10-04 11:40:57 +02:00
Rename test/std_ec_mismatch to std_single_instance; test also static and shared libraries
This commit is contained in:
34
test/std_single_instance_1.cpp
Normal file
34
test/std_single_instance_1.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
// Copyright 2019 Peter Dimov.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(STD_SINGLE_INSTANCE_DYN_LINK)
|
||||
# define EXPORT BOOST_SYMBOL_EXPORT
|
||||
#else
|
||||
# define EXPORT
|
||||
#endif
|
||||
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
|
||||
|
||||
#include <system_error>
|
||||
|
||||
namespace lib1
|
||||
{
|
||||
|
||||
EXPORT std::error_code get_system_code()
|
||||
{
|
||||
return boost::system::error_code( 0, boost::system::system_category() );
|
||||
}
|
||||
|
||||
EXPORT std::error_code get_generic_code()
|
||||
{
|
||||
return boost::system::error_code( 0, boost::system::generic_category() );
|
||||
}
|
||||
|
||||
} // namespace lib1
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user