![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
Convenience macros to explicitly control copy and move semantics. More...
Go to the source code of this file.
Macros | |
| #define | DISABLE_COPY(ClassName) |
| Disable copy (copy ctor + copy-assign) | |
| #define | DISABLE_MOVE(ClassName) |
| Disable move (move ctor + move-assign) | |
| #define | DISABLE_COPY_AND_MOVE(ClassName) |
| Disable both copy and move. | |
| #define | ENABLE_DEFAULT_COPY(ClassName) |
| Enable copy (default copy ctor + copy-assign) | |
| #define | ENABLE_DEFAULT_COPY_NOEXCEPT(ClassName) |
| Enable copy (default copy ctor + copy-assign) noexcept. | |
| #define | ENABLE_DEFAULT_MOVE(ClassName) |
| Enable move (default move ctor + move-assign) | |
| #define | ENABLE_DEFAULT_MOVE_NOEXCEPT(ClassName) |
| Enable move (default move ctor + move-assign) noexcept. | |
| #define | ENABLE_DEFAULT_COPY_AND_MOVE(ClassName) |
| Enable both copy and move. | |
| #define | ENABLE_DEFAULT_COPY_AND_MOVE_NOEXCEPT(ClassName) |
| Enable both copy and move noexcept. | |
| #define | ENABLE_DEFAULT_MOVE_DISABLE_COPY(ClassName) |
| Enable default move and disable copy. | |
| #define | ENABLE_DEFAULT_MOVE_DISABLE_COPY_NOEXCEPT(ClassName) |
| Enable default move and disable copy noexcept. | |
Convenience macros to explicitly control copy and move semantics.
This header provides a small set of macros that explicitly enable or disable copy and/or move construction and assignment for a class.
The intent is to make ownership and lifetime semantics immediately visible in the class declaration, without repeating boilerplate = delete / = default declarations.
These macros are purely syntactic helpers and do not introduce any additional behavior beyond what is expressed by the generated special member functions.
| #define DISABLE_COPY | ( | ClassName | ) |
Disable copy (copy ctor + copy-assign)
| #define DISABLE_COPY_AND_MOVE | ( | ClassName | ) |
Disable both copy and move.
| #define DISABLE_MOVE | ( | ClassName | ) |
Disable move (move ctor + move-assign)
| #define ENABLE_DEFAULT_COPY | ( | ClassName | ) |
Enable copy (default copy ctor + copy-assign)
| #define ENABLE_DEFAULT_COPY_AND_MOVE | ( | ClassName | ) |
Enable both copy and move.
| #define ENABLE_DEFAULT_COPY_AND_MOVE_NOEXCEPT | ( | ClassName | ) |
Enable both copy and move noexcept.
| #define ENABLE_DEFAULT_COPY_NOEXCEPT | ( | ClassName | ) |
Enable copy (default copy ctor + copy-assign) noexcept.
| #define ENABLE_DEFAULT_MOVE | ( | ClassName | ) |
Enable move (default move ctor + move-assign)
| #define ENABLE_DEFAULT_MOVE_DISABLE_COPY | ( | ClassName | ) |
Enable default move and disable copy.
| #define ENABLE_DEFAULT_MOVE_DISABLE_COPY_NOEXCEPT | ( | ClassName | ) |
Enable default move and disable copy noexcept.
| #define ENABLE_DEFAULT_MOVE_NOEXCEPT | ( | ClassName | ) |
Enable move (default move ctor + move-assign) noexcept.