Home Dashboard Directory Help
Search

The <initializer_list> header in the VC10 release candidate by Numpsy


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 533464
Opened: 2/13/2010 12:18:47 PM
Access Restriction: Public
0
Workaround(s)
view
3
User(s) can reproduce this bug

Description

The Visual Studio 2010 RC installs an <initializer_list> header, but it doesn't work properly (if you include it without including another std library header first, you get compiler errors related to _X_STD_BEGIN not being defined).


Is <initializer_list> actually supposed to be installed?
Details
Sign in to post a comment.
Posted by Microsoft on 10/30/2010 at 9:46 PM
Hi,

Thanks again for reporting this bug. We've fixed it by deleting <initializer_list> from VC11.

As always, if you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by Microsoft on 2/19/2010 at 6:48 PM
Hi,

Thanks for reporting this bug. This header was accidentally shipped. It shouldn't be included, because the C++0x Core Language feature of initializer lists and the associated Standard Library changes weren't implemented in VC10.

As you probably know, we license our C++ Standard Library implementation from Dinkumware, whose master sources target many compilers. When we updated our implementation to the latest version of their master sources, we picked up their support for initializer lists in addition to rvalue references, forward_list, and so forth. Because we decided against implementing initializer lists in the VC10 compiler (due to time constraints, we picked 6 Core Language features to implement in VC10), I stripped out the support for initializer lists that had made it into our headers (it was protected by a macro that was never defined). Unfortunately, I simply forgot that we had picked up <initializer_list> itself. Oops.

I'm keeping this bug active so that we remember to do something about it for VC11. Either we'll fully implement initializer lists (we haven't decided yet), or we'll remove <initializer_list> to avoid confusion. (It's too late to make cosmetic changes like removing a dead header between VC10 RC and RTM.)

If you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by Microsoft on 2/18/2010 at 6:33 PM
Thank you for uploading the repro project.
We were able to reproduce the issue you are seeing. We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Numpsy on 2/18/2010 at 10:23 AM
Attached a sample project.
Posted by Numpsy on 2/18/2010 at 10:21 AM
If you simply create a new C++ project and add an

#include <initializer_list>

and then try to build, you get the error:

c:\program files\microsoft visual studio 10.0\vc\include\initializer_list(13): error C2143: syntax error : missing ';' before ''template<''

It builds ok if you include another std lib header first (e.g. <string>).
Posted by Microsoft on 2/18/2010 at 1:11 AM
Hi,

To help us better understand the scenario, could you please attach some screenshots and a zipped project file to this feedback through our site?
Posted by Microsoft on 2/13/2010 at 7:12 PM
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.
File Name Submitted By Submitted On File Size  
test2.zip (restricted) 2/18/2010 -