[Boost-bugs] [Boost C++ Libraries] #9293: multi_index_container iterator needs base object size

Subject: [Boost-bugs] [Boost C++ Libraries] #9293: multi_index_container iterator needs base object size
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-23 04:24:27


#9293: multi_index_container iterator needs base object size
------------------------------+-------------------------
 Reporter: anonymous | Owner: joaquin
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: multi_index
  Version: Boost 1.46.0 | Severity: Problem
 Keywords: multi_index_set |
------------------------------+-------------------------
 The reason this is a bug is because I cannot define 2 classes A&B that
 will be stored in sequenced containers, and have A&B each hold an iterator
 to the other's container.

 For example, this works:
 {{{
 struct A;
 struct B {
   std::list<A>::iterator a_it;
 };
 struct A {
   std::list<B>::iterator b_it;
 };
 }}}

 However, if I want to replace both lists with sequenced
 multi_index_containers, I can no longer compile it.

 The problem is that the iterator to a multi_index_container somehow calls
 sizeof on the stored class, so the forward declaration is not enough to
 compile.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9293>
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:14 UTC