Home Dashboard Directory Help
Search

Visual C++ 2013 RC system_category().equivalent function does not work by Egtra


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 800821
Opened: 9/15/2013 9:23:49 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Please compile and run following source code:
#include <iostream>
#include <string>
#include <system_error>
#include <windows.h>

int main()
{
std::error_code ec(ERROR_NOT_ENOUGH_MEMORY, std::system_category());
std::cout << std::boolalpha;
std::cout << (ec == std::make_error_condition(std::errc::not_enough_memory)) << std::endl; // (1)
std::cout << std::system_category().equivalent(ERROR_NOT_ENOUGH_MEMORY, std::make_error_condition(std::errc::not_enough_memory)) << std::endl; // (2)
std::cout << (boost::system::system_category().default_error_condition(ERROR_NOT_ENOUGH_MEMORY) == make_error_condition(boost::system::errc::not_enough_memory)) << std::endl; // (3)
}

I expect that all expressions (1), (2), and (3) are true. But actual results are false.

I read "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\system_error".
It seems that std::_System_error_category::default_condition is not implemented.
I expect that std::_System_error_category::default_conditionis mapping Win32 error code to std::errc generic error code.

Thank you.
Details
Sign in to post a comment.
Posted by Microsoft on 9/16/2013 at 4:30 AM
Thank you for submitting feedback on Visual Studio 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 Microsoft on 9/15/2013 at 9:55 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.