Synthesize parser only once from DSL: static storage duration
This commit is contained in:
parent
d3dbca374d
commit
221f70ac7b
@ -62,7 +62,7 @@ boost::optional<ParsedURL> parseURL(std::string::iterator &iter, const std::stri
|
|||||||
{
|
{
|
||||||
using It = std::decay<decltype(iter)>::type;
|
using It = std::decay<decltype(iter)>::type;
|
||||||
|
|
||||||
URLParser<It, ParsedURL> parser;
|
static URLParser<It, ParsedURL> const parser;
|
||||||
ParsedURL out;
|
ParsedURL out;
|
||||||
|
|
||||||
const auto ok = boost::spirit::qi::parse(iter, end, parser, out);
|
const auto ok = boost::spirit::qi::parse(iter, end, parser, out);
|
||||||
|
Loading…
Reference in New Issue
Block a user