1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
43 catch (const std::future_error& e)
45 assert(e.code() == make_error_code(std::future_errc::broken_promise));
58 assert(&f.get() == &i);
72 catch (const std::future_error& e)
74 assert(e.code() == make_error_code(std::future_errc::broken_promise));
101 catch (const std::future_error& e)
103 // LWG 2056 changed the values of future_errc, so if we're using new
104 // headers with an old library the error codes won't line up.
106 // Note that this particular check only applies to promise<void>
107 // since the other specializations happen to be implemented in the
108 // header rather than the library.
110 e.code() == make_error_code(std::future_errc::broken_promise) ||
111 e.code() == std::error_code(0, std::future_category()));