std::bind overload resolution

后端 未结 3 1640
醉梦人生
醉梦人生 2020-11-28 14:00

The following code works fine

#include 

using namespace std;
using namespace std::placeholders;

class A
{
  int operator()( int i, int j          


        
3条回答
  •  清酒与你
    2020-11-28 15:00

    You need a cast to disambiguate the overloaded function:

    (int(A::*)(int,int))&A::operator()
    

提交回复
热议问题