Home Dashboard Directory Help
Search

C++: when template function argument of array type has size defined via decltype, and it ends up negative, it is replaced with 1 by Pavel Minaev [MSFT]


Status: 

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


0
0
Sign in
to vote
Type: Bug
ID: 472511
Opened: 7/3/2009 5:50:43 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Consider a function with an argument of array-derived type (e.g. pointer to array, or reference to array). Consider furthermore that size of the array in the type declaration is defined using an expression that involves decltype() on one or more template parameters of the function. If the result of such expression would be illegal for an array declaration (e.g. negative), it is quietly substituted for 1, instead of failing template argument deduction.

This particularly affects SFINAE.

This bug is probably related to https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=472501
Details
Sign in to post a comment.
Posted by Microsoft on 7/17/2009 at 12:11 PM
Thank you for reporting the issue. We have noted it for fixing in a future release but we regret that due to time constraints we cannot fix it for Dev10.

Regards,

Tanveer Gani
Visual C++
Posted by Microsoft on 7/6/2009 at 1:34 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.