Boost logo

Boost :

Subject: [boost] Interactive metaprogramming shells
From: Abel Sinkovics (abel_at_[hidden])
Date: 2014-01-26 06:21:39


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


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:
   Metashell for template metaprograms:

You can also try them from your browser here:

Feedback is welcome.


Boost list run by bdawes at, gregod at, cpdaniel at, john at