1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-threads
12 // Libc++'s enum class emulation does not allow static_cast<Enum>(0) to work.
16 // enum class future_errc
18 // broken_promise = implementation-defined,
19 // future_already_retrieved = implementation-defined,
20 // promise_already_satisfied = implementation-defined,
21 // no_state = implementation-defined
26 #include "test_macros.h"
30 static_assert(std::future_errc::broken_promise
!= std::future_errc::future_already_retrieved
, "");
31 static_assert(std::future_errc::broken_promise
!= std::future_errc::promise_already_satisfied
, "");
32 static_assert(std::future_errc::broken_promise
!= std::future_errc::no_state
, "");
33 static_assert(std::future_errc::future_already_retrieved
!= std::future_errc::promise_already_satisfied
, "");
34 static_assert(std::future_errc::future_already_retrieved
!= std::future_errc::no_state
, "");
35 static_assert(std::future_errc::promise_already_satisfied
!= std::future_errc::no_state
, "");
37 static_assert(std::future_errc::broken_promise
!= static_cast<std::future_errc
>(0), "");
38 static_assert(std::future_errc::future_already_retrieved
!= static_cast<std::future_errc
>(0), "");
39 static_assert(std::future_errc::promise_already_satisfied
!= static_cast<std::future_errc
>(0), "");
40 static_assert(std::future_errc::no_state
!= static_cast<std::future_errc
>(0), "");