Closed akrzemi1 closed 9 months ago
Yeah. That's because ATTR(x) >> ATTR(x)
is std::vector<ATTR(x)>
in the general case as far as I know. The ascii parsers have char
attributes, so they produce std::vector<char>
, but there's a special case that makes that std::string
instead.
That has changed in my lib in the last week or so. Remember #36? I used to take adjacent attributes of any type T
and give them the attribute type std::vector<T>
. I no longer do that. There were technical reasons why, but moreover, If I write int_ >> int_
I want two ints. I did not say anything about an unbounded sequence of ints. It just plain feels wrong to me that int_ >> int_
should produce a std::vector<int>
instead of a std::tuple<int, int>
.
Another Parser vs Spirit comparison. Apparently, Boost.Spirit assigns to a sequence of
ascii
parsers a stirng-attribute.