This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [c++] Another question about demangler output
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