[Boost-bugs] [Boost C++ Libraries] #5965: indirect_iterator conflicts with forward declaration

Subject: [Boost-bugs] [Boost C++ Libraries] #5965: indirect_iterator conflicts with forward declaration
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-30 10:12:33


#5965: indirect_iterator conflicts with forward declaration
--------------------------------------------+-------------------------------
 Reporter: Simon <simon.siemens@…> | Owner: dave
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: iterator
  Version: Boost 1.46.1 | Severity: Problem
 Keywords: |
--------------------------------------------+-------------------------------
 indirect_iterator, or more precisely its base class indirect_base, checks
 whether it can dereference its argument twice. This ends in an error, if
 the target type is incomplete (from a forward declaration). The error
 occurs even if the dereferencing is not used in the affected code unit.
 (It is concept checking.)

 /usr/include/boost/detail/is_incrementable.hpp:84: error: cannot increment
 a pointer to incomplete type ‘Derived’

 indirect_iterator handles pointers. Pointers and forward declaration
 should complete each other well. So indirect_iterator should never try to
 dereference if it is not forced by using code. Concept checking does not
 work here satisfactorily.

 I appended exemplary code which I compiled with GCC 4.4.3.

 Best regards,

 Simon

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