Opened 12 years ago
#4336 new Feature Requests
[spirit] A trait to access encoding-specific parsers
| Reported by: | Andrey Semashev | Owned by: | Hartmut Kaiser |
|---|---|---|---|
| Milestone: | Boost 1.43.0 | Component: | spirit |
| Version: | Boost 1.44.0 | Severity: | Not Applicable |
| Keywords: | Cc: |
Description
Originated from 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_);
}
Attachments (2)
Change History (2)
by , 12 years ago
| Attachment: | common_terminals.hpp.diff added |
|---|
by , 12 years ago
| Attachment: | encoding_specific_impl.hpp added |
|---|
The implementation file to be placed in boost/spirit/home/support/detail
Note:
See TracTickets
for help on using tickets.

A patch for common_terminals.hpp adding the encoding_specific trait