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: c++03, c++11, c++14, c++17
11 // Tests that <value_> is a <copyable-box>.
17 #include "test_macros.h"
19 struct NotAssignable
{
20 NotAssignable() = default;
21 NotAssignable(const NotAssignable
&) = default;
22 NotAssignable(NotAssignable
&&) = default;
24 NotAssignable
& operator=(const NotAssignable
&) = delete;
25 NotAssignable
& operator=(NotAssignable
&&) = delete;
28 constexpr bool test() {
29 const std::ranges::single_view
<NotAssignable
> a
;
30 std::ranges::single_view
<NotAssignable
> b
;
37 int main(int, char**) {
39 static_assert(test());