Partial specialization of function templates

邮差的信 提交于 2019-11-26 22:23:14

问题


Does anyone know whether, in C++11, function templates can be partially specialized?


回答1:


No, they can't. The draft C++0x standard has a section (14.5.5) on class template partial specialisations, but no mention of function template partial specialisations.




回答2:


No; they were proposed as core language issue #229 (from n1295) but ultimately rejected (and quite rightly so, since overloading does the job).



来源:https://stackoverflow.com/questions/3716799/partial-specialization-of-function-templates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!