[cfe-dev] Is there a PrintingPolicy that allows me to print template default arguments when they ra enot explifitly specified?

Manasij Mukherjee manasij7479 at gmail.com
Wed Jul 2 17:34:42 PDT 2014


Typos in Subject line, should be:
"Is there a PrintingPolicy that allows me to print template default
arguments when they are not explicitly specified?"


On Thu, Jul 3, 2014 at 5:56 AM, Manasij Mukherjee <manasij7479 at gmail.com>
wrote:

> Hi,
> Suppose I have a template:
> template<typename T, int N=100> class Foo {};
>
> Now, if there is only a declaration for this available, it can not include
> the default argument.
> So:
> template<typename T, int N> class Foo;
>
> So, a function (or anything else) that is using it in the declaration,
> should be rewritten from:
> Foo<MyTypename>
> to
> Foo<MyTypename,100>
>
> Is there a way to tell TypePrinter to do this?
> If not will a patch be welcome?
> Or am I approaching the problem in a roundabout manner ?
>
> Thanks
> Manasij Mukherjee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140703/7be752e4/attachment.html>


More information about the cfe-dev mailing list