Boost logo

Boost :

Subject: Re: [boost] GDB-like debugger for template metaprograms
From: Abel Sinkovics (abel_at_[hidden])
Date: 2014-11-30 02:30:02


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.

> 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.

Regards,
   Ábel


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