All Projects → downdemo → Effective Modern Cpp

downdemo / Effective Modern Cpp

Licence: apache-2.0
📚 Effective Modern C++ 笔记:C++11/14 最佳实践

Projects that are alternatives of or similar to Effective Modern Cpp

Applied Crypto Hardening
Best Current Practices regarding secure online communication and configuration of services using cryptography.
Stars: ✭ 690 (+1764.86%)
Mutual labels:  best-practices
Ros best practices
Best practices, conventions, and tricks for ROS. Do you want to become a robotics master? Then consider graduating or working at the Robotics Systems Lab at ETH in Zürich!
Stars: ✭ 799 (+2059.46%)
Mutual labels:  best-practices
R Style Guide
Best practices for readable, sharable, and verifiable R code
Stars: ✭ 15 (-59.46%)
Mutual labels:  best-practices
Project Guidelines
A set of best practices for JavaScript projects
Stars: ✭ 25,952 (+70040.54%)
Mutual labels:  best-practices
Best Practices Checklist
A list of awesome idiomatic code resources. Rust🦀, Go, Ruby💎, Pony 🐴, Ocaml 🐫, Erlang and more
Stars: ✭ 776 (+1997.3%)
Mutual labels:  best-practices
Best Practices Badge
🏆Core Infrastructure Initiative Best Practices Badge
Stars: ✭ 928 (+2408.11%)
Mutual labels:  best-practices
Xo
❤️ JavaScript/TypeScript linter (ESLint wrapper) with great defaults
Stars: ✭ 6,277 (+16864.86%)
Mutual labels:  best-practices
Angular Routing Best Practices
Angular Routing - Best Practices for Enterprise Applications
Stars: ✭ 29 (-21.62%)
Mutual labels:  best-practices
Ui Testing Best Practices
The largest UI testing best practices list (last update: January 2021)
Stars: ✭ 783 (+2016.22%)
Mutual labels:  best-practices
React Redux Boilerplate Example
Stars: ✭ 15 (-59.46%)
Mutual labels:  best-practices
Guide
🍄 指北,A front end style guide.
Stars: ✭ 727 (+1864.86%)
Mutual labels:  best-practices
Viewinspector
Runtime introspection and unit testing of SwiftUI views
Stars: ✭ 746 (+1916.22%)
Mutual labels:  best-practices
Terraform Best Practices
Terraform Best Practices for AWS users
Stars: ✭ 931 (+2416.22%)
Mutual labels:  best-practices
Asyncawaitbestpractices
Extensions for System.Threading.Tasks.Task and System.Threading.Tasks.ValueTask
Stars: ✭ 693 (+1772.97%)
Mutual labels:  best-practices
Java Best Practices
Best practices in Coding, Designing and Architecting Java Applications
Stars: ✭ 909 (+2356.76%)
Mutual labels:  best-practices
Laravel Best Practices
Laravel best practices
Stars: ✭ 7,066 (+18997.3%)
Mutual labels:  best-practices
Evergreen Skills Developers
List of evergreen skills, based on software development best practices & cross-framework principles, that should serve as a fair assessment of skilled software engineers / developers
Stars: ✭ 818 (+2110.81%)
Mutual labels:  best-practices
Javascript Patterns
A collection of design patterns and best practices for the JavaScript programming language.
Stars: ✭ 36 (-2.7%)
Mutual labels:  best-practices
Awesome Seo
Google SEO研究及流量变现
Stars: ✭ 942 (+2445.95%)
Mutual labels:  best-practices
Terraform Best Practices
Terraform best practices (constantly updating)
Stars: ✭ 940 (+2440.54%)
Mutual labels:  best-practices

Effective Modern C++ 主要讲述了 C++11/14 新特性的用法,阐述从两方面展开,一是原理解析,二是注意事项。如 auto 的原理使用的是模板推断机制,进而介绍模板的推断机制,再由此引出 auto 在使用上应该注意的问题。不同读者在这本书中可以各取所需,如果希望了解 C++11/14 的方方面面,则可以抽丝剥茧地深究原理,如果希望短时间内快速上手 C++11/14 工程实践,则只需略读原理但牢记结论,使用时绕开易产生问题的用法即可。此为个人笔记,条款非直译,而是个人理解的更贴近作者意图的表述。

1. 类型推断

  • 01 模板类型推断机制
  • 02 auto 类型推断机制
  • 03 decltype
  • 04 查看推断类型的方法

2. auto

  • 05 用 auto 替代显式类型声明
  • 06 auto 推断出非预期类型时,先强制转换出预期类型

3. 转向现代 C++

4. 智能指针

5. 右值引用、移动语义和完美转发

  • 23 std::movestd::forward 只是一种强制类型转换
  • 24 转发引用与右值引用的区别
  • 25 对右值引用使用 std::move,对转发引用使用 std::forward
  • 26 避免重载使用转发引用的函数
  • 27 重载转发引用的替代方案
  • 28 引用折叠
  • 29 移动不比拷贝快的情况
  • 30 无法完美转发的类型

6. lambda 表达式

  • 31 捕获的潜在问题
  • 32 用初始化捕获将对象移入闭包
  • 33 用 decltype 获取 auto&& 参数类型以 std::forward
  • 34 用 lambda 替代 std::bind

7. 并发 API

8. 其他轻微调整

  • 41 对于可拷贝的形参,如果移动成本低且一定会被拷贝则考虑传值
  • 42 用 emplace 操作替代 insert 操作
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].