草庐IT

WrapperType

全部标签

c++ - `using`的开销

对于我的问题,我可以通过两种方式使用using指令。他们基本上归结为这些选项:templatestructA{private://DefineourtypesusingWrapperType=Wrapper;public:U*operator()(U*g)const{//TODO:useWrapperType}};或:structB{templateU*operator()(U*g)const{//Definethetypeshereinstead.usingWrapperType=Wrapper;//TODO:useWrapperType}};在这两种情况下,都会有其他的类模板参数。