Subject: [Boost-bugs] [Boost C++ Libraries] #4336: [spirit] A trait to access encoding-specific parsers
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-12 15:49:22
#4336: [spirit] A trait to access encoding-specific parsers
------------------------------+---------------------------------------------
Reporter: andysem | Owner: hkaiser
Type: Feature Requests | Status: new
Milestone: Boost 1.43.0 | Component: spirit
Version: Boost 1.44.0 | Severity: Not Applicable
Keywords: |
------------------------------+---------------------------------------------
Originated from
[http://article.gmane.org/gmane.comp.lib.boost.devel/205392 this]
discussion.
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:
{{{
template< typename CharT >
void parse(const CharT* str)
{
typedef typename my_traits< CharT >::encoding encoding;
typedef spirit::encoding_specific< encoding > parsers;
qi::parse(str, *parsers::char_);
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4336> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC