Mirror reflection library 0.5.13

mirror/meta_prog/make_int_seq.hpp

Go to the documentation of this file.
00001 
00012 #ifndef MIRROR_META_PROG_MAKE_INT_SEQ_1011291729_HPP
00013 #define MIRROR_META_PROG_MAKE_INT_SEQ_1011291729_HPP
00014 
00015 #include <mirror/meta_prog/apply_on_seq_pack.hpp>
00016 #include <mirror/meta_prog/range.hpp>
00017 #include <type_traits>
00018 
00019 MIRROR_NAMESPACE_BEGIN
00020 namespace mp {
00021 
00023 
00027 template <typename Int, typename Count>
00028 struct make_int_seq
00029 {
00030 private:
00031     struct helper
00032     {
00033         template <unsigned ... P>
00034         struct apply
00035         {
00036             typedef range<
00037                 std::integral_constant<Int, P>...
00038             > type;
00039         };
00040     };
00041 public:
00042     typedef typename apply_on_seq_pack<
00043         helper,
00044         Count
00045     >::type type;
00046 };
00047 
00048 template <typename Count>
00049 struct make_index_seq
00050  : make_int_seq<int, Count>
00051 { };
00052 
00053 } // namespace mp
00054 MIRROR_NAMESPACE_END
00055 
00056 #endif //include guard
00057 

Copyright © 2006-2011 Matus Chochlik, University of Zilina, Zilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Fri Dec 16 2011 by Doxygen (version 1.7.3).
Important note: Although the 'boostified' version of Mirror uses the Boost C++ libraries Coding Guidelines and is implemented inside of the boost namespace, it IS NOT an officially reviewed and accepted Boost library. Mirror is being developed with the intention to be submitted for review for inclusion to the Boost C++ libraries.