[cfe-commits] [Patch] disallow function template partial specialization

Hans Wennborg hans at chromium.org
Mon Jan 24 03:50:07 PST 2011


Hi,

The attached patch attempts to fix http://llvm.org/bugs/show_bug.cgi?id=8295

My reasoning is that:

1. For a regular function template declaration, one would never have
template arguments
2. The same holds for overloading
3. For a function template explicit specialization ("full
specialization"), one would never have template parameters.

So, if a function template declaration has both template parameters
and template arguments, it must be an attempt at partial
specialization.

I would be grateful if someone with deeper C++ knowledge could verify
that this is correct.


Also, does C++0x change any of this?


Thanks,
Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: func_temp_partial_spec.patch
Type: text/x-patch
Size: 1926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110124/8d06e436/attachment.bin>


More information about the cfe-commits mailing list