跳转至

cf::expected::Storage

Internal storage union for value or error. More...

Public Functions

Name
Storage()
Default constructor.
~Storage()
Destructor.

Public Attributes

Name
T val
Value storage.
E err
Error storage.

Detailed Description

union cf::expected::Storage;

Internal storage union for value or error.

Since: 0.1

Note: Trivial (no explicit initialization).

Warning: Direct access to members is unsafe; use has_val_ to determine which member is active.

Discriminated union that holds either the value or the error. Only one member is active at any time.

Public Functions Documentation

function Storage

inline Storage()

Default constructor.

Exceptions:

  • None.

Since: 0.1

function ~Storage

inline ~Storage()

Destructor.

Exceptions:

  • None.

Since: 0.1

Public Attributes Documentation

variable val

T val;

Value storage.

variable err

E err;

Error storage.


Updated on 2026-03-09 at 10:14:00 +0000