mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-12 06:37:28 +00:00
Fix build on older gcc
This commit is contained in:
parent
d86e51e9c1
commit
63fcfc5798
@ -1520,7 +1520,8 @@ inline typename std::enable_if<PACKED, Value<typename Context::char_type>>::type
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <bool PACKED, typename Context, typename T>
|
template <bool PACKED, typename Context, typename T>
|
||||||
inline typename std::enable_if<!PACKED, format_arg>::type
|
inline typename std::enable_if<
|
||||||
|
!PACKED, basic_format_arg<typename Context::char_type>>::type
|
||||||
make_arg(const T& value) {
|
make_arg(const T& value) {
|
||||||
return MakeArg<Context>(value);
|
return MakeArg<Context>(value);
|
||||||
}
|
}
|
||||||
@ -1538,13 +1539,14 @@ class format_arg_store {
|
|||||||
internal::Value<char_type>, basic_format_arg<char_type>>::type value_type;
|
internal::Value<char_type>, basic_format_arg<char_type>>::type value_type;
|
||||||
|
|
||||||
// If the arguments are not packed, add one more element to mark the end.
|
// If the arguments are not packed, add one more element to mark the end.
|
||||||
std::array<value_type, NUM_ARGS + (PACKED ? 0 : 1)> data_;
|
typedef std::array<value_type, NUM_ARGS + (PACKED ? 0 : 1)> Array;
|
||||||
|
Array data_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const uint64_t TYPES = internal::make_type<Args..., void>();
|
static const uint64_t TYPES = internal::make_type<Args..., void>();
|
||||||
|
|
||||||
format_arg_store(const Args &... args)
|
format_arg_store(const Args &... args)
|
||||||
: data_{{internal::make_arg<PACKED, Context>(args)...}} {}
|
: data_(Array{internal::make_arg<PACKED, Context>(args)...}) {}
|
||||||
|
|
||||||
const value_type *data() const { return data_.data(); }
|
const value_type *data() const { return data_.data(); }
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user