mkxp-z/subprojects/packagefiles/boost_assert-snprintf.patch

20 lines
694 B
Diff

# Polyfills `std::snprintf` on platforms where it isn't provided by the C++ standard library.
--- a/include/boost/assert/source_location.hpp
+++ b/include/boost/assert/source_location.hpp
@@ -76,11 +76,11 @@ public:
# pragma warning( disable: 4996 )
#endif
-#if ( defined(_MSC_VER) && _MSC_VER < 1900 ) || ( defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) )
-# define BOOST_ASSERT_SNPRINTF(buffer, format, arg) std::sprintf(buffer, format, arg)
-#else
+
+
+#include "../../../../../src/mkxp-polyfill.h"
# define BOOST_ASSERT_SNPRINTF(buffer, format, arg) std::snprintf(buffer, sizeof(buffer)/sizeof(buffer[0]), format, arg)
-#endif
+
std::string to_string() const
{