gimo v0.2.0
Loading...
Searching...
No Matches
ValueOrElse.hpp File Reference
#include "gimo/Common.hpp"
#include "gimo/Pipeline.hpp"
#include "gimo/algorithm/BasicAlgorithm.hpp"
#include <concepts>
#include <functional>
#include <tuple>
#include <utility>
Include dependency graph for ValueOrElse.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gimo

Functions

template<std::invocable Action>
constexpr auto gimo::value_or_else (Action &&action)
 Creates a terminating pipeline step that returns the contained value or invokes a fallback action if the nullable is null.
template<typename Alternative>
constexpr auto gimo::value_or (Alternative &&alternative)
 Creates a terminating pipeline step that returns the contained value or a specified alternative if the nullable is null.