-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Checked iterator warnings when building with MSVC 2015 #1947
Comments
Are you referring to MSVC 2015 by msvc14? What errors do you get? The current master compiles fine on 2015: https://ci.appveyor.com/project/vitaut/fmt/builds/35876519. |
By MSVC 14 I refer myself to VS2015, if its that what are you asking(v140). It gives me problem at std:copy_n. It says that its copying a memory using unchecked limits in iterators. Actually, this isnt a bug but msvc doesnt like using std copy without using aditional stuff from stdext. I had this problem in a case when i was trying copy data from a buffer to a different destination using only pointers. Once I used stdext::checked_array_iterator the error disappear. By the way, I checked the build you posted and it gives the same messages (and the same problem with std copy), the only difference is that mine fails at the end. Maybe the problem is some configuration values in my project |
One repro from #2092: #include <fmt/core.h>
int main() {
fmt::format(L"{}_{:04d}-{:02d}-{:02d}{}", L"filename", 2020, 1, 12, L".txt"};
} |
Still not fixed
Line 451 in e718ec3
Compiled with |
Hello. I'm also using
and
Here's the minimal example to reproduces the issue (taken from https://fmt.dev/latest/api.html#chrono-api): #include <fmt/chrono.h>
const std::time_t t = std::time(nullptr);
fmt::print("{:%Y-%m-%d}", fmt::localtime(t)); |
Suppressed the warnings in ab7c33e. |
Good job, it's now working with SDL checks on. |
Downloaded, compiled, tested and everything works ok. Good job and thank you |
Hi, I'm using spdlog which uses your library. I tried to update the spdlog version but my project failed to build because fmt dont use stdext checked iterartor utilities at std copy calls in include\fmt\format.h(3016). Compiler says that it can be avoided if I desable certain warnings, but I dont want to do this unless its strictly neccessary. For now I solved it downloading and older version of fmt but It would be nice to dont have to depend from an older version to avoid compatibility problems. Thanks for the help.
The text was updated successfully, but these errors were encountered: