首页
学习
活动
专区
工具
TVP
发布

C++核心准则原文翻译

专栏成员
465
文章
278970
阅读量
44
订阅数
C++核心准则​NL.16:使用常规的类成员声明顺序
A conventional order of members improves readability.
面向对象思考
2020-12-15
6920
C++核心准则​Pro.bounds:边界安全群组
This profile makes it easier to construct code that operates within the bounds of allocated blocks of memory. It does so by focusing on removing the primary sources of bounds violations: pointer arithmetic and array indexing. One of the core features of this profile is to restrict pointers to only refer to single objects, not arrays.
面向对象思考
2020-11-10
6210
C++核心准则​​SL.con.2:除非有理由使用其他容器,默认使用STL vector
vector and array are the only standard containers that offer the following advantages:
面向对象思考
2020-10-30
3950
C++核心准则Con.2:默认情况下,将成员函数定义为const类型
A member function should be marked const unless it changes the object's observable state. This gives a more precise statement of design intent, better readability, more errors caught by the compiler, and sometimes more optimization opportunities.
面向对象思考
2020-08-18
7070
C++核心准则Per.19:以可以预测的方式访问内存
Performance is very sensitive to cache performance and cache algorithms favor simple (usually linear) access to adjacent data.
面向对象思考
2020-06-28
3950
C++核心准则C.145:通过指针或引用访问多态对象
If you have a class with a virtual function, you don't (in general) know which class provided the function to be used.
面向对象思考
2020-03-25
5560
没有更多了
社区活动
【纪录片】中国数据库前世今生
穿越半个世纪,探寻中国数据库50年的发展历程
Python精品学习库
代码在线跑,知识轻松学
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档