mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Use C++11 compatible std::is_same operations
The `operator()` member function of `std::is_same` was added in C++14. For C++11, the `::value` needs to be used instead.
This commit is contained in:
parent
c8dd9cc99d
commit
40638a75b3
@ -1038,7 +1038,7 @@ void fallback_format(Double d, buffer<char>& buf, int& exp10) {
|
||||
// if T is a IEEE754 binary32 or binary64 and snprintf otherwise.
|
||||
template <typename T>
|
||||
int format_float(T value, int precision, float_specs specs, buffer<char>& buf) {
|
||||
static_assert(!std::is_same<T, float>(), "");
|
||||
static_assert(!std::is_same<T, float>::value, "");
|
||||
FMT_ASSERT(value >= 0, "value is negative");
|
||||
|
||||
const bool fixed = specs.format == float_format::fixed;
|
||||
@ -1113,7 +1113,7 @@ int snprintf_float(T value, int precision, float_specs specs,
|
||||
buffer<char>& buf) {
|
||||
// Buffer capacity must be non-zero, otherwise MSVC's vsnprintf_s will fail.
|
||||
FMT_ASSERT(buf.capacity() > buf.size(), "empty buffer");
|
||||
static_assert(!std::is_same<T, float>(), "");
|
||||
static_assert(!std::is_same<T, float>::value, "");
|
||||
|
||||
// Subtract 1 to account for the difference in precision since we use %e for
|
||||
// both general and exponent format.
|
||||
|
Loading…
Reference in New Issue
Block a user