Subject: Re: [boost] Bug reports - Showstoppers and Regressions
From: Ronald Garcia (rxg_at_[hidden])
Date: 2012-01-16 23:48:15
Listed under showstoppers is ticket 4874 for multi_array. To address this tag I need a language lawyer, and I am not one.
The issue is that VC 2010 under debug mode fails to compile multi_array because it's copy() function checks iterator tags. multi_array iterators have had input_iterator_tag but not output_iterator tag.
The outstanding question I have is whether it is necessary or even legal for an iterator to have an iterator_category that is somehow both input_iterator_tag AND output_iterator tag simultaneously.
First I say *legal* because in my copy of a standard draft, (24.3.3) says:
For every iterator of type Iterator, iterator_traits<Iterator>::iterator_category shall be defined to be the most specific category tag that describes the iterators behavior.
I'm unclear on whether that can be any tag other than the specific ones listed. In particular, can I inherit two tags to merge them.
Second, I say *necessary* because while input_iterator_tag, forward_iterator_tag, bidirectional_iterator_tag, and random_access_iterator_tag form an inheritance chain, none of them inherit from output_iterator_tag. Furthermore, const_iterators like "const int *" are not OutputIterators but seem to still be RandomAccessIterators. So in this case I'm not sure when (if ever) it is necessary to have an iterator category that is convertible to output_iterator_tag.
In fact, the Boost.Concept library doesn't ever even look at the iterator_category when checking OutputIterator concept. All uses of output_iterator_tag I can find in the standard are things like back_inserter and front_inserter, things that are not "really" iterators, so to speak.
So my question is: if I have an iterator that satisfies the expression requirements of InputIterator and OutputIterator,is there *any* wording in the C++ Standard that dictates what is legally the proper thing to do with its iterator_category? If so, where can I find it? If it should have input_iterator_tag, then there is a (quite reasonable) bug in VC++ 2010's debug mode. If it should have both, then I have a fix for multi_array. If there is no clear answer, then the standard is underspecified (and I'm happy to make multi_array play well with VC++).
On Jan 16, 2012, at 5:00 PM, Marshall Clow wrote:
> There are a couple of useful reports on svn.boost.org:
> Active Showstoppers: https://svn.boost.org/trac/boost/report/43
> Active Regressions: https://svn.boost.org/trac/boost/report/30
> To shortcut part of the discussion, here are some definitions (taken from https://svn.boost.org/trac/boost/wiki/TicketWorkflow):
> Showstopper - this problem is so bad, that we should hold up a release if it's not fixed. Note that the release managers and/or the library maintainers may have different opinions.
> Regression - something used to work (in a previous release), but no longer does.
> IMHO, these bugs should be at least looked at before each release.
> -- Marshall
> Marshall Clow Idio Software <mailto:mclow.lists_at_[hidden]>
> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
> -- Yu Suzuki
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk