[翻译] Effective C++, 3rd Edition, 附录 A. 超越 Effective C++

EffectiveC++(英文版) 经典C++书籍的英文版,浓缩了作者的真知灼见,是提高C++水平必读 立即下载

附录 A. 超越 Effective C++

作者:Scott Meyers

译者:fatalerror99 (iTePub's Nirvana)

发布:http://blog.csdn.net/fatalerror99/

Effective C++ 覆盖了我认为对当前的 C++ 程序员最重要的通用指导方针,但是如果你有兴趣在更多的方面提升你的效力,我推荐你去研读我的其他 C++ 书籍,More Effective C++ 和 Effective STL。

More Effective C++ 覆盖其它的编程指导方针,并包括像效率和带有异常编程这样的话题的广泛讨论。它也记述了像 smart pointers(智能指针),reference counting(引用计数)和 proxy objects(代理对象)这样的重要的 C++ 编程技术。

Effective STL 像 Effective C++ 一样是一本面向指导方针的书,但是它专注于标准模板库的有效使用。

下面是这两本书的目录摘要。

Contents of More Effective C++

Basics
Item 1: Distinguish between pointers and references
Item 2: Prefer C++-style casts
Item 3: Never treat arrays polymorphically
Item 4: Avoid gratuitous default constructors

Operators
Item 5: Be wary of user-defined conversion functions
Item 6: Distinguish between prefix and postfix forms of increment and decrement operators
Item 7: Never overload &&, ||, or,
Item 8: Understand the different meanings of new and delete

Exceptions
Item 9: Use destructors to prevent resource leaks
Item 10: Prevent resource leaks in constructors
Item 11: Prevent exceptions from leaving destructors
Item 12: Understand how throwing an exception differs from passing a parameter or calling a virtual function
Item 13: Catch exceptions by reference
Item 14: Use exception specifications judiciously
Item 15: Understand the costs of exception handling

Efficiency
Item 16: Remember the 80-20 rule
Item 17: Consider using lazy evaluation
Item 18: Amortize the cost of expected computations
Item 19: Understand the origin of temporary objects
Item 20: Facilitate the return value optimization
Item 21: Overload to avoid implicit type conversions
Item 22: Consider using op= instead of stand-alone op
Item 23: Consider alternative libraries
Item 24: Understand the costs of virtual functions, multiple inheritance, virtual base classes, and RTTI

Techniques
Item 25: Virtualizing constructors and non-member functions
Item 26: Limiting the number of objects of a class
Item 27: Requiring or prohibiting heap-based objects
Item 28: Smart pointers
Item 29: Reference counting
Item 30: Proxy classes
Item 31: Making functions virtual with respect to more than one object

Miscellany
Item 32: Program in the future tense
Item 33: Make non-leaf classes abstract
Item 34: Understand how to combine C++ and C in the same program
Item 35: Familiarize yourself with the language standard

Contents of Effective STL

Chapter 1: Containers
Item 1: Choose your containers with care.
Item 2: Beware the illusion of container-independent code.
Item 3: Make copying cheap and correct for objects in containers.
Item 4: Call empty instead of checking size() against zero.
Item 5: Prefer range member functions to their single-element counterparts.
Item 6: Be alert for C++'s most vexing parse.
Item 7: When using containers of newed pointers, remember to delete the pointers before the container is destroyed.
Item 8: Never create containers of auto_ptrs.
Item 9: Choose carefully among erasing options.
Item 10: Be aware of allocator conventions and restrictions.
Item 11: Understand the legitimate uses of custom allocators.
Item 12: Have realistic expectations about the thread safety of STL containers.

Chapter 2: vector and string
Item 13: Prefer vector and string to dynamically allocated arrays.
Item 14: Use reserve to avoid unnecessary reallocations.
Item 15: Be aware of variations in string implementations.
Item 16: Know how to pass vector and string data to legacy APIs.
Item 17: Use "the swap TRick" to trim excess capacity.
Item 18: Avoid using vector<bool>.

Chapter 3: Associative Containers
Item 19: Understand the difference between equality and equivalence.
Item 20: Specify comparison types for associative containers of pointers.
Item 21: Always have comparison functions return false for equal values.
Item 22: Avoid in-place key modification in set and multiset.
Item 23: Consider replacing associative containers with sorted vectors.
Item 24: Choose carefully between map::operator[] and map::insert when efficiency is important.
Item 25: Familiarize yourself with the nonstandard hashed containers.

Chapter 4: Iterators
Item 26: Prefer iterator to const_iterator, reverse_iterator, and const_reverse_iterator.
Item 27: Use distance and advance to convert a container's const_iterators to iterators.
Item 28: Understand how to use a reverse_iterator's base iterator.
Item 29: Consider istreambuf_iterators for character-by-character input.

Chapter 5: Algorithms
Item 30: Make sure destination ranges are big enough.
Item 31: Know your sorting options.
Item 32: Follow remove-like algorithms by erase if you really want to remove something.
Item 33: Be wary of remove-like algorithms on containers of pointers.
Item 34: Note which algorithms expect sorted ranges.
Item 35: Implement simple case-insensitive string comparisons via mismatch or lexicographical_compare.
Item 36: Understand the proper implementation of copy_if.
Item 37: Use accumulate or for_each to summarize ranges.

Chapter 6: Functors, Functor Classes, Functions, etc.
Item 38: Design functor classes for pass-by-value.
Item 39: Make predicates pure functions.
Item 40: Make functor classes adaptable.
Item 41: Understand the reasons for ptr_fun, mem_fun, and mem_fun_ref.
Item 42: Make sure less<T> means operator<.

Chapter 7: Programming with the STL
Item 43: Prefer algorithm calls to hand-written loops.
Item 44: Prefer member functions to algorithms with the same names.
Item 45: Distinguish among count, find, binary_search, lower_bound, upper_bound, and equal_range.
Item 46: Consider function objects instead of functions as algorithm parameters.
Item 47: Avoid producing write-only code.
Item 48: Always #include the proper headers.
Item 49: Learn to decipher STL-related compiler diagnostics.
Item 50: Familiarize yourself with STL-related web sites.

Effective C++.epub Effective C++,3rd Edition,英文版 立即下载

相关推荐

英文原版Effective C++

英文版,Effective C++,经典的C++语言解说,解压即可,不要错过~~~

[翻译] Effective C++, 3rd Edition, Item 27: 最少化 casting(强制转型)(下)

(点击此处,接上篇)在深入探究 dynamic_cast 的设计意图之前,值得留意的是多数 dynamic_cast 的实现都相当慢。例如,至少有一种通用的实现部分地基于对 class names(类名)进行 string comparisons(字符串比较)。如果你在位于一个 single-inheritance hierarchy(单继承体系)四层深处的一个 object 上执行 dyna

艺术编程 2677

Effective_C++_3rd_Edition.pdf 英文原版

Effective_C++_3rd_Edition 很棒的C++进阶书 如果能够全部都懂看完 肯定会在语言学习的基础上得到很大的提升

[翻译] Effective C++, 3rd Edition, Item 31: 最小化文件之间的 compilation dependencies(编译依赖)(上)

Item 31: 最小化文件之间的 compilation dependencies(编译依赖)作者:Scott Meyers译者:fatalerror99 (iTePubs Nirvana)发布:http://blog.csdn.net/fatalerror99/你进入到你的 C++ 程序中,并对一个 class 的 implementation(实现)进行了细微的改变。提醒你

艺术编程 4619

Effective C++第三版英文版

Effective C++第三版英文版。 内含PDF和EPUB两种格式。 有人说C++程序员可以分成两类,读过Effective C++的和没读过的。世界顶级C++大师Scott Meyers成名之作的第三版的确当得起这样的评价。当您读过这本书之后,就获得了迅速提升自己C++功力的一个契机。 在国际上﹐本书所引起的反响﹐波及整个计算技术出版领域﹐余音至今未绝。几乎在所有C++书籍的推荐名单上﹐本书都会位于前三名。作者高超的技术把握力、独特的视角﹑诙谐轻松的写作风格﹑独具匠心的内容组织﹐都受到极大的推崇和仿效。这种奇特的现象﹐只能解释为人们对这本书衷心的赞美和推崇。

一步步教你离线安装vsftpd并配置FTP服务

在安装vsftpd之前,需确保系统更新至最新版本,并检查防火墙配置以允许FTP流量。安装过程涉及使用包管理器(如apt-get或yum)下载vsftpd及其依赖包,特别是在离线环境中,需先下载所有相关包并传输到目标机器。安装完成后,通过命令验证安装并启动服务。配置vsftpd包括编辑配置文件以设置访问权限和安全性参数,如匿名访问和本地用户访问。此外,需配置防火墙开放FTP端口,并通过FTP客户端测试服务。最后,建议进行安全配置,如禁用匿名访问和配置SSL/TLS加密,并设置日志记录以监控服务状态。

a_join的博客 2495

Effective系列经典著作,铺就程序员殿堂之路

Effective系列图书是我们学习中难以绕开的经典。经典书籍需要不断被重读,因为每一次重读都会带来新的体会。本文带来了5本Effective系列的经典著作,让我们一同迎着大师们的智慧之光,走向卓越。 1 《Effective C++:改善程序与设计的55个具体做法(第三版)中文版(双色)》 Effective C++: 55 Specific Ways to Improve Your Programs and Designs,3/e 【美】Scott Meyers 著 侯捷 译 有人说C++程序员可以

博文视点(北京)官方博客 1047

显示模组Bonding IC气泡问题的诊断与优化策略

本文深入分析了显示模组Bonding IC气泡问题的成因与优化策略,涵盖IC两端剥离气泡、彩虹状水汽气泡、电极下方无规律气泡及IC输入端气泡等类型。通过工艺参数优化、材料存储处理、清洁环境控制及维修品特殊处理等多维度解决方案,有效降低气泡不良率。同时介绍了纳米改性ACF材料、激光辅助排泡技术等前沿解决方案,为触控显示行业提供实用参考。

weixin_26805597的博客 425

Effective C++ 3nd 读书摘要(Third Edition 55 Specific Ways to Improve Your Programs and Design)

一、让自己习惯C++ Item1. 视C++为一个语言联邦 C++由以下部分组成:C、Object-Oriented C++、Template C++、STL Item2. 尽量以const、enum、inline代替#define Item3. 尽可能使用const 1.一共有这样几种const用法:char greeting[] = "Hello";

thy专栏 1302

STM32F103到F407移植OLED,为啥F4屏幕不亮?一个延时函数搞定时序问题

本文详细分析了STM32F103到F407移植OLED时屏幕不亮的问题,指出时钟频率差异导致的时序问题是关键原因。通过对比F103和F407的时钟架构差异,提供了精确延时函数的实现方法,并指导在I2C通信关键点插入适当延时,确保OLED正常显示。文章还涵盖了完整的测试方案和高级优化技巧,帮助开发者彻底解决移植中的时序问题。

weixin_30642561的博客 562

OCTF2016--piapiapia

知识点: php反序列化长度变化尾部字符串逃逸 目录扫描发现www.zip,下载得到源码 源码有index.php,输入账号密码后会进入profile.php,还有register.php、updata.php、class.php和config.php flag值在config.php中,想办法访问到其内容 通过seay代码审计找到一点线索 看到profile.php中存在任意文件读取漏洞,前面还有反序列化 现在我们有个大体思路了,update.php中有一个$prof..

Oavinci的博客 478

[翻译] Effective C++, 3rd Edition, 附录 B. 第二和第三版之间的 Item 映射

附录 B. 第二和第三版之间的 Item 映射作者:Scott Meyers译者:fatalerror99 (iTePubs Nirvana)发布:http://blog.csdn.net/fatalerror99/Effective C++ 的第三版在很多方面与第二版不同,其中最引人注目的是它包含很多新的信息。然而,第二版的大部分内容依然保留在第三版中,虽然经常会改变形式和位置

艺术编程 5821

YOLO26改进策略【Neck】| ICCV2025 反向卷积 Converse2D 数学逆运算提重构 + 特征域建模降伪影,提升多尺度目标检测精度

本文记录的是利用Converse2D 算子改进 YOLO26 的上采样。(Converse 2D Convolution)通过正则化最小二乘闭式解与深度化空间建模结合,实现YOLO26特征提取与上采样阶段的卷积逆运算及特征精准重构。本文利用算子,通过闭式解的非迭代计算还原卷积下采样后的原始特征,再通过可学习核与自适应正则化参数稳定逆问题求解,同时依托圆形填充与插值初始估计保留特征高频细节,对YOLO26中不同尺度检测目标的特征进行针对性重构强化、抑制卷积/转置卷积带来的伪影与信息损失干扰,在特征融合与上采样

Limiiiing的博客 666

[翻译] Effective C++, 3rd Edition, Preface(前言)

Preface(前言)作者:Scott Meyers译者:fatalerror99 (iTePubs Nirvana)发布:http://blog.csdn.net/fatalerror99/我在 1991 年写出了 Effective C++ 的最早版本,1997 年出了第二版,我更新了一些重要的方面的素材,但是,因为我不想使熟悉本书第一版的读者感到困惑,我尽最大可能保持了原有

艺术编程 2847

《八》:玩家位置同步(玩家防碰撞)

在VR大空间体验中,由于玩家佩戴头显设备无法直接观察彼此位置,容易发生碰撞。因此,需要将玩家的实时位置信息绘制在虚拟空间中,实现位置可视化。通过获取头显的位置和旋转角度等数据,可以推算出玩家的移动状态和位置。使用可序列化的玩家结构体,通过UDP将玩家数据发送到服务器,服务器接收并反序列化数据后,同步所有玩家的最新信息至各客户端。客户端根据接收到的数据渲染虚拟人物模型,实现动态位置更新。这一过程涉及数据序列化、反序列化、网络通信和实时渲染等技术,确保玩家在虚拟空间中的位置同步和可视化。

unitygroup的博客 420

行业变革下的功能安全落地痛点3:高阶智驾安全责任转移 —— 从 “人为中心” 到 “机器主责” 的产业阵痛

文章围绕高阶智驾(L3 级)落地挑战,探讨安全责任从 “人控” 向 “机控” 转移的本质、技术短板导致的责任模糊、全球法规实践及技术 - 法规 - 保险的破局路径。

my9111526 130

[翻译] Effective C++, 3rd Edition, Item 30: 了解 inlining(内联化)的来龙去脉(上)

Item 30: 了解 inlining(内联化)的来龙去脉作者:Scott Meyers译者:fatalerror99 (iTePubs Nirvana)发布:http://blog.csdn.net/fatalerror99/inline functions ——多么棒的主意啊!它们看起来像 functions,它们产生的效果也像 functions,它们在各方面都比 mac

艺术编程 5423

半导体器件仿真:双极型晶体管仿真_15.双极型晶体管的高级仿真技术

双极型晶体管(Bipolar Junction Transistor, BJT)是一种重要的半导体器件,广泛应用于放大、开关和调制等电路中。随着半导体技术的发展,对BJT的仿真要求也越来越高。本节将详细介绍双极型晶体管的高级仿真技术,包括器件模型的选择、仿真参数的优化、温度效应的考虑以及噪声分析等。

2401_87715305的博客 1251

C# 世界的《Effective C++》,来自.Net之父的核心揭秘

作为.NET程序员,如果只读三本书,那么《框架设计指南:构建可复用.NET库的约定、惯例与模式(第3版)》这本书一定不容错过!

博文视点(北京)官方博客 1137

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

《effective c++(第三版)》55个具体做法1

做法1

程序的尽头是数学,一日不推导赶不上买买提 210

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

Effective C++, Third Edition: 55 Specific Ways to Improve Your Programs and Designs - Cover

作者:Scott Meyers译者:fatalerror99 (iTePubs Nirvana)发布:http://blog.csdn.net/fatalerror99/

艺术编程 3256

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

[翻译] Effective C++, 3rd Edition, Item 3: 只要可能就用 const

Item 3: 只要可能就用 const作者:Scott Meyers译者:fatalerror99 (iTePubs Nirvana)发布:http://blog.csdn.net/fatalerror99/关于 const 的一件美妙的事情是它允许你指定一种 semantic(语义上的)约束:一个特定的 object(对象)不应该被修改。而 compilers(编译器)将执行

艺术编程 6679

Effective C++----3rd Edition, Item 1:将C++视为语言的联合体

Item 1: 将 C++ 视为 federation of languages(语言联合体) 作者:Scott Meyers 译者:fatalerror99 (iTePub's Nirvana) 发布:http://blog.csdn.net/fatalerror99/ 最初,C++ 仅仅是在 C 的基础上附加了一些 object-oriented(面向对象)的特性。C+

烽火前秦路 460

[翻译] Effective C++, 3rd Edition, Item 47: 为类型信息使用 traits classes(特征类)(上)

Item 47: 为类型信息使用 traits classes(特征类)作者:Scott Meyers译者:fatalerror99 (iTePubs Nirvana)发布:http://blog.csdn.net/fatalerror99/STL 主要是由 containers(容器),iterators(迭代器)和 algorithms(算法)的 templates(模板)构

艺术编程 6258
上一篇: [翻译] Effective C++, 3rd Edition, Item 48: 感受 template metaprogramming(模板元编程)
下一篇: [翻译] Effective C++, 3rd Edition, 附录 B. 第二和第三版之间的 Item 映射
fatalerror99
博客等级 码龄24年 166粉丝 20原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址