llvm-project/libcxx/test/std/concepts/lang/moveconstructible.h
Christopher Di Bella 2b2f36a8b1 [libcxx] adds concept std::move_constructible
Implements parts of:
    - P0898R3 Standard Library Concepts
    - P1754 Rename concepts to standard_case for C++20, while we still can

Depends on D77961

Differential Revision: https://reviews.llvm.org/D96230
2021-02-10 17:33:35 +00:00

62 lines
1.4 KiB
C++

//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#ifndef TEST_STD_CONCEPTS_LAND_MOVECONSTRUCTIBLE_H
#define TEST_STD_CONCEPTS_LAND_MOVECONSTRUCTIBLE_H
struct HasDefaultOps {};
struct CustomMoveCtor {
CustomMoveCtor(CustomMoveCtor&&) noexcept;
};
struct MoveOnly {
MoveOnly(MoveOnly&&) noexcept = default;
MoveOnly& operator=(MoveOnly&&) noexcept = default;
MoveOnly(const MoveOnly&) = delete;
MoveOnly& operator=(const MoveOnly&) = default;
};
struct CustomMoveAssign {
CustomMoveAssign(CustomMoveAssign&&) noexcept;
CustomMoveAssign& operator=(CustomMoveAssign&&) noexcept;
};
struct DeletedMoveCtor {
DeletedMoveCtor(DeletedMoveCtor&&) = delete;
};
struct ImplicitlyDeletedMoveCtor {
DeletedMoveCtor X;
};
struct DeletedMoveAssign {
DeletedMoveAssign& operator=(DeletedMoveAssign&&) = default;
};
struct ImplicitlyDeletedMoveAssign {
DeletedMoveAssign X;
};
class MemberLvalueReference {
public:
MemberLvalueReference(int&);
private:
int& X;
};
class MemberRvalueReference {
public:
MemberRvalueReference(int&&);
private:
int&& X;
};
#endif // TEST_STD_CONCEPTS_LAND_MOVECONSTRUCTIBLE_H