gimo v0.2.0
Loading...
Searching...
No Matches
Common.hpp File Reference
#include "gimo/Config.hpp"
#include <concepts>
#include <cstddef>
#include <type_traits>
#include <utility>
Include dependency graph for Common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gimo

Concepts

concept  gimo::null_for
 Concept describing the relationship between a Nullable type and its null state.
concept  gimo::nullable
 Concept describing a type that can be used as a monad in the pipeline.
concept  gimo::constructible_from_value
 Concept determining whether the Nullable is constructible with the specified argument.
concept  gimo::rebindable_value_to
 Concept determining whether the Nullable type supports rebinding its value-type.
concept  gimo::expected_like
 Concept describing a type that acts like std::expected (has both a value and an error channel).
concept  gimo::constructible_from_error
 Concept determining whether the Expected type supports rebinding its error-type.
concept  gimo::rebindable_error_to
 Concept determining whether the Expected type supports rebinding its error-type.

Typedefs

template<nullable Nullable, typename Value>
using gimo::rebind_value_t = typename traits<std::remove_cvref_t<Nullable>>::template rebind_value<Value>
 Helper alias to obtain the Nullable type with the rebound Value type.
template<expected_like Expected, typename Error>
using gimo::rebind_error_t = typename traits<std::remove_cvref_t<Expected>>::template rebind_error<std::remove_cvref_t<Error>>
 Helper alias to obtain the Expected type with the rebound Error type.

Functions

template<nullable Nullable, typename Arg>
constexpr Nullable gimo::construct_from_value (Arg &&arg) noexcept(detail::nothrow_constructible_from_value< Nullable, Arg && >)
 Constructs the specified Nullable with the provided value.

Variables

template<nullable Nullable>
constexpr auto gimo::null_v {traits<std::remove_cvref_t<Nullable>>::null}
 Helper to obtain the null value for a specific Nullable type.