class ov::optional

Overview

Store optional object of type T (basic version of std::optional). More…

#include <ov_optional.hpp>

template <>
class optional
{
public:
    // structs

    struct Empty;

    // unions

    template <>
    union Storage;

    // construction

    optional();

    template <>
    optional();

    optional();
    optional();

    // methods

    optional&const optional& operator = ();
    optional&optional&& operator = ();

    template <>
    optional&U&& operator = ();

    constexpr operator bool () const;
    constexpr const T& operator\* () const;
    T& operator\* ();
    constexpr const T&& operator\* () const;
    T&& operator\* ();
    constexpr const T \* operator -> () const;
    T \* operator -> ();
    void reset();

    template <>
    voidArgs&&... emplace();
};

Detailed Documentation

Store optional object of type T (basic version of std::optional).

If cpp17 used this class should be replaced by std::optional.

Parameters:

T

Type of stored object.