Add comment to explain why std::fprintf
This commit is contained in:
parent
e350e011d2
commit
ef8c9af400
@ -49,6 +49,8 @@ FMT_BEGIN_NAMESPACE
|
|||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
|
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);
|
std::fprintf(stderr, "%s:%d: assertion failed: %s", file, line, message);
|
||||||
// Chosen instead of std::abort to satisfy Clang in CUDA mode during device
|
// Chosen instead of std::abort to satisfy Clang in CUDA mode during device
|
||||||
// code pass.
|
// code pass.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user