-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmisc.hpp
More file actions
53 lines (38 loc) · 857 Bytes
/
misc.hpp
File metadata and controls
53 lines (38 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef _DPCB_MISC_HPP_
#define _DPCB_MISC_HPP_
#include <cstdint>
#include "wrapper.hpp"
namespace DPCB{
using detail::retrieve_type;
class any_convertor
{
public:
template<typename T> constexpr operator T();
};
template<class Result, typename ...Ts>
class reverse_pack_impl;
template<class ...Rs, typename T, typename ...Ts>
class reverse_pack_impl<wrapper_any<Rs...>, T, Ts...>
{
public:
using type = typename reverse_pack_impl<wrapper_any<T, Rs...>, Ts...>::type;
};
template<class ...Rs, typename T>
class reverse_pack_impl<wrapper_any<Rs...>, T>
{
public:
using type = wrapper_any<T, Rs...>;
};
template<typename ...Ts>
using reverse_pack = reverse_pack_impl<wrapper_any<>, Ts...>;
namespace detail{
template<std::size_t N>
class padding{
std::uint8_t __dummy_data[N];
};
template<>
class padding<0>{
};
}
}
#endif //_DPCB_MISC_HPP_