1 //===----------------------------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // XFAIL: c++98, c++03
11
12 // <system_error>
13
14 // class error_code
15
16 // explicit operator bool() const;
17
18 #include <system_error>
19
test_func(void)20 bool test_func(void)
21 {
22 const std::error_code ec(0, std::generic_category());
23 return ec; // conversion to bool is explicit; should fail.
24 }
25
main()26 int main()
27 {
28 return 0;
29 }
30
31