Home Dashboard Directory Help
Search

std::forward_iterator_tag derives from std::output_iterator_tag by mfhava


Status: 

Closed


1
0
Sign in
to vote
Type: Bug
ID: 775231
Opened: 12/27/2012 10:53:08 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

The current implementation of IteratorTags has the following error:
std::forward_iterator_tag derives from std::output_iterator_tag and std::input_iterator_tag. According to the current standard it should ONLY derive from std::input_iterator_tag!
Details
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:31 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from: http://go.microsoft.com/?linkid=9832436
Posted by Microsoft on 2/11/2013 at 4:18 PM
Hi,

Thanks for reporting this bug. We've fixed it, and the fix will be available in VC12. (Our version numbers are: VC8 = VS 2005, VC9 = VS 2008, VC10 = VS 2010, VC11 = VS 2012.)

With my fix, forward_iterator_tag no longer derives from output_iterator_tag. However, this wasn't a one-line fix. We had many algorithm helpers overloaded on (input, output) versus (random, random) to perform additional range-checking in debug mode when possible. My fix introduces an internal tag that both output_iterator_tag and forward_iterator_tag derive from, and modifies the algorithm helpers accordingly. This internal tag does not affect strictly conforming user code, so it is "invisible".

Note: Connect doesn't notify me about comments. If you have any further questions, please E-mail me.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
stl@microsoft.com
Posted by Microsoft on 1/2/2013 at 12:18 AM
Hi DEB5F, thanks for your help.
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by mfhava on 12/28/2012 at 11:25 AM
The standard defines the hierarchy of the tags in §24.3:
Quote:
"
struct input_iterator_tag { };
struct output_iterator_tag { };
struct forward_iterator_tag: public input_iterator_tag { };
struct bidirectional_iterator_tag: public forward_iterator_tag { };
"

The current implementation is located in your internal header file: "xutility"
Posted by Microsoft on 12/27/2012 at 11:46 PM
Hi DEB5F, please help me find the definition. Thanks.
Posted by Microsoft on 12/27/2012 at 11:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.