Skip to Content
C++语言导学(原书第2版)
book

C++语言导学(原书第2版)

by 本贾尼 斯特劳斯特鲁普
August 2021
Intermediate to advanced
450 pages
5h 35m
Chinese
Pearson
Content preview from C++语言导学(原书第2版)

8.2 标准库组件

标准库提供的设施可以分为如下几类:

·运行时语言支持(例如,对资源分配和运行时类型信息的支持)。

·C标准库(进行了非常小的修改,以便尽量减少与类型系统的冲突)。

·字符串(包括对国际字符集、本地化和子串只读视图的支持),参见9.2节。

·对正则表达式匹配的支持,参见9.4节。

·I/O流,这是一个可扩展的输入输出框架,用户可向其中添加自己设计的类型、流、缓冲策略、区域设定和字符集(参见第10章)。标准库中还有一个可移植的文件处理库(参见10.10节)。

·容器(如vector和map)和算法(如find()、sort()和merge())的框架,参见第11章和第12章。人们习惯上称这个框架为标准模板库(STL)[Stepanov,1994],用户可向其中添加自己定义的容器和算法。

·对数值计算的支持(例如标准数学函数、复数、支持算术运算的向量以及随机数发生器),参见4.2.1节和第14章。

·对并发程序设计的支持,包括thread和锁机制,参见第15章。在此基础上,用户就能够以库的形式添加新的并发模型。

·大多数STL算法和一些数值算法(如sort()和reduce())的并行版本,参见12.9节和14.3.1节。

·支持模板元程序设计的工具(如类型萃取,参见13.9节)、STL风格的泛型程序设计(如pair,参见13.4.3节)、通用程序设计(如variant和optional,参见13.5.1节和13.5.2节)和clock(参见13.7节)。

·支持高效、安全的通用资源管理以及可选的垃圾收集器的接口(参见5.3节)。

·用于资源管理的“智能指针”(如unique_ptr和shared_ptr,参见13.2.1节)。

·特殊用途容器,例如array(参见13.4.1节)、bitset(参见13.4.2节)和tuple(参见13.4.3节)。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

软件开发实践:项目驱动式的Java开发指南

软件开发实践:项目驱动式的Java开发指南

Raoul-Gabriel Urma, Richard Warburton
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787111633280