llvm-project/libcxx/test/std/input.output/iostream.format/output.streams/ostream.unformatted
Stephan T. Lavavej d7dc18e26d [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 1/7.
Given `std::basic_streambuf<CharT>::int_type __c`, `std::basic_string<CharT> str_`,
and having checked `__c != std::basic_streambuf<CharT>::traits_type::eof()` (substituting typedefs
for clarity), the line `str_.push_back(__c);` is safe according to humans, but truncates according
to compilers. `str_.push_back(static_cast<CharT>(__c));` avoids that problem.

Fixes D27538.

llvm-svn: 289105
2016-12-08 21:37:47 +00:00
..
flush.pass.cpp
put.pass.cpp [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 1/7. 2016-12-08 21:37:47 +00:00
write.pass.cpp [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 1/7. 2016-12-08 21:37:47 +00:00