Opened 11 years ago
Closed 10 years ago
#6248 closed Patches (fixed)
multi_pass_iterator not flushed automatically by expectation operator
Reported by: | Owned by: | Hartmut Kaiser | |
---|---|---|---|
Milestone: | Boost 1.54.0 | Component: | spirit |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | multi_pass_iterator, flush_multi_pass | Cc: |
Description
Parsing a 2GB file, multi_pass_iterator throws std::bad_alloc when it tries to push_back the ~1.2GB'th item, even though expectation operator is used with a record based file whose max record length is ~200 chars. For example:
start %= header > *rec;
I also tried:
start %= header > flush_multi_pass *rec;
which resulted in no effect.
note: 1.47.0 required modifying flush_multi_pass.hpp to be the same as 1.48.0 impl to avoid compilation errors
Attachments (1)
Change History (4)
by , 10 years ago
Attachment: | iterator.hpp.patch added |
---|
comment:1 by , 10 years ago
Milestone: | To Be Determined → Boost 1.54.0 |
---|---|
Type: | Bugs → Patches |
comment:2 by , 10 years ago
Owner: | changed from | to
---|
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
boost::spirit::lex::lexertl::iterator<Functor>
class has no functions specializations in traits namespace, which makes it to choose the default methods that do nothing (instead of callingclear_queue
).Attached patch for boost/spirit/home/lex/lexer/lexertl/iterator.hpp that fixes it.
P.S.:
boost::spirit::lex::lexertl::iterator<Functor>
also has no swap specialisation, which may lead to use of ineffectivestd::swap
.