Skip to content

Commit 604d411

Browse files
committed
asio异步函数第二个参数
1 parent 154b7b0 commit 604d411

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

doc/1.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,12 @@ char async_result_initiate_memfn_helper(
106106
文心一言 https://zh.cppreference.com/w/cpp/language/declarations
107107

108108
tls1.2 sni
109-
https://www.rfc-editor.org/rfc/rfc6066#section-3
109+
https://www.rfc-editor.org/rfc/rfc6066#section-3
110+
111+
async_read_some函数的参数声明
112+
第二个参数类型是完成token类型,且其后跟随一个扩展成默认参数的宏,这个默认参数在不对ip::tcp::socket对象包装时,扩展为void
113+
但这个和它的参数类型不匹配(是完成函数的签名),所以在未提供显示参数时,调用会报错,类型不匹配
114+
115+
当ip::tcp::socket被包装成awaitable类型时,默认参数就会扩展为正确的类型.
116+
参考
117+
ASIO_DEFAULT_COMPLETION_TOKEN -> default_completion_token -> default_completion_token_impl

doc/gdb-guide.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ gdb基本命令行
1313
打印变量值,print this print *this 等
1414
info sources [regx]
1515
列出当前关联的源文件,可以跟正则表达式匹配
16-
1716
save breakpoints bkp
1817
保存断点信息到文件bkp,下次启动时使用-x选项加载
1918
gdb -x filename <program>
19+
ctrl+x+a
20+
打开或关闭tui
21+
fs next
22+
专注下个窗口
23+
list <filename>
24+
列出源文件中的源码
25+
b <line> if <condition>
26+
在指定行设置断点,当条件满足时才设置

0 commit comments

Comments
 (0)