假设我有以下课程:
class C { public: void f( int ) {} void f( int ) const {} };
两个重载之间的唯一区别f是其中一个是const.我无法使用,decltype( &C::f )因为仍然存在歧义.
f
const
decltype( &C::f )
我想通过使用traits类来获取函数信息,所以我需要提供函数类型.
c++ templates
c++ ×1
templates ×1