Boost C++ Libraries: Ticket #2356: bug at compile time when using customized char_traits https://svn.boost.org/trac10/ticket/2356 <p> This is quite simple, <em>boost::iostream::stream</em> and <em>boost::iostream::stream_buffer</em> are obviously made to allow the usage of customized char_traits (I mean, a character trait class that is not some sort a specialization of <em>std::char_trait</em>), as we can guess it by looking at their optional second template argument. </p> <p> But when doing so, it does not compile (see test.cpp). This problem seems to come from an internal class of iostreams, <em>concept_adapter</em>, and one of its methods. As I can understand, that method forces a buffer to a type like <em>std::basic_buffer&lt;Any,std::char_traits&lt;Any&gt; &gt;</em>, which is incorrect (it should uses the character trait type passed as an argument to boost::iostreams::stream). </p> <p> The provided patch is working, but it just some trick to allow the code to compile. In the worst case that little helper class should be redesigned to add the character trait type to the list of its template parameters. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2356 Trac 1.4.3 Nicolas Vanhoren <nicolas.vanhoren@…> Sun, 21 Sep 2008 14:00:44 GMT attachment set https://svn.boost.org/trac10/ticket/2356 https://svn.boost.org/trac10/ticket/2356 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> <p> code to reproduce the bug </p> Ticket Nicolas Vanhoren <nicolas.vanhoren@…> Sun, 21 Sep 2008 14:01:04 GMT attachment set https://svn.boost.org/trac10/ticket/2356 https://svn.boost.org/trac10/ticket/2356 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">correction.diff</span> </li> </ul> <p> correction </p> Ticket Jonathan Turkanis Sun, 21 Sep 2008 22:28:19 GMT status changed https://svn.boost.org/trac10/ticket/2356#comment:1 https://svn.boost.org/trac10/ticket/2356#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Steven Watanabe Thu, 17 Jun 2010 02:32:08 GMT <link>https://svn.boost.org/trac10/ticket/2356#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2356#comment:2</guid> <description> <p> A better fix would be to eliminate basic_streambuf entirely, and make the argument a template parameter. This is consistent with the behavior of other filters. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 17 Jun 2010 02:52:46 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2356#comment:3 https://svn.boost.org/trac10/ticket/2356#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/63034" title="Make concept_adapter work with custom char_traits. Fixes #2356.">[63034]</a>) Make concept_adapter work with custom char_traits. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2356" title="#2356: Bugs: bug at compile time when using customized char_traits (closed: fixed)">#2356</a>. </p> Ticket