Utility: Fix StaticPointer's accessors
This commit is contained in:
parent
6bbdf4cb71
commit
2edda4abf6
@ -27,14 +27,24 @@ struct StaticPointer
|
||||
return *(new (storage) value_type(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
value_type& operator*() const
|
||||
const value_type& operator*() const
|
||||
{
|
||||
return reinterpret_cast<T*>(storage);
|
||||
return *reinterpret_cast<T*>(storage);
|
||||
}
|
||||
|
||||
value_type* operator->() const noexcept
|
||||
value_type& operator*()
|
||||
{
|
||||
return reinterpret_cast<T*>(storage);
|
||||
return *reinterpret_cast<T*>(storage);
|
||||
}
|
||||
|
||||
value_type* operator->() noexcept
|
||||
{
|
||||
return reinterpret_cast<value_type*>(storage);
|
||||
}
|
||||
|
||||
const value_type* operator->() const noexcept
|
||||
{
|
||||
return reinterpret_cast<value_type*>(storage);
|
||||
}
|
||||
|
||||
constexpr explicit operator bool() const
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user