PStack  2.0
Stack trace printer for MSVC and GCC binaries
psystem::not_assignable Class Reference

Removes the ability to use an assignment operation on derived classes. More...

#include <not_assignable.hpp>

Inheritance diagram for psystem::not_assignable:

Protected Member Functions

not_assignableoperator= (not_assignable const &) const =delete
 Delete the basic assignment operator.
 
constexpr not_assignable () noexcept
 A simple CTOR suitable for noexcept and constexpr uses.
 
 ~not_assignable () noexcept
 A simple CTOR suitable for noexcept uses.
 

Detailed Description

Removes the ability to use an assignment operation on derived classes.

In some cases, it is not desirable to be able to assign onto an existing instance of a class while still allowing the ability to construct copies (see psystem::not_copyable to prevent both). An "immutable" class is one such instance. Classes may declare themselves with psystem::not_assignable as their base to get this functionality. This class will not add any overhead at run-time.

Note
This can be cirucumvented, of course, by simply overloading operator=().
Author
Matt Bisson
Date
5 August, 2014
Since
PSystem 2.0
Version
PSystem 2.0

The documentation for this class was generated from the following file: