admin管理员组文章数量:1125329
suppose I have a template class
template<typename T>
struct Foo {
struct Bar;
};
specializing Foo<int>::Bar
template<>
struct Foo<int>::Bar {
struct Private; // I want to implement this in for its compile unit use only
}
to implement Private
in file
// template<>
struct Foo<int>::Bar::Private {...};
without template<>
, it shows "too few template-parameter-lists",
with template<>
, it shows explicit specialization of non-template Foo<int>::Bar::Private
I also tried alias Foo<int>
and it doesn't work either.
is it possible to implement Private
separated from its declaration?
本文标签: cHow to implement a class of a specialized template classStack Overflow
版权声明:本文标题:c++ - How to implement a class of a specialized template class - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736659691a1946355.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论