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

-Wsign-conversion warning with Clang10 on Windows #1747

Closed
0x8000-0000 opened this issue Jul 1, 2020 · 4 comments · Fixed by #1750
Closed

-Wsign-conversion warning with Clang10 on Windows #1747

0x8000-0000 opened this issue Jul 1, 2020 · 4 comments · Fixed by #1750

Comments

@0x8000-0000
Copy link
Contributor

include\fmt/format.h(560,71): error: implicit conversion changes signedness: 'std::size_t' (aka 'unsigned long long') to 'stdext::checked_array_iterator<char *>::difference_type' (aka 'long long') [-Werror,-Wsign-conversion]
std::uninitialized_copy(begin, end, make_checked(ptr_, capacity_) + size_);

@vitaut
Copy link
Contributor

vitaut commented Jul 1, 2020

Which {fmt} version?

@dcile
Copy link

dcile commented Jul 2, 2020

{fmt} >= 6.2.1

@0x8000-0000
Copy link
Contributor Author

std::uninitialized_copy(begin, end, make_checked(ptr_, capacity_) + size_);

@0x8000-0000
Copy link
Contributor Author

https://docs.microsoft.com/en-us/cpp/standard-library/checked-array-iterator-class?view=vs-2019#op_add takes a stdext::checked_array_iterator<T*>::difference_type as argument to operator +.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants