Modern Effective C++

本书深入探讨了C++的现代特性,包括类型推断、auto、decltype、智能指针、右值引用和移动语义、lambda表达式以及并发API的使用。通过一系列的实践条款,详细介绍了如何有效利用这些特性提高代码质量和效率,强调了如优先使用auto、nullptr、const_iterator以及std::make_unique等最佳实践。
摘要由CSDN通过智能技术生成

Effective Modern C++

Deducing Types

类型推断

Item 1: Understand template type deduction

条款1:理解模板模型推断

Item 2: Understand auto type deduction

条款2:理解auto类型推断

Item 3: Understand decltype

条款3:理解decltype

Item 4: Know how to view deduced types

条款4: 掌握预览推断类型

auto

atuo

Item 5: Prefer auto to explicit type declarations

条款5:优先使用auto而非显示类型声明

Item 6: Use the explicitly typed initializer idiom when auto deduces undesired types

条款6:当无法auto推断类型时使用显示类型初始化习惯

Moving to Modern C++

转向现代C++

Item 7: Distinguish between () and {} when creating objects

条款7:创建对象时区别()和{}

Item 8: Prefer nullptr to 0 and NULL

条款8:优先使用nullptr而非0或NULL

Item

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值