[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / utilities / tuple / tuple.general / ignore.pass.cpp
blob769c55e10fc4382c87dc5c14ce261eec7e808804
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 // <tuple>
11 // constexpr unspecified ignore;
13 // UNSUPPORTED: c++03
15 #include <cassert>
16 #include <tuple>
17 #include <type_traits>
19 #include "test_macros.h"
21 constexpr bool test_ignore_constexpr()
23 #if TEST_STD_VER > 11
24 { // Test that std::ignore provides constexpr converting assignment.
25 auto& res = (std::ignore = 42);
26 assert(&res == &std::ignore);
28 { // Test that std::ignore provides constexpr copy/move constructors
29 auto copy = std::ignore;
30 auto moved = std::move(copy);
31 ((void)moved);
33 { // Test that std::ignore provides constexpr copy/move assignment
34 auto copy = std::ignore;
35 copy = std::ignore;
36 auto moved = std::ignore;
37 moved = std::move(copy);
39 #endif
40 return true;
43 int main(int, char**) {
45 constexpr auto& ignore_v = std::ignore;
46 ((void)ignore_v);
49 static_assert(test_ignore_constexpr(), "");
52 LIBCPP_STATIC_ASSERT(std::is_trivial<decltype(std::ignore)>::value, "");
55 return 0;