|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
A small helper type for tying a Tag to an underlying value. More...
#include <aggregate.hpp>
Public Types | |
| using | tag_type = Tag |
| using | value_type = T |
Public Member Functions | |
| constexpr | tagged (value_type value) |
| constexpr | tagged (const tagged &)=default |
| constexpr | tagged (tagged &&)=default |
| constexpr tagged & | operator= (const tagged &)=default |
| constexpr tagged & | operator= (tagged &&)=default |
| constexpr const value_type & | get () const |
| constexpr value_type & | get () |
Public Attributes | |
| value_type | value_ |
TODO(palmerb4): While currently unneeded, we could allow T to be of storage type such that we can support non-owning values within an aggregate (e.g. T could be a pointer or reference wrapper). This isn't that heavy of a change but would require some thought to get the storage semantics right.
| using mundy::tagged< Tag, T >::tag_type = Tag |
| using mundy::tagged< Tag, T >::value_type = T |
|
inlineconstexpr |
|
constexprdefault |
|
constexprdefault |
|
constexprdefault |
|
constexprdefault |
|
inlineconstexpr |
|
inlineconstexpr |
| value_type mundy::tagged< Tag, T >::value_ |