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 23:59:28
#1315: iterator_adaptor does not work with incomplete Value types
--------------------------------------+-------------------------------------
Reporter: joaquin | Owner: witt
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: iterator
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------
Changes (by dave):
* owner: dave => witt
* status: assigned => new
Comment:
Replying to [comment:4 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.
Technically, T* can't be instantiated, since it isn't a template.
> 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.
Exactly, a nice feature to have. I think this is a feature request...
which is why you've labelled it as such. OK, objection withdrawn ;-)
>
> > 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.
Thomas: I guess since operator[] has to be a member function, we wouldn't
gain anything by enable-if'ing it?
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1315#comment:5>
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