mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Replace fmt::is_same with std::is_same
This commit is contained in:
12
fmt/printf.h
12
fmt/printf.h
@ -70,16 +70,6 @@ class IsZeroInt {
|
|||||||
operator()(T) { return false; }
|
operator()(T) { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename U>
|
|
||||||
struct is_same {
|
|
||||||
enum { value = 0 };
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
struct is_same<T, T> {
|
|
||||||
enum { value = 1 };
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T, typename Context>
|
template <typename T, typename Context>
|
||||||
class ArgConverter {
|
class ArgConverter {
|
||||||
private:
|
private:
|
||||||
@ -102,7 +92,7 @@ class ArgConverter {
|
|||||||
operator()(U value) {
|
operator()(U value) {
|
||||||
bool is_signed = type_ == 'd' || type_ == 'i';
|
bool is_signed = type_ == 'd' || type_ == 'i';
|
||||||
typedef typename internal::conditional<
|
typedef typename internal::conditional<
|
||||||
is_same<T, void>::value, U, T>::type TargetType;
|
std::is_same<T, void>::value, U, T>::type TargetType;
|
||||||
if (sizeof(TargetType) <= sizeof(int)) {
|
if (sizeof(TargetType) <= sizeof(int)) {
|
||||||
// Extra casts are used to silence warnings.
|
// Extra casts are used to silence warnings.
|
||||||
if (is_signed) {
|
if (is_signed) {
|
||||||
|
Reference in New Issue
Block a user