Skip to content

Commit

Permalink
bring cout back
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 committed Oct 20, 2023
1 parent 4074253 commit 4eb326c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gsl/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <source_location.h>
#include <logging.h>

#include <sstream>

//
// Temporary until MSVC STL supports no-exceptions mode.
// Currently terminate is a no-op in this mode, so we add termination behavior back
Expand Down Expand Up @@ -116,7 +118,11 @@ namespace gsl
#if defined(GSL_MSVC_USE_STL_NOEXCEPTION_WORKAROUND)
(*gsl::details::get_terminate_handler())();
#else
LogPrintf("ERROR: error detected null not_null at %s:%d:%d in %s", loc.file_name(), loc.line(), loc.column(), loc.function_name());
std::ostringstream s;
s << "ERROR: error detected null not_null detected at " << loc.file_name() << ":" << loc.line() << ":"
<< loc.column() << ":" << loc.function_name() << "\n";
std::cout << s.str();
LogPrintf("%s", s.str()); /* Continued */
std::terminate();
#endif // defined(GSL_MSVC_USE_STL_NOEXCEPTION_WORKAROUND)
}
Expand Down

0 comments on commit 4eb326c

Please sign in to comment.