sandbox
Loading...
Searching...
No Matches
sbx::memory::constructible< Type > Class Template Reference

A class that allows for the manual construction and destruction of an object of type Type. More...

#include <aligned_storage.hpp>

Public Types

using value_type = Type
 

Public Member Functions

 constructible (const constructible &other)=delete
 
 constructible (constructible &&other)=delete
 
auto operator= (const constructible &other) -> constructible &=delete
 
auto operator= (constructible &&other) -> constructible &=delete
 
template<typename... Args>
requires (std::is_constructible_v<Type, Args...>)
auto construct (Args &&... args) -> Type *
 
auto destroy () noexcept -> void
 
auto get () noexcept -> Type *
 
auto get () const noexcept -> const Type *
 
auto operator* () noexcept -> Type &
 
auto operator* () const noexcept -> const Type &
 

Detailed Description

template<typename Type>
class sbx::memory::constructible< Type >

A class that allows for the manual construction and destruction of an object of type Type.

Template Parameters
TypeThe type of the object
Warning
This class does not manage the lifetime of the object, it only provides a way to construct and destroy it manually. The user is responsible for ensuring that the object is constructed before it is used and destroyed when it is no longer needed.

The documentation for this class was generated from the following file: