Fix variant=release link errors

This commit is contained in:
Peter Dimov
2018-01-21 21:42:22 +02:00
parent 3ba40116fe
commit 61b4d8ef24
2 changed files with 36 additions and 6 deletions

View File

@ -477,24 +477,39 @@ namespace detail
BOOST_SYSTEM_CONST_INIT const system_error_category system_category_const;
BOOST_SYSTEM_CONST_INIT const generic_error_category generic_category_const;
BOOST_SYSTEM_DECL const error_category & system_category_ncx() BOOST_SYSTEM_NOEXCEPT
{
return system_category_const;
}
BOOST_SYSTEM_DECL const error_category & generic_category_ncx() BOOST_SYSTEM_NOEXCEPT
{
return generic_category_const;
}
} // namespace detail
#undef BOOST_SYSTEM_CONST_INIT
#else
BOOST_SYSTEM_DECL const error_category & system_category() BOOST_SYSTEM_NOEXCEPT
namespace detail
{
static const detail::system_error_category system_category_const;
BOOST_SYSTEM_DECL const error_category & system_category_ncx() BOOST_SYSTEM_NOEXCEPT
{
static const detail::system_error_category system_category_const;
return system_category_const;
}
BOOST_SYSTEM_DECL const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT
BOOST_SYSTEM_DECL const error_category & generic_category_ncx() BOOST_SYSTEM_NOEXCEPT
{
static const detail::generic_error_category generic_category_const;
return generic_category_const;
}
} // namespace detail
#endif
} // namespace system

View File

@ -361,7 +361,7 @@ namespace detail
BOOST_SYSTEM_CONSTEXPR inline const error_category & system_category() BOOST_SYSTEM_NOEXCEPT
{
static const detail::system_error_category system_category_const;
static const detail::system_error_category system_category_const;
return system_category_const;
}
@ -393,8 +393,23 @@ constexpr const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT
#else
BOOST_SYSTEM_DECL const error_category & system_category() BOOST_SYSTEM_NOEXCEPT;
BOOST_SYSTEM_DECL const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT;
namespace detail
{
BOOST_SYSTEM_DECL const error_category & system_category_ncx() BOOST_SYSTEM_NOEXCEPT;
BOOST_SYSTEM_DECL const error_category & generic_category_ncx() BOOST_SYSTEM_NOEXCEPT;
} // namespace detail
inline const error_category & system_category() BOOST_SYSTEM_NOEXCEPT
{
return detail::system_category_ncx();
}
inline const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT
{
return detail::generic_category_ncx();
}
#endif