-
Notifications
You must be signed in to change notification settings - Fork 214
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
MSVC Warning: C4244 'initializing': conversion from 'CoordinateType' to 'const PromotedType', possible loss of data #629
Comments
This is still a problem in boost 1.72.0. |
This is still a problem in boost 1.73.0. |
I think it should be safe to @awulkiew What do you think? |
Hello, I have a similar problem on Windows using msvc14.1. On linux there is no warning by the way. I created a minimal example:
I than tracked it back to
And got the following errors:
Where the 4th line is the interesting one. Why is the |
This is still a problem in 1.75.0. |
This is still a problem in 1.79.0. |
Seems unmaintained. |
This is still a problem in 1.83.0. |
still problem in 1.84.0 boost_1_84_0\boost\range\irange.hpp(168,32): warning C4244: 'return': conversion from '__int64' to 'int', possible loss of data |
Minimal Code to produce related warning (boost 1.70.0 MSVC 2017 15.8.0 /std:c++latest /W4):
If the
std::int64_t
in the above is changed toint
there is no warning.On line 245 (side_by_triangle.hpp) boost decides the type of PromotedType =
select_most_precise<double,std::int64_t>
=>double
. And then initializes PromotedType values withstd::int64_t
values.This pattern of select_most_precise<double,...> is pretty common, and I have found the same warning being produced in other parts of boost that do the same thing when using with
std::int64_t
.The text was updated successfully, but these errors were encountered: