A wrapper that inhibits the automatic destructor call, analogous to Rust's ManuallyDrop<T>.
More...
|
|
constexpr auto | as_ptr () const -> T const * |
| | Returns a const pointer to the contained value.
|
| |
|
constexpr auto | as_mut_ptr () -> T * |
| | Returns a mutable pointer to the contained value.
|
| |
|
constexpr auto | take () -> T && |
| | Extracts the contained value by move.
|
| |
template<typename T = void>
class rstd::mem::manually_drop::ManuallyDrop< T >
A wrapper that inhibits the automatic destructor call, analogous to Rust's ManuallyDrop<T>.
The contained value will not be dropped when ManuallyDrop goes out of scope. Use ManuallyDrop<void>::drop() to explicitly destroy the inner value.
- Template Parameters
-
| T | The wrapped type; defaults to void for the factory/drop helper specialization. |
◆ make()
template<typename T = void>
|
|
inlinestaticnodiscardconstexprexportnoexcept |
The documentation for this class was generated from the following file:
- /home/runner/work/rstd/rstd/src/core/mem/manually_drop.cppm