Search

static_assert failure does not trigger a compilation error by DeadMG

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 674867
Opened: 6/9/2011 3:55:55 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
When using static_assert, then even on failure of the condition, the compiler will not trigger a build error.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling version

Visual Studio 2010

Steps to reproduce

Attempt to compile attached code.

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

The compiler allows the build to succeed, even though the static assertion was failed. Intellisense will actually report the assertion as failed correctly, but the compiler will not.

Expected results

The build will fail with the message given in the static assertion.
File Attachments
File Name Submitted By Submitted On File Size  
blank.cpp 6/9/2011 980 bytes
Sign in to post a comment.
Posted by Microsoft on 8/17/2011 at 11:17 AM
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-Moderator09 [Feedback Moderator] on 6/9/2011 at 8:29 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 review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 6/9/2011 at 4:50 PM
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.