Actions
Bug #2071
closedWStringStream warning with 64bit int
Start date:
07/30/2013
Due date:
% Done:
0%
Estimated time:
Description
size_t is std::set::size_t and according to the compiler, size_t is __int64.
1>C:\Users\hp\Wt\src\Wt/WStringStream(98): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
1> C:\Users\hp\Wt\src\PTCCosting\Application\ReferralView.cpp(76) : see reference to function template instantiation 'Wt::WStringStream &Wt::WStringStream::operator <<<unsigned __int64>(T)' being compiled
1> with
1> [
1> T=unsigned __int64
1> ]
Updated by Saif Rehman over 11 years ago
Just checked. It does not even insert into the stream. Input with int64 doesn't do anything.
Updated by Koen Deforche over 11 years ago
- Status changed from New to Feedback
Hey,
WStringStream does not support all integral types --- only signed types. You should thus either cast the value to a 'long long', or convert it a string first. Or use a std::stringstream instead --- WStringStream is only a more performance optimized version really.
Regards,
koen
Updated by Koen Deforche over 11 years ago
- Status changed from Feedback to Resolved
- Assignee set to Koen Deforche
- Target version set to 3.3.1
I've made sure it's an error now, not a warning
Updated by Koen Deforche over 11 years ago
- Status changed from Resolved to Closed
Actions