Add comment to explain why std::fprintf

This commit is contained in:
Tobias Hammer 2020-06-30 10:18:51 +02:00
parent e350e011d2
commit ef8c9af400

View File

@ -49,6 +49,8 @@ FMT_BEGIN_NAMESPACE
namespace detail {
FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
// Use unchecked std::fprintf to avoid triggering another assertion when
// writing to stderr fails
std::fprintf(stderr, "%s:%d: assertion failed: %s", file, line, message);
// Chosen instead of std::abort to satisfy Clang in CUDA mode during device
// code pass.