00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef META_MATH_LOOP2_INCLUDE
00013 #define META_MATH_LOOP2_INCLUDE
00014
00015
00016
00017 namespace meta_math {
00018
00019 template <std::size_t Index0, std::size_t Max0, std::size_t Index1, std::size_t Max1>
00020 struct loop2
00021 {
00022 static std::size_t const index0= Index0 - 1, next_index0= Index0,
00023 index1= Index1 - 1, next_index1= Index1 + 1;
00024 };
00025
00026
00027 template <std::size_t Index0, std::size_t Max0, std::size_t Max1>
00028 struct loop2<Index0, Max0, Max1, Max1>
00029 {
00030 static std::size_t const index0= Index0 - 1, next_index0= Index0 + 1,
00031 index1= Max1 - 1, next_index1= 1;
00032 };
00033
00034
00035 template <std::size_t Max0, std::size_t Max1>
00036 struct loop2<Max0, Max0, Max1, Max1>
00037 {
00038 static std::size_t const index0= Max0 - 1,
00039 index1= Max1 - 1;
00040 };
00041
00042
00043 }
00044
00045 #endif // META_MATH_LOOP2_INCLUDE