Home Dashboard Directory Help
Search

C++: use of decltype causes premature template instantiation by Eric Niebler


Status: 

Closed
 as Won't Fix Help for as Won't Fix


4
0
Sign in
to vote
Type: Bug
ID: 548883
Opened: 4/5/2010 4:22:17 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

The code below demonstrates how the use of decltype causes premature template instantiation. In this case, it causes an endless recursion of instantiations that causes the compiler to run out of heap space. The equivalent construct that does not use decltype does not cause this problem.
Details
Sign in to post a comment.
Posted by Microsoft on 4/14/2010 at 1:28 PM
Hi -

After discussing this issue with the developer for the feature, he believes that fixing this case would require significant changes to the way the compiler processes templates, and that such a change would be beyond the scope of our upcoming service pack. We will be considering fixing this bug in a future major release.

Thanks,
Andy Rich
Visual C++ Quality Assurance
Posted by Microsoft on 4/6/2010 at 11:53 PM
Thank you for reporting this issue.
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 Microsoft on 4/6/2010 at 4:02 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.