How to use local classes with templates?

人走茶凉 提交于 2019-11-28 14:00:14

In C++03 it can't be done, C++0x will lift that restriction though.

C++03, §14.3.1/2:

A local type, a type with no linkage, an unnamed type or a type compounded from any of these types shall not be used as a template-argument for a template type-parameter.

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