Home Dashboard Directory Help
Search

[C++11] Simple allocator without "rebind" member class template should work nevertheless by Thomas Petit


Status: 

Closed


1
0
Sign in
to vote
Type: Bug
ID: 762094
Opened: 9/11/2012 7:17:13 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

The SimpleAllocator example provided by the C++11 standard (§ 17.6.3.5), which is an allocator showing the minimal interface that satisfies the requirements, doesn't compile when used in a std::vector (or other container) with VC11 RC1.

It looks like std::vector if the member class template "rebind" of the allocator is missing doesn't fallback to the one provided by std::allocator_traits.




Details
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 3/15/2013 at 7:41 PM
Hi,

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

We've used variadic templates to implement N3485 17.6.3.5 [allocator.requirements]/3: "If Allocator is a class template instantiation of the form SomeAllocator<T, Args>, where Args is zero or more type arguments, and Allocator does not supply a rebind member template, the standard allocator_traits template uses SomeAllocator<U, Args> in place of Allocator::rebind<U>::other by default. For allocator types that are not template instantiations of the above form, no default is provided."

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 9/11/2012 at 6:40 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)
Sign in to post a workaround.