Lumiera  0.pre.03
»edit your freedom«
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"
32 #include "lib/meta/generator.hpp"
33 
34 
35 
36 namespace lib {
37 namespace 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 = NullType
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
A template metaprogramming technique for manipulating collections of types.
Helpers for working with lib::meta::Types (i.e.
Implementation namespace for support and library code.
Build a single inheritance chain of template instantiations.
Definition: generator.hpp:120
build a list-of lists, where each element of the first arg list gets in turn prepended to all element...
Metaprogramming: Helpers for manipulating lists-of-types.