我想阻止特定模板化类的所有隐式模板实例化,以防止它被实例化到每个翻译单元中.
看起来我的选择是:
所以我需要介于两者之间.如果有这样的话会很高兴:
extern template class Foo; // suppress all implicit instantiations of Foo
(注意缺少模板参数.)任何想法?
c++ templates c++11
c++ ×1
c++11 ×1
templates ×1