Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_meta.hpp
Go to the documentation of this file.
1/*
2 * Created by Jozef on 02/12/2018.
3 * Copyright 2018 Two Blue Cubes Ltd. All rights reserved.
4 *
5 * Distributed under the Boost Software License, Version 1.0. (See accompanying
6 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 */
8
9#ifndef TWOBLUECUBES_CATCH_META_HPP_INCLUDED
10#define TWOBLUECUBES_CATCH_META_HPP_INCLUDED
11
12#include <type_traits>
13
14namespace Catch {
15template< typename... >
16struct TypeList {};
17
18template< typename... >
19struct append;
20
21template< template<typename...> class L1
22 , typename...E1
23 , template<typename...> class L2
24 , typename...E2
25>
26struct append< L1<E1...>, L2<E2...> > {
27 using type = L1<E1..., E2...>;
28};
29
30template< template<typename...> class L1
31 , typename...E1
32 , template<typename...> class L2
33 , typename...E2
34 , typename...Rest
35>
36struct append< L1<E1...>, L2<E2...>, Rest...> {
37 using type = typename append< L1<E1..., E2...>, Rest... >::type;
38};
39
40template< template<typename...> class
41 , typename...
42>
43struct rewrap;
44
45template< template<typename...> class Container
46 , template<typename...> class List
47 , typename...elems
48>
49struct rewrap<Container, List<elems...>> {
50 using type = TypeList< Container< elems... > >;
51};
52
53template< template<typename...> class Container
54 , template<typename...> class List
55 , class...Elems
56 , typename...Elements>
57 struct rewrap<Container, List<Elems...>, Elements...> {
58 using type = typename append<TypeList<Container<Elems...>>, typename rewrap<Container, Elements...>::type>::type;
59};
60
61template< template<typename...> class...Containers >
62struct combine {
63 template< typename...Types >
64 struct with_types {
65 template< template <typename...> class Final >
66 struct into {
67 using type = typename append<Final<>, typename rewrap<Containers, Types...>::type...>::type;
68 };
69 };
70};
71
72template<typename T>
73struct always_false : std::false_type {};
74
75} // namespace Catch
76
77#endif // TWOBLUECUBES_CATCH_META_HPP_INCLUDED
typename append< L1< E1..., E2... >, Rest... >::type type
typename append< Final<>, typename rewrap< Containers, Types... >::type... >::type type
typename append< TypeList< Container< Elems... > >, typename rewrap< Container, Elements... >::type >::type type
Definition list.h:35
yh_object_type type
Definition yubihsm.h:672
struct @108 class