Skip to content

cvw::expected::Storage

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

Public Functions

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

Public Attributes

Name
Tval
Value storage.
Eerr
Error storage.

Detailed Description

cpp
union cvw::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

cpp
inline Storage()

Default constructor.

Exceptions:

  • None.

Since: 0.1

function ~Storage

cpp
inline ~Storage()

Destructor.

Exceptions:

  • None.

Since: 0.1

Public Attributes Documentation

variable val

cpp
T val;

Value storage.

variable err

cpp
E err;

Error storage.


Updated on 2026-05-17 at 13:22:38 +0000

Built with VitePress