Home Dashboard Directory Help
Search

std::list::splice() function implementation non-compliant with C++11 language standard. by willnut75


Status: 

Active


4
0
Sign in
to vote
Type: Bug
ID: 785388
Opened: 4/23/2013 7:08:05 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

The Visual Studio documentation on std::list::splice() [http://msdn.microsoft.com/en-us/library/72fb8wzd(v=vs.110).aspx] states the following:

“In all cases, only iterators or references that point at spliced elements become invalid"

This behaviour is not compliant with the C++11 language standard INCITS/ISO/IEC 14882-2011[2012].

Section 23.3.5.5 of the standard states :

"Pointers and references to the moved elements of x now refer to those same elements but as members of *this. Iterators referring
to the moved elements will continue to refer to their elements, but they now behave as iterators into *this, not into x"
Details
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:29 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 EPICS-CA on 2/25/2014 at 3:44 PM
The documentation for VS 2013 at the following URL appears to state clearly "In all cases, only iterators or references that point at spliced elements become invalid."

http://msdn.microsoft.com/en-us/library/72fb8wzd.aspx
Posted by Microsoft on 5/6/2013 at 10:22 AM
Hi,

Thanks for reporting this bug. We've fixed it, and the fix will be available in VC12 (the next major version after VC11 == VS 2012).

While I fixed all of list's splice() and merge() overloads, I didn't have time to fix forward_list's splice_after() and merge(). I've added that to my todo list so I won't forget.

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 4/24/2013 at 1:59 AM
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 Microsoft on 4/23/2013 at 7:53 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.