Add conditional defined FMT_MAYBE_UNUSED

This commit is contained in:
denchat 2019-05-10 17:38:57 +07:00 committed by GitHub
parent b6db4b8a26
commit 9155a22af6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,6 +80,16 @@
# define FMT_CONSTEXPR11
#endif
#ifndef FMT_USE_MAYBE_UNUSED
# define FMT_USE_MAYBE_UNUSED \
(__cplusplus >= 201703L)
#endif
#if FMT_USE_MAYBE_UNUSED
# define FMT_MAYBE_UNUSED [[maybe_unused]]
#else
# define FMT_MAYBE_UNUSED
#endif
#ifndef FMT_OVERRIDE
# if FMT_HAS_FEATURE(cxx_override) || \
(FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900