From aaeca12d8920e541334006a3ef9c92d16805ec1f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 13 Sep 2021 07:51:36 -0700 Subject: [PATCH] Move FMT_MAYBE_UNUSED to format.h where it is used --- include/fmt/core.h | 8 -------- include/fmt/format.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 6d4196a4..1b8118d4 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -159,14 +159,6 @@ # define FMT_NORETURN #endif -#ifndef FMT_MAYBE_UNUSED -# if FMT_HAS_CPP17_ATTRIBUTE(maybe_unused) -# define FMT_MAYBE_UNUSED [[maybe_unused]] -# else -# define FMT_MAYBE_UNUSED -# endif -#endif - #if __cplusplus == 201103L || __cplusplus == 201402L # if defined(__INTEL_COMPILER) || defined(__PGI) # define FMT_FALLTHROUGH diff --git a/include/fmt/format.h b/include/fmt/format.h index c94fbece..79d01d69 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -128,6 +128,14 @@ FMT_END_NAMESPACE # endif #endif +#ifndef FMT_MAYBE_UNUSED +# if FMT_HAS_CPP17_ATTRIBUTE(maybe_unused) +# define FMT_MAYBE_UNUSED [[maybe_unused]] +# else +# define FMT_MAYBE_UNUSED +# endif +#endif + // Workaround broken [[deprecated]] in the Intel, PGI and NVCC compilers. #if FMT_ICC_VERSION || defined(__PGI) || FMT_NVCC # define FMT_DEPRECATED_ALIAS