Iros
 
Loading...
Searching...
No Matches
optional_storage.h
Go to the documentation of this file.
1#pragma once
2
3#include "di/meta/core.h"
5#include "di/util/as_const.h"
6#include "di/util/forward.h"
7#include "di/util/move.h"
13
14namespace di::vocab {
15template<typename Storage, typename T>
16concept OptionalStorage = requires(Storage& storage, T&& value) {
17 { is_nullopt(util::as_const(storage)) } -> concepts::SameAs<bool>;
18 { set_nullopt(storage) };
19 { get_value(storage) };
20 { get_value(util::as_const(storage)) };
21 { get_value(util::move(storage)) };
22 { get_value(util::move(util::as_const(storage))) };
24}
Definition operations.h:11
Definition core.h:114
Definition optional_storage.h:16
Definition lazy.h:165
constexpr struct di::vocab::SetNulloptFunction set_nullopt
constexpr struct di::vocab::IsNulloptFunction is_nullopt
constexpr auto get_value
Definition get_value.h:15