Re: [Boost-bugs] [Boost C++ Libraries] #1315: iterator_adaptor does not work with incomplete Value types

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1315: iterator_adaptor does not work with incomplete Value types
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-04-24 19:11:08


#1315: iterator_adaptor does not work with incomplete Value types
--------------------------------------+-------------------------------------
  Reporter: joaquin | Owner: dave
      Type: Feature Requests | Status: assigned
 Milestone: To Be Determined | Component: iterator
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------
Comment (by joaquin):

> I think your analysis is correct, but my question to you is: why should
 this be considered a bug?


 Because T*, which is the type upon which iterators are modelled, can be
 instantiated on incomplete types. I've checked section 24.1 of the
 standard and this requirement does not seem to be explicitly stated, but
 IMHO it's a nice feature to have, given that 24.1.2 recognized iterators
 as an abstraction of pointers. FWIW, I first encountered the problem in
 the context of a real situation.


> I can only think of one way around it, and that's to templatize
 operator[]


 Correct. Please see

 http://lists.boost.org/Archives/boost/2007/10/128738.php

 where I propose a possible implementation of the workaround.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1315#comment:4>
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:49:57 UTC