Using bind1st for a method that takes argument by reference

后端 未结 4 1080
悲哀的现实
悲哀的现实 2020-12-01 20:59

I have a struct like this:

struct A {
    void i(int i) {}
    void s(string const &s) {}
};

Now when I try this:

bind         


        
4条回答
  •  情歌与酒
    2020-12-01 21:32

    Look at this post were the requirements of template parameters are explained. As you already assumed the reference to the std::string is the problem. It's not a valid template parameter.

提交回复
热议问题