Add include of <string> to <system_error>, since things in there return strings. Fixes PR#34529.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@312923 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,6 +7,17 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// <system_error>
|
||||
// class error_code
|
||||
|
||||
// Make sure that the error_code bits of <system_error> are self-contained.
|
||||
|
||||
#include <system_error>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::error_code x;
|
||||
(void) x.category(); // returns a std::error_category &
|
||||
(void) x.default_error_condition(); // std::error_condition
|
||||
(void) x.message(); // returns a std::string
|
||||
}
|
||||
@@ -7,6 +7,16 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// <system_error>
|
||||
// class error_condition
|
||||
|
||||
// Make sure that the error_condition bits of <system_error> are self-contained.
|
||||
|
||||
#include <system_error>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::error_condition x = std::errc(0);
|
||||
(void) x.category(); // returns a std::error_condition &
|
||||
(void) x.message(); // returns a std::string
|
||||
}
|
||||
Reference in New Issue
Block a user