On Mon, Feb 11, 2013 at 7:05 AM, Marshall Clow <span dir="ltr"><<a href="mailto:mclow.lists@gmail.com" target="_blank">mclow.lists@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On Monday 11 February 2013 14:06:45 fakju666 wrote:<br>
> Can anyone tell me what this is supposed to demangle to:<br>
><br>
> _ZN3foocvPT_I3barEEv<br>
><br>
> I got this in a call graph generated by opt, and this is the only name that<br>
> c++filt can't process. I think the problem is with the "T_" identifier,<br>
> because c++filt is happy if I replace it with "S_":<br>
><br>
> foo::operator foo<bar>*()<br>
<br>
</div>$ c++filt -n _ZN3foocvPT_I3barEEv<br>
foo::operator bar*<bar>()</blockquote><div><br></div><div>This is the right answer (or, prior to substitution, template<typename T> foo::operator T*(), with T = bar).</div><div><br></div><div>This case is a little hard to demangle, since it's /almost/ ambiguous. It could be conversion to PT_ (that is, "operator template-type-parameter-0 *"), instantiated with <bar>, or it could be conversion to PT_I3barE (that is, "operator template-template-parameter-0<bar> *"). But it actually can't be the latter, since the use of the template-template-parameter implies that we need to specify template arguments, so we'd expect another template argument list: _ZN3foocvPT_I3barEI3bazEEv.</div>
</div>