Skip to content

Commit

Permalink
Workaround a bug in MSVC2010 (#188)
Browse files Browse the repository at this point in the history
Due to broken lookup rules, MSVC finds fmt::internal::check
instead of IsConvertibleToInt::check.
  • Loading branch information
vitaut committed Jul 10, 2015
1 parent e498ffb commit 76d1218
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions format.h
Original file line number Diff line number Diff line change
Expand Up @@ -857,11 +857,11 @@ class IsConvertibleToInt {

static const T &get();

static yes &check(fmt::ULongLong);
static no &check(...);
static yes &convert(fmt::ULongLong);
static no &convert(...);

public:
enum { value = (sizeof(check(get())) == sizeof(yes)) };
enum { value = (sizeof(convert(get())) == sizeof(yes)) };
};

#define FMT_CONVERTIBLE_TO_INT(Type) \
Expand Down

0 comments on commit 76d1218

Please sign in to comment.