qxLib
Macros
copyable_movable.h File Reference

Go to the source code of this file.

Macros

#define QX_COPYABLE(className)
 Define class as default copyable. More...
 
#define QX_MOVABLE(className)
 Define class as default movable. More...
 
#define QX_COPYMOVABLE(className)
 Define class as default copyable and movable. More...
 
#define QX_NONCOPYABLE(className)
 Define class as non copyable. More...
 
#define QX_NONMOVABLE(className)
 Define class as non movable. More...
 
#define QX_NONCOPYMOVABLE(className)
 Define class as non copyable and non movable. More...
 

Detailed Description

Author
Khrapov
Date
7.08.2022

Definition in file copyable_movable.h.

Macro Definition Documentation

◆ QX_COPYABLE

#define QX_COPYABLE (   className)
Value:
className(const className&) = default; \
className& operator=(const className&) = default

Define class as default copyable.

Parameters
className- class name

Definition at line 16 of file copyable_movable.h.

◆ QX_COPYMOVABLE

#define QX_COPYMOVABLE (   className)
Value:
QX_COPYABLE(className); \
QX_MOVABLE(className)
#define QX_COPYABLE(className)
Define class as default copyable.

Define class as default copyable and movable.

Parameters
className- class name

Definition at line 34 of file copyable_movable.h.

◆ QX_MOVABLE

#define QX_MOVABLE (   className)
Value:
className(className&&) noexcept = default; \
className& operator=(className&&) noexcept = default

Define class as default movable.

Parameters
className- class name

Definition at line 25 of file copyable_movable.h.

◆ QX_NONCOPYABLE

#define QX_NONCOPYABLE (   className)
Value:
className(const className&) = delete; \
className& operator=(const className&) = delete

Define class as non copyable.

Parameters
className- class name

Definition at line 43 of file copyable_movable.h.

◆ QX_NONCOPYMOVABLE

#define QX_NONCOPYMOVABLE (   className)
Value:
QX_NONCOPYABLE(className); \
QX_NONMOVABLE(className)
#define QX_NONCOPYABLE(className)
Define class as non copyable.

Define class as non copyable and non movable.

Parameters
className- class name

Definition at line 61 of file copyable_movable.h.

◆ QX_NONMOVABLE

#define QX_NONMOVABLE (   className)
Value:
className(className&&) noexcept = delete; \
className& operator=(className&&) noexcept = delete

Define class as non movable.

Parameters
className- class name

Definition at line 52 of file copyable_movable.h.