ORIGINAL
Loading...
Searching...
No Matches
optional.h File Reference

Type-safe optional value container. More...

#include <utility>
#include "types.h"
#include "error.h"
Include dependency graph for optional.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  original::alternative< TYPE >
 A type-safe container that may or may not contain a value. More...
 
class  original::alternative< void >
 

Namespaces

namespace  original
 Main namespace for the project Original.
 

Detailed Description

Type-safe optional value container.

Provides an alternative<TYPE> class that can either contain a value of type 'TYPE' or be in an empty state (represented by original::none from types.h). This implementation provides:

  • Value semantics with proper construction/destruction
  • Safe access operations with error checking
  • In-place construction
  • Move and copy operations

Key features:

  • Type-safe alternative to raw pointers for optional values
  • No dynamic memory allocation
  • Explicit empty state handling
  • Integration with original::none from types.h