AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
aui::non_null_lateinit< T > Struct Template Reference

A contract that enforces non-nullable initialization at a later point in time. More...

#include <AUI/Traits/values.h>

Detailed Description

template<typename T>
struct aui::non_null_lateinit< T >
Template Parameters
Twrapped pointer-like type

Same as aui::non_null but allows default ctor. This is particularly useful for scenarios where initial setup data is unavailable at object creation time, but you require a guarantee that the value will be assigned before it is accessed.

If initialized with a value that equals to nullptr, issues a runtime assertion failure.

If initialized with nullptr itself, throws a compile-time error.