败犬日报 2025-05-26
1. C++ 中文周刊 2025-05-26 第184期
https://wanghenshui.github.io/cppweeklynews/posts/184.html
2. 函数指针可以内联吗
当然可以。
cpp
void bar(int x) {
asm volatile("nop");
}
template <class Func>
void foo(int x, Func func) {
func(x);
}
void test() {
foo(1, bar);
}
text
bar(int):
nop
ret
test():
nop
ret