Boost C++ Libraries: Ticket #9536: narrow-conversion uses insufficient input char type https://svn.boost.org/trac10/ticket/9536 <p> Test runs exhibit this problem: </p> <pre class="wiki">compile-c-c++ ..\..\..\bin.v2\libs\date_time\test\teststreams.test\msvc-12.0\debug\address-model-64\posix_time\teststreams.obj teststreams.cpp boost/date_time/posix_time/posix_time_legacy_io.hpp(83) : warning C4244: 'argument' : conversion from 'wchar_t' to 'char', possible loss of data posix_time\teststreams.cpp(144) : see reference to function template instantiation 'std::basic_istream&lt;wchar_t,std::char_traits&lt;wchar_t&gt;&gt; &amp;boost::posix_time::operator &gt;&gt;&lt;wchar_t&gt;(std::basic_istream&lt;wchar_t,std::char_traits&lt;wchar_t&gt;&gt; &amp;,boost::posix_time::time_duration &amp;)' being compiled </pre><p> The current implementation uses std::stringstream::narrow(char) with its 'char' input parameter type to transform 'charT' chars taken from a std::basic_istream&lt;charT&gt; into 'char' chars. This is most likely not what is intended if 'charT' is wider than 'char'. </p> <p> Tests were run against Boost version 1.55.0 and latest 'development' branch using vc10, vc11, and vc12. Test logs are attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9536 Trac 1.4.3 dani@… Mon, 30 Dec 2013 17:21:09 GMT attachment set https://svn.boost.org/trac10/ticket/9536 https://svn.boost.org/trac10/ticket/9536 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">date-time-testlogs.7z</span> </li> </ul> Ticket dani@… Mon, 30 Dec 2013 17:32:35 GMT <link>https://svn.boost.org/trac10/ticket/9536#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9536#comment:1</guid> <description> <p> Pull request <a class="ext-link" href="https://github.com/boostorg/date_time/pull/1"><span class="icon">​</span>https://github.com/boostorg/date_time/pull/1</a> fixes this problem. The attached test logs show the warning is gone now. </p> </description> <category>Ticket</category> </item> </channel> </rss>