#3815 closed Bugs (fixed)
Clearing an iterator range
Reported by: | Daniel James | Owned by: | Joel de Guzman |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | spirit |
Version: | Boost 1.41.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The attached test fails to compile with this error:
../quickbook-1.5/boost/spirit/home/support/attributes.hpp:710: error: 'class boost::iterator_range<const char*>' has no member named 'clear'
The problem is that iterator_range
looks enough like a container so that is_container
returns true, but it doesn't have a clear
method. The attached patch attempts to fix this by adding a special case to clear iterator ranges.
I used a slightly odd method to clear the range, because for some reason begin
is called for the cleared range (this may be a bug) and that's not allowed for default constructed ranges (since default constructed iterators can be singular).
Attachments (2)
Change History (4)
by , 13 years ago
by , 13 years ago
Attachment: | clear.patch added |
---|
comment:1 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
Note:
See TracTickets
for help on using tickets.
(In [59929]) Spirit: fixed #3815 (Clearing an iterator range)