mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 13:19:48 +01:00
Enable [[noreturn]] some.
This commit is contained in:
committed by
Victor Zverovich
parent
2808395481
commit
aeb5ad3ce1
@@ -143,6 +143,12 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if FMT_EXCEPTIONS && FMT_HAS_CPP_ATTRIBUTE(noreturn)
|
||||
# define FMT_NORETURN [[noreturn]]
|
||||
#else
|
||||
# define FMT_NORETURN
|
||||
#endif
|
||||
|
||||
#ifndef FMT_DEPRECATED
|
||||
# if (FMT_HAS_CPP_ATTRIBUTE(deprecated) && __cplusplus >= 201402L) || \
|
||||
FMT_MSC_VER >= 1900
|
||||
@@ -350,7 +356,7 @@ struct error_handler {
|
||||
FMT_CONSTEXPR error_handler(const error_handler&) {}
|
||||
|
||||
// This function is intentionally not constexpr to give a compile-time error.
|
||||
FMT_API void on_error(const char* message);
|
||||
FMT_API FMT_NORETURN void on_error(const char* message);
|
||||
};
|
||||
|
||||
// GCC 4.6.x cannot expand `T...`.
|
||||
|
||||
Reference in New Issue
Block a user