util/Manual: add static method Cast()
This commit is contained in:
parent
3fbb54e0a4
commit
5e2af15e94
@ -62,6 +62,13 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Cast a value reference to the containing Manual instance.
|
||||
*/
|
||||
static constexpr Manual<T> &Cast(T &value) {
|
||||
return reinterpret_cast<Manual<T> &>(value);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
void Construct(Args&&... args) {
|
||||
assert(!initialized);
|
||||
|
Loading…
Reference in New Issue
Block a user