//===----------------------------------------------------------------------===// // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 // explicit bad_expected_access(E e); // Effects: Initializes unex with std::move(e). #include #include #include #include #include "test_macros.h" #include "MoveOnly.h" // test explicit static_assert(std::convertible_to); static_assert(!std::convertible_to>); int main(int, char**) { std::bad_expected_access b(MoveOnly{3}); assert(b.error().get() == 3); return 0; }