Suppress msvc warnings

This commit is contained in:
Dmitry Arkhipov 2021-12-25 12:37:46 +03:00
parent a1c4475aed
commit bd9891f73f
2 changed files with 17 additions and 0 deletions

View File

@ -72,7 +72,14 @@ public:
boost::json::error_code& ec)
{
close();
#if defined(_MSC_VER)
# pragma warning( push )
# pragma warning( disable : 4996 )
#endif
f_ = std::fopen( path, mode );
#if defined(_MSC_VER)
# pragma warning( pop )
#endif
if( ! f_ )
return fail(ec);
if( std::fseek( f_, 0, SEEK_END ) != 0)

View File

@ -458,6 +458,13 @@ public:
make_shared_resource(Args&&... args);
};
#if defined(_MSC_VER)
# pragma warning( push )
# if !defined(__clang__) && _MSC_VER <= 1900
# pragma message( "MSVC " )
# pragma warning( disable : 4702 )
# endif
#endif
/** Return shared ownership of a new, dynamically allocated memory resource.
This function dynamically allocates a new memory resource
@ -493,6 +500,9 @@ make_shared_resource(Args&&... args)
detail::shared_resource_impl<T>(
std::forward<Args>(args)...));
}
#if defined(_MSC_VER)
# pragma warning( pop )
#endif
/** Return true if two storage pointers point to the same memory resource.