Hi, my first steps in mpl :>) I try to build a sequence/vector of pow10 sequence of integers and access them by index at runtime. See the last line of a concept usage. The range of exponents are in range [0..7] so the mpl::vector7 would be appropriate. Anyway, I don't get a compile able version using mpl's next, fold etc. How can I get this? Thanks, Olaf
::type NUMBER10; typedef pair< NUMBER10, typename push_back< typename PAIR::second, NUMBER10 ::type type; }; typedef accumulate< range_c
,
-- or better use the attached file
Peter
#include
::type POWER10; ? struct print { template<long I> void operator()(const long_<I> &) const { std::cout << I << std::endl; } template
void operator()(const integral_c &) const { std::cout << I << std::endl; } }; int main(int argc, char **argv) { for_eachPOWER10::second(print()); return 0; }
"Olaf Peter"
Hi,
my first steps in mpl :>) I try to build a sequence/vector of pow10 sequence of integers and access them by index at runtime. See the last line of a concept usage. The range of exponents are in range [0..7] so the mpl::vector7 would be appropriate. Anyway, I don't get a compile able version using mpl's next, fold etc. How can I get this?
Thanks, Olaf
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
http://boost.2283326.n4.nabble.com/file/n3614285/main.cpp main.cpp -- View this message in context: http://boost.2283326.n4.nabble.com/mpl-pow10-sequence-tp3608140p3614285.html Sent from the Boost - Users mailing list archive at Nabble.com.
participants (2)
-
Olaf Peter
-
Peter Foelsche