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
"
4
#include "
di/meta/operations.h
"
5
#include "
di/util/as_const.h
"
6
#include "
di/util/forward.h
"
7
#include "
di/util/move.h
"
8
#include "
di/vocab/optional/get_value.h
"
9
#include "
di/vocab/optional/is_nullopt.h
"
10
#include "
di/vocab/optional/nullopt.h
"
11
#include "
di/vocab/optional/set_nullopt.h
"
12
#include "
di/vocab/optional/set_value.h
"
13
14
namespace
di::vocab
{
15
template
<
typename
Storage,
typename
T>
16
concept
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))) };
23
} &&
concepts::ConstructibleFrom<Storage, NullOpt>
;
24
}
di::concepts::ConstructibleFrom
Definition
operations.h:11
di::concepts::SameAs
Definition
core.h:114
di::vocab::OptionalStorage
Definition
optional_storage.h:16
core.h
forward.h
get_value.h
operations.h
is_nullopt.h
di::vocab
Definition
lazy.h:165
di::vocab::set_nullopt
constexpr struct di::vocab::SetNulloptFunction set_nullopt
di::vocab::is_nullopt
constexpr struct di::vocab::IsNulloptFunction is_nullopt
di::vocab::get_value
constexpr auto get_value
Definition
get_value.h:15
nullopt.h
set_nullopt.h
as_const.h
move.h
set_value.h
libs
di
include
di
vocab
optional
optional_storage.h
Generated by
1.13.0