-2
我有这个类:获取特定模板重载方法指针
class A{
template<typename Type = int32_t> Type b(){}
template<typename Type = int32_t> Type b(Type a, Type b){}
}
而且我想获得一个指针的函数b<int>()
和b<int>(int, int)
我试过,但它不知道哪个一个接:
auto t = (void (A::*)(int,int))(&A::template b<int>);
[Demo](https://wandbox.org/permlink/QNW64SM9RyeQDU2I) –