Improper issuance of C4610 - by 07ED3D00-D2F8-46BC-9CA1-F42F5CC53C2B

Status : 

  Postponed<br /><br />
		Due to current priorities, the product team decided to postpone the resolution of this item.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


0
0
Sign in
to vote
ID 488660 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 9/8/2009 11:40:29 AM
Access Restriction Public

Description

The declaration of a class type which is an aggregate containing a member of reference type causes warning C4610 ("struct/class '<name>' can never be instantiated - user defined constructor required").

This is false. Such a type _can_ be instantiated by means of the standard aggregate initialization syntax. (See example code given in "Steps to Reproduce", which does exactly that.)

Note that the code in question also issues warning C4510; this is perhaps unhelpful, since there is no attempt made to _use_ a default constructor, but it is not incorrect.
Sign in to post a comment.
Posted by Pontation on 8/23/2013 at 9:45 AM
I can confirm this still exists in Visual Studio 2012. Where did you move the issue?
Posted by Microsoft on 9/9/2009 at 7:49 AM
Hi: I can confirm that this is a bug with Visual C++. Unfortunately it does not meet the triage bar for the current release of Visual C++ - but we will keep the issue in our database and we will look at it again during the development phase of a future release of Visual C++.

Jonathan Caves
Visual C++ Compiler Team
Posted by Microsoft on 9/8/2009 at 10:01 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.

Thank you