【发布时间】:2023-04-03 10:09:01
【问题描述】:
如何选择正确的error()成员函数?我需要以某种方式投射吗?
using namespace std;
struct test
{
int error();
void error(int x);
int fun();
};
int main() {
auto f1 = &test::error; // how to pick the correct function?
auto f2 = &test::fun; // works
}
【问题讨论】:
标签: c++ c++11 overloading ampersand