Raven Engine v0.1
Loading...
Searching...
No Matches
Expected.h File Reference

Provides the Expected<T> template for move-only result handling with error codes and messages. More...

#include "Raven/ErrorHandling/ErrorCode.h"
#include <string>
#include <source_location>
#include <array>

Classes

class  Raven::Expected< T >
 Template representing either a valid value or an error. More...

Namespaces

namespace  Raven

Detailed Description

Provides the Expected<T> template for move-only result handling with error codes and messages.

Author
SkyHorizon

The Expected<T> class encapsulates either a successfully produced value of type T or an error condition. It supports move-only semantics, automatic logging of errors on construction, and integration with the Application lifecycle (Terminate on failure). Error codes are represented by the ErrorCode enum. Reference types and value types are both supported via the StoredType alias. Use IsSuccess()/IsFailure() to branch logic, and Value() to access the contained value. On failure, a critical log is emitted.