草庐IT

AnotherType

全部标签

c++ - 如何以不同方式专门化 typedef 及其隐式类型?

我有这样的东西:typedefintAnotherType;templateFunc(TValue);//AndIwanttospecializethesetwocasesseparately:templateboolFunc(intValue){...}templateboolFunc(AnotherTypeValue){...}我真的不需要专攻int,我真正需要的是为AnotherType执行不同的函数。而且我无法更改AnotherType或基本函数的定义。由于SFINAE,重载也无济于事。 最佳答案 答案是否定的。当您使用ty