hana_member_ptr_traits.h
Go to the documentation of this file.
1#pragma once
2
3#include "common.h"
4
5namespace armarx::meta::cfg
6{
7 template <class T>
8 struct hana_member_ptr_traits : std::false_type
9 {
10 };
11
12 template <class T>
14 {
15 };
16
17 template <class T>
21
22 template <class T>
26
27 template <class T1, class T2>
28 struct hana_member_ptr_traits<boost::hana::tuple<T1, T2>> : hana_member_ptr_traits<T2>
29 {
30 };
31
32 template <class CL, class MT, MT CL::*ptr>
33 struct hana_member_ptr_traits<hana::struct_detail::member_ptr<MT CL::*, ptr>> : std::true_type
34 {
35 using class_t = CL;
36 using member_t = MT;
37 using pointer_t = MT CL::*;
38 static constexpr pointer_t pointer = ptr;
39
40 template <template <class CL2, class MT2, MT2 CL2::*> class Templ>
41 using pass_to = Templ<CL, MT, pointer>;
42 };
43} // namespace armarx::meta::cfg