MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::Any Namespace Reference

Data Structures

struct  FAny
 A simplistic but type-safe and RAII compliant storage for anything. Enclosed data is owned by this type. More...
 
struct  TAnyTypeFacilities
 Give the opportunity to customize object lifespan operations for FAny by either specializing this template or just providing functors in-place. More...
 

Variables

template<typename T >
TAnyTypeFacilities< T > AnsiAnyFacilities
 Type facilities for FAny enforcing standard memory allocations.
 

Variable Documentation

◆ AnsiAnyFacilities

template<typename T >
TAnyTypeFacilities<T> Mcro::Any::AnsiAnyFacilities
inline
Initial value:
= {
.Destruct = [](T* object) { Ansi::Delete(object); },
.CopyConstruct = [](T const& object)
{
if constexpr (CCopyConstructible<T>) return Ansi::New<T>(object);
else return nullptr;
}
}
void Delete(T *ptr)
Force using the ANSI memory release behavior, instead of the Unreal default.
Definition New.h:49
T * New(Args &&... args)
Force using the ANSI memory allocation behavior, instead of the Unreal default.
Definition New.h:32

Type facilities for FAny enforcing standard memory allocations.

Definition at line 53 of file Any.h.