class

TLazy

Module
Core
Header
#include "Core/TLazy.h"
Namespace
Mowo
Template
template<typename T>

Constructors

SignatureNameDescription
TLazy() = defaultTLazy
explicit TLazy(std::function<T()> factory) : m_factory(std::move(factory))TLazyThe lambda is called once on first Get().
TLazy(const TLazy&) = deleteTLazy

Public functions

ReturnsNameDescription
TLazy&operator=
T&Get
boolIsInitialized
T*TryGetPointer-style — only safe AFTER first Get() or IsInitialized.
const T*TryGet

Function details

TLazy

C++
TLazy() = default

TLazy

C++
explicit TLazy(std::function<T()> factory) : m_factory(std::move(factory))

The lambda is called once on first Get().

TLazy

C++
TLazy(const TLazy&) = delete

operator=

C++
TLazy& operator=(const TLazy&) = delete

Get

C++
T& Get()

IsInitialized

C++
bool IsInitialized() const noexcept

TryGet

C++
T* TryGet() noexcept

Pointer-style — only safe AFTER first Get() or IsInitialized.

TryGet

C++
const T* TryGet() const noexcept
Generated from Core/TLazy.h via core.json · Nov 5, 2026Version 1.0.0