mirror of
https://github.com/boostorg/system.git
synced 2025-08-01 05:24:26 +02:00
Update std_interop_test12.cpp
This commit is contained in:
@@ -92,7 +92,11 @@ template<> struct std::is_error_code_enum<my_errc>: std::true_type {};
|
|||||||
|
|
||||||
boost::system::error_code make_error_code( my_errc e )
|
boost::system::error_code make_error_code( my_errc e )
|
||||||
{
|
{
|
||||||
static BOOST_SYSTEM_CONSTEXPR my_category cat;
|
// If `cat` is declared constexpr or const, msvc-14.1 and
|
||||||
|
// msvc-14.2 before 19.29 put it in read-only memory,
|
||||||
|
// despite the `ps_` member being mutable. So it crashes.
|
||||||
|
|
||||||
|
static /*BOOST_SYSTEM_CONSTEXPR*/ my_category cat;
|
||||||
return boost::system::error_code( e, cat );
|
return boost::system::error_code( e, cat );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user