mirror of
https://github.com/fmtlib/fmt.git
synced 2026-02-12 05:09:59 +08:00
Use `long double instead of int` to avoid warnings
This commit is contained in:
parent
d99c49b970
commit
3d4af9cd65
6
format.h
6
format.h
@ -773,9 +773,11 @@ class IsConvertibleToInt {
|
|||||||
typedef char no[2];
|
typedef char no[2];
|
||||||
|
|
||||||
static const T &get();
|
static const T &get();
|
||||||
static yes &check(fmt::ULongLong);
|
|
||||||
static no &check(...);
|
|
||||||
|
|
||||||
|
// Use ``long double`` instead of ``int`` to avoid warnings.
|
||||||
|
static yes &check(long double);
|
||||||
|
static no &check(...);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum { value = (sizeof(check(get())) == sizeof(yes)) };
|
enum { value = (sizeof(check(get())) == sizeof(yes)) };
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user