Iros
Loading...
Searching...
No Matches
viewable_container.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
di/container/concepts/container.h
"
4
#include "
di/container/concepts/view.h
"
5
#include "
di/meta/core.h
"
6
#include "
di/meta/language.h
"
7
#include "
di/meta/operations.h
"
8
9
namespace
di::concepts
{
10
// Any View is considered viewable, if and only if the View can be constructed from T.
11
// Non-views can be viewable, if they are either an lvalue, or they are movable (into the view), with
12
// the exception of std::initializer_list, which does not own its underlying values.
13
template
<
typename
T>
14
concept
ViewableContainer
=
15
Container<T>
&& ((
View<meta::RemoveCVRef<T>
> &&
ConstructibleFrom<meta::RemoveCVRef<T>
, T>) ||
16
(!
View<meta::RemoveCVRef<T>
> &&
17
(
LValueReference<T>
|| (
Movable<meta::RemoveReference<T>
> && !
InitializerList<T>
) )));
18
}
di::concepts::ConstructibleFrom
Definition
operations.h:11
di::concepts::Container
Definition
container.h:8
di::concepts::InitializerList
Definition
language.h:209
di::concepts::LValueReference
Definition
language.h:30
di::concepts::Movable
Definition
operations.h:49
di::concepts::View
Definition
view.h:10
di::concepts::ViewableContainer
Definition
viewable_container.h:14
view.h
container.h
core.h
operations.h
language.h
di::concepts
Definition
any_storable.h:9
libs
di
include
di
container
concepts
viewable_container.h
Generated by
1.13.0