| //===----------------------------------------------------------------------===// |
| // 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 |
| //===----------------------------------------------------------------------===// |
| // constexpr unspecified ignore; |
| // UNSUPPORTED: c++98, c++03 |
| constexpr bool test_ignore_constexpr() |
| { // Test that std::ignore provides constexpr converting assignment. |
| auto& res = (std::ignore = 42); |
| assert(&res == &std::ignore); |
| { // Test that std::ignore provides constexpr copy/move constructors |
| auto moved = std::move(copy); |
| { // Test that std::ignore provides constexpr copy/move assignment |
| auto moved = std::ignore; |
| constexpr auto& ignore_v = std::ignore; |
| static_assert(test_ignore_constexpr(), ""); |
| LIBCPP_STATIC_ASSERT(std::is_trivial<decltype(std::ignore)>::value, ""); |