Boost logo

Boost :

Subject: Re: [boost] Interactive metaprogramming shells
From: Edward Diener (eldiener_at_[hidden])
Date: 2014-01-26 21:29:03


On 1/26/2014 7:08 PM, Hartmut Kaiser wrote:
>
>>>>> 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...
>>
>> Is there any documentation for this interface ? I could not find anything
>> about it in "The Wave Driver" documentation.
>
> What documentation would you like to see? It's as simple as starting the
> driver without command line arguments.

What am I supposed to be entering in order to see how the driver expands
a macro ? Do I enter macro definitions and/or #include statements
followed by a macro invocation ?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk