Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
generator-combinations.hpp
Go to the documentation of this file.
1/*
2 GENERATOR-COMBINATIONS.hpp - generate combinations and variations
3
4 Copyright (C)
5 2011, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
27#ifndef LIB_META_GENERATOR_COMBINATIONS_H
28#define LIB_META_GENERATOR_COMBINATIONS_H
29
30#include "lib/meta/typelist.hpp"
33
34
35
36namespace lib {
37namespace meta{
38
39
40 template<class TYPES_1, class TYPES_2>
42 : Distribute< typename TYPES_1::List
43 , typename TYPES_2::List
44 >
45 { };
46
47
48
49 template< template<class,class,class> class _X_>
51 {
52 template<class SUBLIST, class BASE>
54 : _X_< typename Pick<SUBLIST,0>::Type
55 , typename Pick<SUBLIST,1>::Type
56 , BASE
57 >
58 { };
59 };
60
61
77 template
78 < class TYPES_1, class TYPES_2
79 , template<class,class,class> class _X_
80 , class BASE = Nil
81 >
83 : InstantiateChained< typename CartesianProduct<TYPES_1,TYPES_2>::List
84 , PickParametersFromSublist<_X_>::template SingleCaseInstantiation
85 , BASE
86 >
87 { };
88
89
90
91}} // namespace lib::meta
92#endif
Build a single inheritance chain of template instantiations.
Helpers for working with lib::meta::Types (i.e.
enable_if_c< Cond::value, T >::type enable_if
SFINAE helper to control the visibility of specialisations and overloads.
Definition meta/util.hpp:87
build a list-of lists, where each element of the first arg list gets in turn prepended to all element...
»Empty« mark
Definition typelist.hpp:82
Implementation namespace for support and library code.
Metaprogramming: Helpers for manipulating lists-of-types.
A template metaprogramming technique for manipulating collections of types.