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 // This test should pass in C++03 with Clang extensions because Clang does
10 // not implicitly delete the copy constructor when move constructors are
11 // defaulted using extensions.
22 move_only(move_only
&&) = default;
23 move_only
& operator=(move_only
&&) = default;
26 move_only
source() {return move_only();}
27 const move_only
csource() {return move_only();}
29 void test(move_only
) {}
33 const move_only ca
= move_only();
34 // expected-error@+1 {{call to implicitly-deleted copy constructor of 'move_only'}}