[c++] Another question about demangler output

Gabriel Dos Reis gdr@integrable-solutions.net
Sun Dec 7 05:38:00 GMT 2003


Daniel Jacobowitz <drow@mvista.com> writes:

[...]

| > 
| > Yes. Consider but the following case
| > 
| >    struct foo {
| >      typedef int (*bar)();
| > 
| >      operator bar();
| > 
| >      template<class T>
| >        operator typeof(T (*)());     
| >    }; 
| > 
| > if you use typeof to represent int (*)() in the demangled symbol, do
| > you offer a way to distinguish it from the template instantiation with
| > T = int (which is a  different function)?
| 
| Currently, an instantiation of the latter for T = double looks like:
|   foo::operator double (*)()<double>()

Ah, I see.  That isn't valid C++ either :-)
(Besides the 'double (*)()' thingy that started this thread, there is
no way to specify an explicit template argument for a conversion
function, so the <double> annotation isn't valid either).  Fun, fun.

-- Gaby



More information about the Gcc mailing list