$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] Interactive metaprogramming shells
From: Abel Sinkovics (abel_at_[hidden])
Date: 2014-01-26 06:21:39
Hi,
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
Feedback is welcome.
Regards,
Ábel