Fix compilation error if PACKED is defined before including FMT

Reduces the chance of conflicts between a macro declaration and the template argument name by using CamelCase (`PACKED` -> `IsPacked`)

Fixes #3632
This commit is contained in:
Gleb Mazovetskiy 2023-09-11 08:51:22 +01:00 committed by GitHub
parent d4987546a4
commit ade36e0a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1554,7 +1554,7 @@ constexpr auto encode_types() -> unsigned long long {
template <typename T, typename Char> struct type_is_unformattable_for;
#endif
template <bool PACKED, typename Context, typename T, FMT_ENABLE_IF(PACKED)>
template <bool IsPacked, typename Context, typename T, FMT_ENABLE_IF(IsPacked)>
FMT_CONSTEXPR FMT_INLINE auto make_arg(T& val) -> value<Context> {
using arg_type = remove_cvref_t<decltype(arg_mapper<Context>().map(val))>;
@ -1591,7 +1591,7 @@ FMT_CONSTEXPR auto make_arg(T& val) -> basic_format_arg<Context> {
return arg;
}
template <bool PACKED, typename Context, typename T, FMT_ENABLE_IF(!PACKED)>
template <bool IsPacked, typename Context, typename T, FMT_ENABLE_IF(!IsPacked)>
FMT_CONSTEXPR inline auto make_arg(T& val) -> basic_format_arg<Context> {
return make_arg<Context>(val);
}