-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) –