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>,i>, you could print it as
a< b, c<d>, e< f
, i
Or, keep *all* the delimiters(< , and >)
On 11/29/2014 04:06 PM, Mathias Gaunard wrote:
lined up, as in the following
( where the delimiters are lined up only
for the expr_prefx template):
expr_prefx
< op_ator< []>
, expr_prefx
< op_symb
, expr_prefx
< op_symb
This output was produced by:
template
< typename Operator
, typename... Operands
>
friend
std::ostream&
operator<<
( std::ostream& os
, expr_prefx
< Operator
, Operands...
>
)
{
os
<<"expr_prefx\n< "
<