Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ambiguous complier error C2666 in vs2017.The '+' opeator may cause ambiguity. #962

Merged
merged 1 commit into from
Dec 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -2975,7 +2975,7 @@ class format_int {

// Formats value in reverse and returns a pointer to the beginning.
char *format_decimal(unsigned long long value) {
char *ptr = buffer_ + BUFFER_SIZE - 1;
char *ptr = buffer_ + static_cast<unsigned>(BUFFER_SIZE) - 1;
while (value >= 100) {
// Integer division is slow so do it for a group of two digits instead
// of for every digit. The idea comes from the talk by Alexandrescu
Expand Down