草庐IT

NcursesWindow

全部标签

c++ - 在 C++ 中对带参数(字符串)的函数使用 std bind

我正在尝试在我的记录器类中创建一个std::functionsvector。当我尝试将方法绑定(bind)到我的std::function时:NcursesWindowlog_win("Logs",LINES-1,COLS/3,0,COLS*2/3);std::functionf=std::bind(&NcursesWindow::add_string,&log_win);add_string函数定义如下:voidadd_string(stringtext);但是,gcc(使用gfilt插件来尝试理解模板错误)返回:BDSoftwareSTLMessageDecryptorv3.10f