capydi
Loading...
Searching...
No Matches
Template.hpp
Go to the documentation of this file.
1
#ifndef UNIFY_TEMPLATE_HPP_
2
#define UNIFY_TEMPLATE_HPP_
3
4
#include "
capymeta/concepts/Trait.hpp
"
5
#include "
capymeta/primitives/MetaArity.hpp
"
6
7
#include <array>
8
9
namespace
capy::meta
10
{
11
12
template
<
13
template
<
typename
...>
typename
Template,
14
MetaArity
REQUIRED_ARITY,
15
MetaArity
... OPTIONAL_ARITIES
16
>
17
struct
template_ft
18
{
19
public
:
20
static
constexpr
std::array
META_CALLABLE_TAGS
= {
21
MetaCallableTag::TYPE_CALLABLE
,
22
};
23
24
static
constexpr
std::array
META_CALLABLE_ARITIES
= {
25
REQUIRED_ARITY,
26
OPTIONAL_ARITIES...
27
};
28
29
public
:
30
template
<
typename
... Args>
31
struct
Functor
32
{
33
using
type
=
typename
Template<Args...>
::type
;
34
};
35
};
36
37
template
<
38
template
<
typename
...>
typename
Template,
39
MetaArity
REQUIRED_ARITY,
40
MetaArity
... OPTIONAL_ARITIES
41
>
42
struct
template_fv
43
{
44
public
:
45
static
constexpr
std::array
META_CALLABLE_TAGS
= {
46
MetaCallableTag::TYPE_CALLABLE
,
47
MetaCallableTag::VALUE_CALLABLE
,
48
};
49
50
static
constexpr
std::array
META_CALLABLE_ARITIES
= {
51
REQUIRED_ARITY,
52
OPTIONAL_ARITIES...
53
};
54
55
public
:
56
template
<
typename
... Args>
57
struct
Functor
58
{
59
public
:
60
static
constexpr
auto
61
value
= Template<Args...>
::value
;
62
63
public
:
64
using
type
=
decltype
(
value
);
65
};
66
};
67
68
}
69
70
#endif
// !UNIFY_TEMPLATE_HPP_
MetaArity.hpp
Trait.hpp
capy::meta
Definition
Rebind.hpp:7
capy::meta::MetaArity
MetaArity
Definition
MetaArity.hpp:11
capy::meta::MetaCallableTag::VALUE_CALLABLE
@ VALUE_CALLABLE
Definition
Trait.hpp:15
capy::meta::MetaCallableTag::TYPE_CALLABLE
@ TYPE_CALLABLE
Definition
Trait.hpp:14
capy::meta::template_ft::Functor
Definition
Template.hpp:32
capy::meta::template_ft::Functor::type
typename Template< Args... >::type type
Definition
Template.hpp:33
capy::meta::template_ft
Definition
Template.hpp:18
capy::meta::template_ft::META_CALLABLE_ARITIES
static constexpr std::array META_CALLABLE_ARITIES
Definition
Template.hpp:24
capy::meta::template_ft::META_CALLABLE_TAGS
static constexpr std::array META_CALLABLE_TAGS
Definition
Template.hpp:20
capy::meta::template_fv::Functor
Definition
Template.hpp:58
capy::meta::template_fv::Functor::type
decltype(value) type
Definition
Template.hpp:64
capy::meta::template_fv::Functor::value
static constexpr auto value
Definition
Template.hpp:61
capy::meta::template_fv
Definition
Template.hpp:43
capy::meta::template_fv::META_CALLABLE_TAGS
static constexpr std::array META_CALLABLE_TAGS
Definition
Template.hpp:45
capy::meta::template_fv::META_CALLABLE_ARITIES
static constexpr std::array META_CALLABLE_ARITIES
Definition
Template.hpp:50
core
capymeta
include
capymeta
primitives
Template.hpp
Generated by
1.15.0