Cogs.Foundation
|
A value that is cleared when it is moved from. More...
#include <UniqueValue.h>
Public Member Functions | |
UniqueValue ()=default | |
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.
|
default |
|
inline |
|
delete |
|
inlinenoexcept |
References Cogs::T.
|
delete |
|
inlinenoexcept |
References Cogs::T, and Cogs::UniqueValue< T >::value.
T Cogs::UniqueValue< T >::value = T(0) |
Referenced by Cogs::UniqueValue< T >::operator=().