Home Dashboard Directory Help

[C++] __alignof() fails to properly evalute alignment of dependent types by CodingCat


 as Fixed Help for as Fixed

Sign in
to vote
Type: Bug
ID: 682695
Opened: 8/2/2011 11:15:28 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
User(s) can reproduce this bug


The VC++ 2010 compiler fails to properly evaluate the alignment of dependent types in template argument lists when these types have not been 'in use' before being passed to __alignof().

Always evaluating sizeof() with the types in question right before evaluating __alignof() works around this issue, yet, with the introduction of alignof to C++0x, this issue might become more relevant in the future.
Sign in to post a comment.
Posted by Microsoft on 9/6/2011 at 12:39 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 MS-Moderator08 [Feedback Moderator] on 8/2/2011 at 7:38 PM
Thank you for submitting feedback on Visual Studio 2010 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 MS-Moderator01 on 8/2/2011 at 11:50 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.