Boost C++ Libraries: Ticket #5628: filter_iterator - cannot convert from 'char' to 'char &' https://svn.boost.org/trac10/ticket/5628 <p> MSVS 2008 - error C2440: 'return' : cannot convert from 'char' to 'char &amp;' d:\projects\...\boost\archive\iterators\remove_whitespace.hpp 117 </p> <pre class="wiki">std::ifstream ifs_("test.arc", std::ios_base::in|std::ios_base::binary); std::ofstream ofs_("test.rez", std::ios_base::out|std::ios_base::binary); typedef boost::archive::iterators::transform_width&lt; boost::archive::iterators::binary_from_base64&lt; boost::archive::iterators::remove_whitespace&lt;std::istreambuf_iterator&lt;char&gt; &gt; &gt;, 8, 6 &gt; base64_to_bin_t; std::copy( base64_to_bin_t(std::istreambuf_iterator&lt;char&gt;(ifs_&gt;&gt; std::noskipws) ) , base64_to_bin_t(std::istreambuf_iterator&lt;char&gt;() ) , std::ostreambuf_iterator&lt;char&gt;(ofs_) ); </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5628 Trac 1.4.3 Dave Abrahams Wed, 22 Jun 2011 16:31:47 GMT owner, component changed https://svn.boost.org/trac10/ticket/5628#comment:1 https://svn.boost.org/trac10/ticket/5628#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Dave Abrahams</span> to <span class="trac-author">Robert Ramey</span> </li> <li><strong>component</strong> <span class="trac-field-old">iterator</span> → <span class="trac-field-new">serialization</span> </li> </ul> Ticket Robert Ramey Thu, 23 Jun 2011 04:10:05 GMT <link>https://svn.boost.org/trac10/ticket/5628#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5628#comment:2</guid> <description> <p> I'm curious about context here. In your test case, the file is opened for binary i/o, BUT we're using the base64 to binary conversion. base64 to binary conversion really only makes sense for text i/o. </p> <p> Having said that, I don't think it should hit any kind of bug but I can't see where it's coming from. Feel free to add a little more information. </p> <p> Robert Ramey </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Thu, 23 Jun 2011 04:58:08 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5628#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5628#comment:3</guid> <description> <p> I looked into this a little bit. </p> <p> Note that I made my own istream_iterator.hpp. I don't remember why I did this, but it would well be that the std::istream_iterator manifested this problem. Basically, the standard istream iterator is a single pass iterator so once a character is read, it has to be passed by value as there is no guarantee that the original character address makes any sense. I guess this conflicted with my iterator stack template meta programming implemenation so I had to make my own version. I can only speculate now as it was a long time ago. </p> <p> Note that my case is different in that I am/was using istream_iterator and you're using istreambuf iterator. (This is the first time I've seen this). </p> <p> In any case, I think that solves the mystery. Whether or not it addresses your interest I can't say but I can say I don't think it's an issue with the serialization library. </p> <p> Robert Ramey </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Thu, 23 Jun 2011 04:58:25 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5628#comment:4 https://svn.boost.org/trac10/ticket/5628#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> Ticket