Iros
Loading...
Searching...
No Matches
any_storage.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
di/any/storage/storage_category.h
"
4
#include "
di/meta/constexpr.h
"
5
#include "
di/meta/core.h
"
6
#include "
di/meta/operations.h
"
7
#include "
di/types/prelude.h
"
8
9
namespace
di::concepts
{
10
template
<
typename
T>
11
concept
AnyStorage
=
DefaultConstructible<T>
&&
requires
{
12
typename
T::Interface;
13
14
// Must be a constant expression.
15
{ T::storage_category() } ->
SameAs<any::StorageCategory>
;
16
typename
meta::Constexpr
<T::storage_category()>;
17
18
// This must be evaluatable for all types, not just Void.
19
{ T::creation_is_fallible(
in_place_type<Void>
) } ->
SameAs<bool>
;
20
21
// Must be a constant expression.
22
typename
meta::Constexpr
<T::creation_is_fallible(
in_place_type<Void>
)>;
23
24
// This must be evaluatable for all types, not just Void. The return type is the result of creating the storage for
25
// a given type.
26
typename
T::template CreationResult<Void>;
27
};
28
}
di::concepts::AnyStorage
Definition
any_storage.h:11
di::concepts::DefaultConstructible
Definition
operations.h:24
di::concepts::SameAs
Definition
core.h:114
constexpr.h
core.h
operations.h
prelude.h
di::concepts
Definition
any_storable.h:9
di::in_place_type
constexpr auto in_place_type
Definition
in_place_type.h:12
storage_category.h
di::meta::Constexpr
A wrapper for a constexpr value.
Definition
core.h:77
libs
di
include
di
any
concepts
any_storage.h
Generated by
1.13.0