摘要: This article discusses potential bugs caused by lambda's capture synatax, and warns the reader, before acutally capturing by reference, they should consider the fact that if it's a **transient** invocation (in other words, be invoked immediately at current scope), or it's a **latent** invocation 阅读全文
posted @ 2024-01-07 17:12 sherlock2001 阅读(41) 评论(0) 推荐(0)
摘要: 本文不是一篇对std::bind的源码分析,而是试图通过逐步推导的方式,不断迭代优化,最终实现一版能阐述清核心原理的demo。非常像真实的开发过程。 事实上,关于std::bind的源码分析已有优质的讲解,建议想深入了解的读者参阅。 什么是std::bind? std::bind 是 C++ 标准库 阅读全文
posted @ 2023-12-25 22:37 sherlock2001 阅读(65) 评论(0) 推荐(0)