mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd::spirit: Additional boost iterator ctors for substring_view.
This commit is contained in:
parent
03c69de789
commit
d59d1a8060
1 changed files with 11 additions and 7 deletions
|
@ -137,16 +137,20 @@ boost::spirit::qi::make_primitive<ircd::spirit::tag::custom2, modifiers>
|
|||
struct ircd::spirit::substring_view
|
||||
:ircd::string_view
|
||||
{
|
||||
using _iterator = boost::spirit::karma::detail::indirect_iterator<const char *>;
|
||||
using _iterator = const char *;
|
||||
using _iterator_range = boost::iterator_range<_iterator>;
|
||||
using _indirect_iterator = karma::detail::indirect_iterator<_iterator>;
|
||||
using _indirect_iterator_range = boost::iterator_range<_indirect_iterator>;
|
||||
|
||||
explicit substring_view(const _iterator_range &range)
|
||||
:ircd::string_view(std::addressof(*range.begin()), std::addressof(*range.end()))
|
||||
{}
|
||||
|
||||
explicit substring_view(const _indirect_iterator_range &range)
|
||||
:ircd::string_view(std::addressof(*range.begin()), std::addressof(*range.end()))
|
||||
{}
|
||||
|
||||
using ircd::string_view::string_view;
|
||||
explicit substring_view(const _iterator_range &range)
|
||||
:ircd::string_view
|
||||
{
|
||||
std::addressof(*range.begin()), std::addressof(*range.end())
|
||||
}
|
||||
{}
|
||||
};
|
||||
|
||||
/// Execute the parse. The start pointer is advanced upon successful execution.
|
||||
|
|
Loading…
Reference in a new issue