HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
meta.hpp
1// Copyright Take Vos 2021.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include <type_traits>
8
9namespace hi::inline v1 {
10
11// template<typename T, typename Head, typename... Tail>
12// constexpr std::size_t count_type_if(std::size_t count = 0) {
13// if constexpr (sizeof...(Tail) > 0) {
14// return count_type_if<T, Tail...>(std::is_same_v<T, Head> ? count + 1 : count);
15// } else {
16// return std::is_same_v<T, Head> ? count + 1 : count;
17// }
18//}
19//
20// template<typename T, typename Head, typename... Tail>
21// constexpr std::size_t index_of_type(std::size_t index = 0) {
22// static_assert(std::is_same_v<T, Head> || sizeof...(Tail) > 0, "Could not find type");
23// if constexpr (sizeof...(Tail) > 0) {
24// return (std::is_same_v<T, Head>) ? index : index_of_type<T, Tail...>(index + 1);
25// } else {
26// return index;
27// }
28//}
29
30}
DOXYGEN BUG.
Definition algorithm.hpp:15