|
Boost : |
Subject: Re: [boost] Interactive metaprogramming shells
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2014-01-26 16:24:30
> > I've built interactive shells for preprocessor and template
> > metaprogramming. I've been using them for development and debugging of
> > metaprograms and I think Boost developers could also find them useful.
> >
> > You can type in (metaprogramming) expressions which get evaluated and
> > the result is displayed immediately. For example you can type
> >
> > boost::mpl::push_front<boost::mpl::vector<int, char>,
> > double>::type
> >
> > and you get
> >
> > boost_::mpl::vector<double, int, char>
> >
> > as the result (the boost_ namespace is used because there are some
> > tricks there to make the output more readable).
> >
> >
> > As an example for the preprocessor shell you can type
> >
> > BOOST_PP_REPEAT(3, foo BOOST_PP_TUPLE_EAT(3), ~)
> >
> > and you get
> >
> > foo foo foo
> >
> > as the result.
> >
> >
> > The tools are based on the Boost.Wave library and Clang. You can get
> > them here:
> > Preshell for preprocessor: https://github.com/sabel83/preshell
> > Metashell for template metaprograms:
> > https://github.com/sabel83/metashell
> >
> > You can also try them from your browser here:
> > http://abel.web.elte.hu/shell
That's nice tools! However, the wave tool itself already supports a REPL
interface for preprocessing, just start it without arguments...
Regards Hartmut
---------------
http://boost-spirit.com
http://stellar.cct.lsu.edu
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk