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:
Marshall Clow
2017-09-11 16:05:42 +00:00
parent f2c4a96359
commit ff400da261
3 changed files with 22 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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
}