diff --git a/include/internal/catch_debugger.hpp b/include/internal/catch_debugger.hpp index 8c552661..32839bc7 100644 --- a/include/internal/catch_debugger.hpp +++ b/include/internal/catch_debugger.hpp @@ -82,7 +82,12 @@ #endif // Platform #ifdef CATCH_PLATFORM_WINDOWS - extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA( const char* ); + #if defined(_MSC_VER) && _MSC_VER >= 1700 + #define CATCH_INTERNAL_WINDOWS_SAL_IN_OPT _In_opt_ + #else + #define CATCH_INTERNAL_WINDOWS_SAL_IN_OPT + #endif + extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA( CATCH_INTERNAL_WINDOWS_SAL_IN_OPT const char* ); namespace Catch { void writeToDebugConsole( std::string const& text ) { ::OutputDebugStringA( text.c_str() );