smooth_feedback
Control and estimation on Lie groups
Loading...
Searching...
No Matches
traits.hpp
1// Copyright (C) 2022 Petter Nilsson. MIT License.
2
3#pragma once
4
5#include <type_traits>
6
7namespace smooth::feedback::traits {
8
9template<typename T, template<typename...> class Z>
10struct is_specialization_of : std::false_type
11{};
12
13template<typename... Args, template<typename...> class Z>
14struct is_specialization_of<Z<Args...>, Z> : std::true_type
15{};
16
17template<typename T, template<typename...> class Z>
18static constexpr bool is_specialization_of_v = is_specialization_of<T, Z>::value;
19
20template<typename T, template<std::size_t...> class Z>
21struct is_specialization_of_sizet : std::false_type
22{};
23
24template<std::size_t... Args, template<std::size_t...> class Z>
25struct is_specialization_of_sizet<Z<Args...>, Z> : std::true_type
26{};
27
28template<typename T, template<std::size_t...> class Z>
29static constexpr bool is_specialization_of_sizet_v = is_specialization_of_sizet<T, Z>::value;
30
31} // namespace smooth::feedback::traits