Home Dashboard Directory Help
Search

Public Parameterless Constructor Not Found in VC++ by hasenpfeffer2


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 676125
Opened: 6/20/2011 9:24:48 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
1
Workaround(s)
view
1
User(s) can reproduce this bug

Description

The Visual C++ compiler is unable to find a public parameterless constructor when attempting to externally consume a class that references itself within multiple generics. The error does not appear using C#. The class library builds successfully. Visual C++ app results in a C3392 error, while C# app builds successfully.

I have been unable to figure out a workaround.
Details
Sign in to post a comment.
Posted by Microsoft on 9/20/2011 at 3:20 PM
Hi: this issue has been fixed. The fix should show up in a future release of Visual C++.

Thank you for reporting the issue.

Jonathan Caves
Visual C++ Compiler Team
Posted by hasenpfeffer2 on 6/21/2011 at 9:56 AM
Using getter/setter methods directly in place of the property 'p' does seem to work around the issue. I tried this technique in my actual project with successful results. Thanks. This isn't preferred, but should allow me to move forward.
Posted by MS-Moderator10 [Feedback Moderator] on 6/20/2011 at 6:49 PM
Thanks for your feedback.

We are rerouting 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 MS-Moderator01 on 6/20/2011 at 9: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.
Posted by Viorel_ on 6/21/2011 at 1:33 AM
Consider an ordinary getter instead of property 'p':

    public ref class C
    {
    public:
        C() { }

        A<B<C^>^>^ get() { return nullptr; }
    };

File Name Submitted By Submitted On File Size  
test.zip 6/20/2011 45 KB