PStack
2.0
Stack trace printer for MSVC and GCC binaries
|
Remove the ability to copy or reassign from derived classes. More...
#include <not_copyable.hpp>
Protected Member Functions | |
not_copyable (not_copyable const &)=delete | |
Delete the copy constructor. | |
not_copyable & | operator= (not_copyable const &)=delete |
Delete the assignment operator. | |
constexpr | not_copyable () noexcept |
A simple CTOR suitable for noexcept and constexpr uses. | |
~not_copyable () noexcept | |
A simple CTOR suitable for noexcept uses. | |
Remove the ability to copy or reassign from derived classes.
When a class should disallow both copying and reassigning, it should derive from psystem::not_copyable (to disallow only reassignment, see psystem::not_assignable). This mechanism provides a simple and readable way to avoid boiler-plate method deletion, and to signal intent in the class declaration. This has no run-time overhead.