Code Monkey home page Code Monkey logo

repo-3184-effectivemoderncppchinese's Introduction

《Effective Modern C++ 》翻译

Backers on Open Collective Sponsors on Open Collective

目录

  1. 简介
  2. 类型推导
    1. Item 1:理解模板类型推导 已修订
    2. Item 2:理解auto类型推导
    3. Item 3:理解decltype
    4. Item 4:学会查看类型推导结果
  3. auto
    1. Item 5:优先考虑auto而非显式类型声明
    2. Item 6:auto推导若非己愿,使用显式类型初始化惯用法
  4. 移步现代C++
    1. Item 7:区别使用()和{}创建对象
    2. Item 8:优先考虑nullptr而非0和NULL
    3. Item 9:优先考虑别名声明而非typedefs
    4. Item 10:优先考虑限域枚举而非未限域枚举 已修订
    5. Item 11:优先考虑使用deleted函数而非使用未定义的私有声明
    6. Item 12:使用override声明重载函数
    7. Item 13:优先考虑const_iterator而非iterator
    8. Item 14:如果函数不抛出异常请使用noexcept
    9. Item 15:尽可能的使用constexpr
    10. Item 16:让const成员函数线程安全
    11. Item 17:理解特殊成员函数函数的生成
  5. 智能指针
    1. Item 18:对于独占资源使用std::unique_ptr
    2. Item 19:对于共享资源使用std::shared_ptr 已修订
    3. Item 20:当std::shared_ptr可能悬空时使用std::weak_ptr
    4. Item 21:优先考虑使用std::make_unique和std::make_shared,而非直接使用new
    5. Item 22:当使用Pimpl惯用法,请在实现文件中定义特殊成员函数
  6. 右值引用,移动语义,完美转发
    1. Item 23:理解std::move和std::forward
    2. Item 24:区别通用引用和右值引用
    3. Item 25:对于右值引用使用std::move,对于通用引用使用std::forward
    4. Item 26:避免重载通用引用
    5. Item 27:熟悉重载通用引用的替代品
    6. Item 28:理解引用折叠
    7. Item 29:认识移动操作的缺点
    8. Item 30:熟悉完美转发失败的情况
  7. Lambda表达式
    1. Item 31:避免使用默认捕获模式
    2. Item 32:使用初始化捕获来移动对象到闭包中
    3. Item 33:对于std::forward的auto&&形参使用decltype
    4. Item 34:优先考虑lambda表达式而非std::bind
  8. 并发API
    1. Item 35:优先考虑基于任务的编程而非基于线程的编程
    2. Item 36:如果有异步的必要请指定std::launch::threads
    3. Item 37:从各个方面使得std::threads unjoinable
    4. Item 38:关注不同线程句柄析构行为
    5. Item 39:考虑对于单次事件通信使用void
    6. Item 40:对于并发使用std::atomic,volatile用于特殊内存区
  9. 微调
    1. Item 41:对于那些可移动总是被拷贝的形参使用传值方式
    2. Item 42:考虑就地创建而非插入

其他资源

贡献者

感谢所有参与翻译/勘误/建议的贡献者们~

免责声明

译者纯粹出于学习目的与个人兴趣翻译本书,不追求任何经济利益。译者保留对此版本译文的署名权,其他权利以原作者和出版社的主张为准。本译文只供学习研究参考之用,不得公开传播发行或用于商业用途。有能力阅读英文书籍者请购买正版支持。

repo-3184-effectivemoderncppchinese's People

Contributors

allenmh avatar andyjmr avatar blurrylight avatar bz521 avatar cellspace avatar deximy avatar ecer avatar gosth avatar icgw avatar ichn-hu avatar jiapengwen avatar l-super avatar liuyunbin avatar lucienxian avatar miamia0 avatar misteo avatar neko-horikawaraiko avatar pusidun avatar sdutwsl avatar standback avatar sunyuhan19981208 avatar swordsmanbababa avatar techlarry avatar uniartisan avatar wendajiang avatar windski avatar xiaotaoguo avatar xris1658 avatar y1yang0 avatar zyuchuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.