Opened 6 years ago
Closed 5 years ago
#12698 closed Bugs (fixed)
base64 iterators can't be used with iterator_advance
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.62.0 | Severity: | Problem |
Keywords: | Cc: |
Description
#include <boost/container/string.hpp> #include <boost/archive/iterators/binary_from_base64.hpp> int main() { using String = boost::container::string; using Iterator = boost::archive::iterators::binary_from_base64<String::iterator>; String s; s.assign(Iterator{s.begin()},Iterator{s.end()}); }
This code causes a compilation error because all overloads of iterator_advance in boost/intrusive/detail/iterator.hpp are disabled.
I tried changing the 54th line in boost/intrusive/detail/iterator.hpp from
< ::boost::move_detail::is_same
to
< ::boost::move_detail::is_convertible
because the transform_iterator synopsis mentions that it should be convertible, and it worked.
However, I'm not sure about the correctness of this solution, nor if the problem really lies in the serialization component and not elsewhere.
Change History (2)
comment:1 by , 5 years ago
Owner: | changed from | to
---|
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for the report. Commit:
https://github.com/boostorg/intrusive/commit/db14782f0f7aa72b502b6296f0543ac0457d497e
fixes this problem.
forwarding this to the maintainer of boost::intrusive
Robert Ramey