Suppress most likely false positive with GCC 13

This commit is contained in:
Björn Schäpers 2023-05-01 21:30:29 +02:00 committed by Björn Schäpers
parent 02cae7e48a
commit 43c805bb09

View File

@ -1671,7 +1671,14 @@ constexpr auto encode_types() -> unsigned long long {
template <typename Context, typename T>
FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value<Context> {
#if FMT_GCC_VERSION && FMT_GCC_VERSION >= 1300
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdangling-reference"
const auto& arg = arg_mapper<Context>().map(FMT_FORWARD(val));
# pragma GCC diagnostic pop
#else
const auto& arg = arg_mapper<Context>().map(FMT_FORWARD(val));
#endif
constexpr bool formattable_char =
!std::is_same<decltype(arg), const unformattable_char&>::value;