Subject: Re: [boost] GDB-like debugger for template metaprograms
From: Larry Evans (cppljevans_at_[hidden])
Date: 2014-11-29 17:57:02
On 11/29/2014 04:06 PM, Mathias Gaunard wrote:
> On 29/11/2014 22:15, Abel Sinkovics wrote:
>> Hi Mathias,
>> Thank you for checking it.
>> On 2014-11-29 18:56, Mathias Gaunard wrote:
>>> - pretty printing complex types so that you can actually read them
>>> I don't think the formatter thing is a solution.
>>> Consider an arbitrarily deep expression template tree, for example.
>> We have some ideas on how to improve pretty printing of types and
>> displaying complex template instances based on our own experience.
>> How would you change/improve pretty printing in a way you find useful?
>> How would you display for example a deep expression template tree?
> 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
> f<g, h>
Or, keep *all* the delimiters(< , and >)
lined up, as in the following
( where the delimiters are lined up only
for the expr_prefx template):
< op_ator< >
This output was produced by:
< typename Operator
, typename... Operands
( std::ostream& os
using swallow = int; // guaranties left to right order
, ( os
the indent_buf_in is an io manipulator that uses boost::iostreams
and an iostreams indent filter, which I can provide.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk