Search

Compile error in mutex by bugsurfer

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 723427
Opened: 2/5/2012 3:08:18 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
Compile error in c:\program files (x86)\microsoft visual studio 11.0\vc\include\mutex line 299

The error is obvious. A bool funtion does not return anything.

snipplet from the header-file:

bool try_lock() _NOEXCEPT
{ // try to lock the mutex
    _Owns = _Pmtx->try_lock();
}
Details (expand)

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

Team Foundation Server 11 Developer Preview

Steps to reproduce

Compile source code that use template<class _Mutex>class unique_lock::try_lock()

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

2>c:\program files (x86)\microsoft visual studio 11.0\vc\include\mutex(299): error C4716: 'std::unique_lock<std::mutex>::try_lock' : must return a value

Expected results

No error or warning
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/14/2012 at 6:33 PM
Hi,

Thanks for reporting this bug. We've already fixed it, and the fix will be available in VC11.

If you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by MS-Moderator09 [Feedback Moderator] on 2/6/2012 at 2:22 AM
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 2/5/2012 at 3:44 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.