capydi
Loading...
Searching...
No Matches
Head.hpp
Go to the documentation of this file.
1#ifndef HEAD_HPP_
2#define HEAD_HPP_
3
6
7namespace capy::meta::legacy
8{
9
10template<typename Pack>
11struct Head;
12
13template<typename Head_, typename... Tail>
14struct Head<Pack<Head_, Tail...>>
15{
16 using type = Head_;
17};
18
19template<>
20struct Head<Pack<>>
21{
22 using type = None;
23};
24
25template<typename Pack>
26using head_t = typename Head<Pack>::type;
27
28}
29
30#endif // !HEAD_HPP_
Compile-time type pack utilities and metaprogramming foundations.
Definition Append.hpp:7
typename Head< Pack >::type head_t
Definition Head.hpp:26
Maybe< implementation_details_::Nil > None
Definition Maybe.hpp:17
A compile-time heterogeneous type list.
Definition Pack.hpp:70
None type
Definition Head.hpp:22
Definition Head.hpp:11