[cfe-dev] clang and gcc implement __PRETTY_FUNCTION__ differently

Nikola Smiljanic popizdeh at gmail.com
Sun Dec 18 08:01:54 PST 2011


I'm just not sure about the exact meaning.

T is definitely unused

template<class T>
const char *foo() {
  return __PRETTY_FUNCTION__;
}

But what about

template<class T>
const char *foo() {
  T t();
  std::cout << t;

  return __PRETTY_FUNCTION__;
}

I'm just not familiar with the term unused template parameter. Does it mean
not showing up in the function parameter list, not showing up anywhere
inside function body or something else?

On Sun, Dec 18, 2011 at 4:45 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> wrote:

> On Sun, Dec 18, 2011 at 04:19:37PM +0100, Nikola Smiljanic wrote:
> > Joerg what do you exactly mean by unused templates?
>
> Go back to the starting point of this thread.
>
> Joerg
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111218/8afc38bd/attachment.html>


More information about the cfe-dev mailing list