2020-01-18 11:38:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2018-12-04 02:27:16 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#define AK_MAKE_NONCOPYABLE(c) \
|
2019-05-28 12:53:16 +03:00
|
|
|
private: \
|
2022-04-01 20:58:27 +03:00
|
|
|
c(c const&) = delete; \
|
|
|
|
c& operator=(c const&) = delete
|
2019-09-22 01:17:29 +03:00
|
|
|
|
|
|
|
#define AK_MAKE_NONMOVABLE(c) \
|
2020-08-26 22:52:24 +03:00
|
|
|
private: \
|
|
|
|
c(c&&) = delete; \
|
|
|
|
c& operator=(c&&) = delete
|
2023-06-16 16:56:20 +03:00
|
|
|
|
|
|
|
#define AK_MAKE_DEFAULT_MOVABLE(c) \
|
|
|
|
public: \
|
|
|
|
c(c&&) = default; \
|
|
|
|
c& operator=(c&&) = default
|
2023-10-11 03:48:56 +03:00
|
|
|
|
|
|
|
#define AK_MAKE_DEFAULT_COPYABLE(c) \
|
|
|
|
public: \
|
|
|
|
c(c const&) = default; \
|
|
|
|
c& operator=(c const&) = default
|