VIPRA Documentation
Loading...
Searching...
No Matches
include
vipra
util
find_index.hpp
1
#pragma once
2
3
#include <cstddef>
4
5
namespace
VIPRA::Util {
6
template
<std::
size_t
index_t,
template
<
typename
>
typename
check_t,
typename
... types_t>
7
struct
FindIndex
;
8
9
template
<std::
size_t
index_t,
template
<
typename
>
typename
check_t,
typename
type_t,
10
typename
... types_t>
11
struct
FindIndex
<index_t, check_t, type_t, types_t...> {
12
// NOLINTNEXTLINE(readability-identifier-naming) lowercase is a regular naming convetion here
13
static
constexpr
std::size_t value =
14
check_t<type_t>::value ? index_t
15
:
FindIndex
<index_t + 1, check_t, types_t...>::value;
16
};
17
24
template
<std::
size_t
index_t,
template
<
typename
>
typename
check_t>
25
struct
FindIndex
<index_t, check_t> {
26
// NOLINTNEXTLINE(readability-identifier-naming) lowercase is a regular naming convetion here
27
static
constexpr
std::size_t value = -1;
28
};
29
}
// namespace VIPRA::Util
VIPRA::Util::FindIndex
Definition
find_index.hpp:7
Generated by
1.13.2