3. A Tour of C++: Abstraction Mechanisms

Don’t Panic!

– Douglas Adams

Introduction

Classes

Concrete Types; Abstract Types; Virtual Functions; Class Hierarchies

Copy and Move

Copying Containers; Moving Containers; Resource Management; Suppressing Operations

Templates

Parameterized Types; Function Templates; Function Objects; Variadic Templates; Aliases

Advice

3.1. Introduction

This chapter aims to give you an idea of C++’s support for abstraction and resource management without going into a lot of detail. It informally presents ways of defining and using new types (user-defined types). In particular, it presents the basic properties, implementation techniques, and language facilities used for concrete classes, abstract classes, and ...

Get The C++ Programming Language, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.