[AMDGPU] Mark AGPR tuple implicit in the first instr of AGPR spills. (#115285)
[llvm-project.git] / libcxx / test / std / utilities / expected / expected.bad / ctor.error.pass.cpp
blob9c7ba5a9a4bc8441d6c72d699b6d6e6ab05b5bf2
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
11 // explicit bad_expected_access(E e);
13 // Effects: Initializes unex with std::move(e).
15 #include <cassert>
16 #include <concepts>
17 #include <expected>
18 #include <utility>
20 #include "test_macros.h"
21 #include "MoveOnly.h"
23 // test explicit
24 static_assert(std::convertible_to<int, int>);
25 static_assert(!std::convertible_to<int, std::bad_expected_access<int>>);
27 int main(int, char**) {
28 std::bad_expected_access<MoveOnly> b(MoveOnly{3});
29 assert(b.error().get() == 3);
31 return 0;