21. Boost Libraries, Technical Report 1 and C++0x

Objectives

In this chapter you will learn:

  • Future directions for C++.

  • What the Boost Libraries are.

  • A brief history of the Boost open source project, how new libraries are added to Boost, and how to install Boost.

  • To use Boost.Regex to search for strings, validate data and replace parts of strings using regular expressions.

  • To avoid memory leaks by using Boost.Smart_ptr to manage dynamic memory allocation and deallocation.

  • What Boost (and other) libraries are included in Technical Report 1 (TR1)—a description of the additions to the C++ Standard Library.

  • The changes to the core language and Standard Library coming in the new C++ Standard—C++0x.

  • To follow the Deitel online C++ Resource Centers for updates on the evolution of Boost, the Technical Reports and C++0x.

Outstanding leaders go out of their way to boost the self-esteem of their personnel.

Sam Walton

Practice and thought might gradually forge many an art.

Virgil

I think "No comment" is a splendid expression.

Sir Winston Spencer Churchill

So long as you are secure you will count many friends.

Ovid

The danger from computers is not that they will eventually get as smart as men, but we will meanwhile agree to meet them halfway.

Bernard Avishai

Outline

21.1 Introduction
21.2 Deitel Online C++ and Related Resource Centers
21.3 Boost Libraries
21.4 Adding a New Library to Boost
21.5 Installing the Boost Libraries
21.6 Boost Libraries in Technical Report 1 (TR1)
21.7 Regular Expressions with the Boost.Regex Library
  21.7.1 Regular Expression Example
  21.7.2 Validating User Input with Regular Expressions
  21.7.3 Replacing and Splitting Strings
21.8 Smart Pointers with Boost.Smart_ptr
  21.8.1 Reference Counted shared_ptr
  21.8.2 weak_ptr: shared_ptr Observer
21.9 Technical Report 1
21.10 C++0x
21.11 Core Language Changes
21.12 Wrap-Up