mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 03:07:36 +02:00
Workaround a bug in MSVC2010 (#188)
Due to broken lookup rules, MSVC finds fmt::internal::check instead of IsConvertibleToInt::check.
This commit is contained in:
6
format.h
6
format.h
@ -857,11 +857,11 @@ class IsConvertibleToInt {
|
|||||||
|
|
||||||
static const T &get();
|
static const T &get();
|
||||||
|
|
||||||
static yes &check(fmt::ULongLong);
|
static yes &convert(fmt::ULongLong);
|
||||||
static no &check(...);
|
static no &convert(...);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum { value = (sizeof(check(get())) == sizeof(yes)) };
|
enum { value = (sizeof(convert(get())) == sizeof(yes)) };
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FMT_CONVERTIBLE_TO_INT(Type) \
|
#define FMT_CONVERTIBLE_TO_INT(Type) \
|
||||||
|
Reference in New Issue
Block a user