BioC++ core-0.7.0
The Modern C++ libraries for Bioinformatics.
 
Loading...
Searching...
No Matches
type_list.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2022 deCODE Genetics
3// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
4// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik
5// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
6// shipped with this file and also available at: https://github.com/biocpp/biocpp-core/blob/main/LICENSE.md
7// -----------------------------------------------------------------------------------------------------
8
14#pragma once
15
17
18namespace bio::meta
19{
20
21// ----------------------------------------------------------------------------
22// type_list class
23// ----------------------------------------------------------------------------
24
28template <typename... types>
30{
32 using type = type_list;
33
35 static constexpr size_t size() noexcept { return sizeof...(types); }
36};
37
38} // namespace bio::meta
39
40// ----------------------------------------------------------------------------
41// is_type_list trait
42// ----------------------------------------------------------------------------
43
44namespace bio::meta::detail
45{
46
48template <typename t>
49inline constexpr bool is_type_list = false;
50
52template <typename... ts>
53inline constexpr bool is_type_list<type_list<ts...>> = true;
54
55} // namespace bio::meta::detail
The Meta module's namespace.
Type that contains multiple types.
Definition: type_list.hpp:30
static constexpr size_t size() noexcept
The number of types contained in the type list.
Definition: type_list.hpp:35
Provides various traits to inspect templates.