Boost logo

Boost :

Subject: Re: [boost] GDB-like debugger for template metaprograms
From: Edward Diener (eldiener_at_[hidden])
Date: 2014-11-30 14:08:29


On 11/30/2014 2:30 AM, Abel Sinkovics wrote:
> Hi Mathias,
>
> On 2014-11-29 23:06, Mathias Gaunard wrote:
>> It can be hard to match '<' and '>' together for long symbol names
>> involving instantiations of templates where the parameters are
>> themselves template instantiations.
>>
>> I think it would be great to have an option to automatically indent
>> the type when printing so that it's easier to interpret.
>>
>> Instead of
>> a<b,c<d>,e<f<g,h>>,i>, you could print it as
>>
>> a<
>> b,
>> c<d>,
>> e<
>> f<g, h>
>> >,
>> i
>> >
>>
>> My example is still relatively short and uses one-letter names, but
>> with real cases it can quickly become unreadable (just try reading
>> Boost.Proto expression templates types without indentation, it's
>> pretty horrible)
> Metashell has indentation support, but it is turned off by default since
> it is not complete yet. You can experiment with it: you need to start it
> with the --indent flag.

Building Metashell on Windows seems pretty flawed:

1) Metashell depends on Templight.
2) Templight supposedly depends on an older version of Clang than what
is currently in the Clang svn source tree.
3) The instructions say "Download the source code from github" soon
followed by "Download the source code on your Windows host". Huh ?
4) The instructions tell me to build Clang with Templight. Suppose I
already have Clang regularly built from source using mingw/gcc. Am I
actually building another version of clang just for Metashell and using
that version instead as Clang when working with Metashell ? Ugh !!! It
would be much better if whatever is needed from Clang were part of the
latest clang source rather than some backdated version.
5) There is something about re-downloading the MingW header files. Is
his ever necessary ? Why should I be doing this on Linux if I am
building for Windows.

>
>> In any case, my other suggestion is probably more important: I'd like
>> to be able to use this tool to track how a specific instantiation
>> happens, and since I'm working on a large project I'd need to have the
>> reference of where the template being instantiated is and where the
>> instantiation occurs.
> Metashell uses Templight to get the template instantiation details and
> to get the source location, Templight need to be able to provide that.
> We are looking into it, so it will come.


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