ZBLOG

asio m_acceptor.async_accept(c->socket(), std::bind(&server::handle_accept, shared_from_this(), c, std::placeholders::_1)); 我的handle——accept接收到了error hint = Enable "Allow Function Calls In Value Formatting" if you see "???" here

您在使用asio库进行异步accept操作时遇到了错误,并且提示”Enable ‘Allow Function Calls In Value Formatting’ if you see ‘???’ here”。

这个错误提示是由于调试器在输出格式化字符串时,无法正确识别和调用占位符中的函数。为了解决这个问题,您可以尝试打开调试器的设置并启用”Allow Function Calls In Value Formatting”选项。

具体方法可能因不同的IDE或调试器而有所不同,以下是一些常见IDE的设置位置:

  • Visual Studio: 打开Debug菜单 -> Options -> Debugging -> General,在右侧找到并勾选”Allow function calls in property or indexer evaluation”。
  • CLion: 打开Settings/Preferences -> Build, Execution, Deployment -> Debugger,在右侧找到并勾选”Allow calling functions during evaluation (GDB only)“。
  • Xcode: 打开Xcode菜单 -> Preferences -> General,在右侧找到并勾选”Show variable values inline with code”。

启用该选项后,应该就能够正确显示和调用占位符中的函数,帮助您进一步排查handle_accept函数中发生的错误。


内容由零声教学AI助手提供,问题来源于学员提问

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=15248

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?