Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1449110 Details for
Bug 1589111
devtools-6 and devtoolset-7 with libstdc++-4.8 operates incorrectly with std::error_condition
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
reproducer code
test.cc (text/x-csrc), 1.30 KB, created by
Dmitry Mikhirev
on 2018-06-08 12:29:09 UTC
(
hide
)
Description:
reproducer code
Filename:
MIME Type:
Creator:
Dmitry Mikhirev
Created:
2018-06-08 12:29:09 UTC
Size:
1.30 KB
patch
obsolete
>#include <system_error> >#include <iostream> >#include <fstream> > >inline std::system_error create_system_error(int errorCode) >{ > std::error_code code(errorCode, std::generic_category()); > return std::system_error(code, code.message()); >} > >int main() { > const auto err = std::make_error_condition(std::errc::no_such_file_or_directory); > std::cout << "Expected error condition code: " << err.value() << std::endl; > std::cout << "Error error condition message: " << err.message() << std::endl; > try { > std::ifstream istrm("/nonexistent", std::ios::binary | std::ios_base::in); > if (!istrm.is_open()) { > std::cout << "failed to open file" << std::endl; > std::cout << "errno = " << errno << std::endl; > auto err = create_system_error(errno); > throw err; > } else { > std::cout << "File exists!" << std::endl; > } > } catch (const std::system_error& exc) { > std::cout << exc.what() << std::endl; > std::cout << "Error code: " << exc.code().value() << std::endl; > std::cout << "Error message: " << exc.code().message() << std::endl; > const std::error_condition _condFound = exc.code().default_error_condition(); > std::cout << "Error condition code: " << _condFound.value() << std::endl; > std::cout << "Error condition message: " << _condFound.message() << std::endl; > } > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1589111
: 1449110