Search

CL crashes when compiel code with initializer_list by ixSci

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 771018
Opened: 11/14/2012 1:38:04 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
See the code below:
#include <initializer_list>

class A
{
public:
    A(std::initializer_list<int> list)
    {
    }
    A(std::initializer_list<double> list)
    {
    }
};

int main()
{
    A a{};
};

And cl crashes when try to compile it: error MSB6006: "CL.exe" exited with code -2147483645.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce

compile code from the description

Product Language

English

Operating System

Windows 8

Operating System Language

English

Actual results

CL crashes

Expected results

CL gives error about ambiguity
File Attachments
File Name Submitted By Submitted On File Size  
Test.7z 11/19/2012 9 KB
Sign in to post a comment.
Posted by Microsoft on 12/11/2012 at 11:17 AM
Hi:
    Thanks for reporting the issue.
    A fix for this issue has been checked into the compiler sources. The fix should show up in the next release of Visual C++.
    Compiler now gives the following error:

    error C2440: 'initializing' : cannot convert from 'initializer-list' to 'A'
        No constructor could take the source type, or constructor overload resolution was ambiguous

Xiang Fan
Visual C++ Team
Posted by Microsoft on 11/21/2012 at 2:26 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 ixSci on 11/19/2012 at 3:02 AM
Attached project. But you could make it as well. I've just created new console project.
Posted by Microsoft on 11/19/2012 at 2:49 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting a demo project. Please submit this information to us within 3 business days. We look forward to hearing from you with this information.
Posted by ixSci on 11/14/2012 at 7:46 PM
No, I'm using Microsoft Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)
Posted by Microsoft on 11/14/2012 at 6:36 PM
Hi ixSci, do you use the VS 2012 RC?
Posted by Microsoft on 11/14/2012 at 1:49 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.