|
Cogs.Core
|
A value that is cleared when it is moved from. More...
#include <UniqueValue.h>
Public Member Functions | |
| UniqueValue (const T &value) | |
| UniqueValue (const UniqueValue &)=delete | |
| UniqueValue (UniqueValue &&other) noexcept | |
| UniqueValue & | operator= (const UniqueValue &)=delete |
| UniqueValue & | operator= (UniqueValue &&other) noexcept |
Public Attributes | |
| T | value = T(0) |
A value that is cleared when it is moved from.
Use case is to have a bool/flag member that tags ownership, and this tag is not duplicated when the enclosing object is moved, but is cleared in the object moved from.
Definition at line 13 of file UniqueValue.h.
|
inline |
Definition at line 15 of file UniqueValue.h.
|
inlinenoexcept |
Definition at line 17 of file UniqueValue.h.
|
inlinenoexcept |
Definition at line 20 of file UniqueValue.h.
| T Cogs::UniqueValue< T >::value = T(0) |
Definition at line 22 of file UniqueValue.h.