[Boost-bugs] [Boost C++ Libraries] #12698: base64 iterators can't be used with iterator_advance

Subject: [Boost-bugs] [Boost C++ Libraries] #12698: base64 iterators can't be used with iterator_advance
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-12-16 22:28:05


#12698: base64 iterators can't be used with iterator_advance
-------------------------------------------------+-------------------------
 Reporter: Johel Ernesto Guerrero Peña | Owner: ramey
  <johelegp@…> | Status: new
     Type: Bugs | Component:
Milestone: To Be Determined | serialization
  Version: Boost 1.62.0 | Severity: Problem
 Keywords: |
-------------------------------------------------+-------------------------
 {{{
 #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 [http://pastebin.com/raw/BSnShK1H 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
 [http://www.boost.org/doc/libs/1_62_0/libs/iterator/doc/transform_iterator.html
 #transform-iterator-synopsis 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12698>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC