Git Product home page Git Product logo

effective-modern-cpp's Introduction

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

相关链接

  • 01 模板类型推断机制
  • 02 auto类型推断机制
  • 03 decltype
  • 04 查看推断类型的方法
  • 05 用auto替代显式类型声明
  • 06 auto推断出非预期类型时,先强制转换出预期类型
  • 23 std::movestd::forward只是一种强制类型转换
  • 24 转发引用与右值引用的区别
  • 25 对右值引用使用std::move,对转发引用使用std::forward
  • 26 避免重载使用转发引用的函数
  • 27 重载转发引用的替代方案
  • 28 引用折叠
  • 29 移动不比拷贝快的情况
  • 30 无法完美转发的类型
  • 31 捕获的潜在问题
  • 32 用初始化捕获将对象移入闭包
  • 33 用decltype获取auto&&参数类型以std::forward
  • 34 用lambda替代std::bind
  • 41 对于可拷贝的形参,如果移动成本低且一定会被拷贝则考虑传值
  • 42 用emplace操作替代insert操作

effective-modern-cpp's People

Contributors

downdemo avatar

Stargazers

Allegro 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.