mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 12:37:13 +02:00
Ensure generic_category() and system_category() linkage is correct on Windows when BOOST_ERROR_CODE_HEADER_ONLY is specified.
This commit is contained in:
@ -459,13 +459,19 @@ namespace
|
|||||||
// address for comparison purposes
|
// address for comparison purposes
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
BOOST_SYSTEM_DECL const error_category & system_category() BOOST_SYSTEM_NOEXCEPT
|
# ifdef BOOST_ERROR_CODE_HEADER_ONLY
|
||||||
|
# define BOOST_SYSTEM_LINKAGE inline
|
||||||
|
# else
|
||||||
|
# define BOOST_SYSTEM_LINKAGE BOOST_SYSTEM_DECL
|
||||||
|
# endif
|
||||||
|
|
||||||
|
BOOST_SYSTEM_LINKAGE const error_category & system_category() BOOST_SYSTEM_NOEXCEPT
|
||||||
{
|
{
|
||||||
static const system_error_category system_category_const;
|
static const system_error_category system_category_const;
|
||||||
return system_category_const;
|
return system_category_const;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_SYSTEM_DECL const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT
|
BOOST_SYSTEM_LINKAGE const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT
|
||||||
{
|
{
|
||||||
static const generic_error_category generic_category_const;
|
static const generic_error_category generic_category_const;
|
||||||
return generic_category_const;
|
return generic_category_const;
|
||||||
|
Reference in New Issue
Block a user