Boost C++ Libraries: Ticket #4336: [spirit] A trait to access encoding-specific parsers https://svn.boost.org/trac10/ticket/4336 <p> Originated from <a class="ext-link" href="http://article.gmane.org/gmane.comp.lib.boost.devel/205392"><span class="icon">​</span>this</a> discussion. </p> <p> The attached patch allows to gain access to the encoding-specific parsers by specifying the encoding type to the encoding_specific template parameter. This allows the following use case: </p> <pre class="wiki"> template&lt; typename CharT &gt; void parse(const CharT* str) { typedef typename my_traits&lt; CharT &gt;::encoding encoding; typedef spirit::encoding_specific&lt; encoding &gt; parsers; qi::parse(str, *parsers::char_); } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4336 Trac 1.4.3 Andrey Semashev Sat, 12 Jun 2010 15:50:36 GMT attachment set https://svn.boost.org/trac10/ticket/4336 https://svn.boost.org/trac10/ticket/4336 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">common_terminals.hpp.diff</span> </li> </ul> <p> A patch for common_terminals.hpp adding the encoding_specific trait </p> Ticket Andrey Semashev Sat, 12 Jun 2010 15:52:15 GMT attachment set https://svn.boost.org/trac10/ticket/4336 https://svn.boost.org/trac10/ticket/4336 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">encoding_specific_impl.hpp</span> </li> </ul> <p> The implementation file to be placed in boost/spirit/home/support/detail </p> Ticket