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

Status : 


Sign in
to vote
ID 785388 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 4/23/2013 7:08:05 AM
Access Restriction Public


The Visual Studio documentation on std::list::splice() [] 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 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"
Sign in to post a comment.
Posted by Deon [MSFT] 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:
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."
Posted by Stephan [MSFT] on 5/6/2013 at 10:22 AM

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
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(