[C++11] STL containers must use std::allocator_trait in debug mode - by Thomas Petit

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 762103 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 9/11/2012 7:47:28 AM
Access Restriction Public


A simple Allocator, similar to the one provided by the C++11 standard (§, used in a std::vector does compile in release but not in debug with VC2012 RC.

It looks like at some point, the additional machinery used in debug mode try to use directly the construct() function, which is not present in the interface of SimpleAllocator. It should use std::allocator_trait<SimpleAllocator>::construct() instead.

Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:32 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 5/10/2013 at 5:29 PM

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

Additionally, the STL has received a separate fix, so you don't need to provide the nested rebind struct (C++11 still requires you to provide the templated constructor for rebinding).

I apologize for the delayed reply here - it is my personal policy to reply to all resolved Connect bugs reported against the STL, but I lost track of this one.

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 9/11/2012 at 7:02 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Microsoft Visual Studio Connect Support Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 9/11/2012 at 7:52 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)