Beyond the C++ Standard Library: An Introduction to Boost / Edition 1

Paperback (Print)
Buy New
Buy New from BN.com
$52.96
Used and New from Other Sellers
Used and New from Other Sellers
from $21.98
Usually ships in 1-2 business days
(Save 66%)
Other sellers (Paperback)
  • All (11) from $21.98   
  • New (9) from $21.98   
  • Used (2) from $51.74   

Overview

Introducing the Boost libraries: the next breakthrough in C++ programming

Boost takes you far beyond the C++ Standard Library, making C++ programming more elegant, robust, and productive. Now, for the first time, a leading Boost expert systematically introduces the broad set of Boost libraries and teaches best practices for their use.

Writing for intermediate-to-advanced C++ developers, Björn Karlsson briefly outlines all 58 Boost libraries, and then presents comprehensive coverage of 12 libraries you're likely to find especially useful. Karlsson's topics range from smart pointers and conversions to containers and data structures, explaining exactly how using each library can improve your code. He offers detailed coverage of higher-order function objects that enable you to write code that is more concise, expressive, and readable. He even takes you "behind the scenes" with Boost, revealing tools and techniques for creating your own generic libraries.

Coverage includes

  • Smart pointers that provide automatic lifetime management of objects and simplify resource sharing
  • Consistent, best-practice solutions for performing type conversions and lexical conversions
  • Utility classes that make programming simpler and clearer
  • Flexible container libraries that solve common problems not covered by the C++ Standard Library
  • Powerful support for regular expressions with Boost.Regex
  • Function objects defined at the call site with Boost.Bind and Boost.Lambda
  • More flexible callbacks with Boost.Function
  • Managed signals and slots (a.k.a. the Observer pattern) with Boost.Signals

The Boost libraries are proving so useful that many of them are planned for inclusion in the next version of the C++ Standard Library. Get your head start now, with Beyond the C++ Standard Library.

Read More Show Less

Product Details

  • ISBN-13: 9780321133540
  • Publisher: Addison-Wesley
  • Publication date: 7/22/2005
  • Edition description: New Edition
  • Edition number: 1
  • Pages: 432
  • Product dimensions: 7.32 (w) x 9.13 (h) x 0.87 (d)

Meet the Author

Björn Karlsson works as a Senior Software Engineer at ReadSoft, where he spends most of his time designing and programming in C++. He has written a number of articles about C++ and the Boost libraries for publications such as C/C++ Users Journal, Overload, and the online journal The C++ Source.

The C++ Source and has been a member of the editorial board of C/C++ Users Journal, where he is also one of the columnists in the Experts Forum. He participates in the Boost newsgroups and is one of the Boost-Users moderators.

Read More Show Less

Read an Excerpt

PrefacePreface

Dear Reader,

Welcome to Beyond the C++ Standard Library: An Introduction to Boost.

If you are interested in generic programming, library design, and the C++ Standard Library, this book is for you. Because the intended audience for the book is intermediate to advanced C++ programmers, there is little coverage of basic C++ concepts. As the title suggests, the focus of this book is on the Boost libraries—general usage, best practices, implementation techniques, and design rationale.

Almost from the day I discovered Boost, the people behind it, and the extraordinary libraries in it, I've wanted to write this book. It is amazing that a language as mature as C++ still offers room for exploration into higher-level abstractions as well as technical detail, all without requiring changes to the language. Of course, this is what sets C++ apart from many other programming languages: It is specifically and intentionally designed for extension, and the language's facilities for generic constructs are extremely powerful. This exploration is at the core of the Boost libraries and the Boost community itself. Boost is about making programming in C++ more elegant, more robust, and more productive. As discoveries are made and best practices are shaped, a great challenge faces the C++ community; to share this knowledge with others. In isolation, there is limited value to these remarkable findings, but when exposed to a larger audience, a whole industry will evolve.

This book shows how to use a selection of the wonderfully useful Boost libraries, teaches best practices for their use, and even goes behind the scenes to see how they actually work. The Boost libraries' license grants permission to copy, use, and modify the software for any use (commercial and non-commercial), so all you need to do is visit www.boost.org and download the latest version.

For all the C++ Standard Library aficionados out there, it is well known that a new revision of the Standard Library is in progress. From a standardization point of view, there are three primary areas where the C++ Standard Library is likely to change:

  • Fixing broken libraries
  • Augmenting missing features to existing libraries
  • Adding libraries that provide functionality that is missing in the Standard Library

The Boost libraries address all of these areas in one way or another. Of the 12 libraries covered in this book, six have already been accepted for inclusion in the upcoming Library Technical Report, which means that they will most likely be part of the next version of the Standard Library. Thus, learning about these libraries has excellent long-term value. I hope that you will find this book to be a valuable tool for using, understanding, and extending the Boost libraries. From that vantage, you'll want to incorporate those libraries and the knowledge enshrined within them into your own designs and implementations. That's what I call reuse.

Thank you for reading.

Björn Karlsson

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Table of Contents

Foreword.

Preface.

Acknowledgments.

About the Author.

Organization of This Book.

Introduction to Boost.

String and Text Processing

Data Structures, Containers, Iterators, and Algorithms

Function Objects and Higher-Order Programming

Generic Programming and Template Metaprogramming

Math and Numerics

Input/Output

Miscellaneous

I. GENERAL LIBRARIES.

Library 1: Smart_ptr.

How Does the Smart_ptr Library Improve Your Programs?

When Do We Need Smart Pointers?

How Does Smart_ptr Fit with the Standard Library?

scoped_ptr

scoped_array

shared_ptr

shared_array

intrusive_ptr

weak_ptr

Smart_ptr Summary

Library 2: Conversion.

How Does the Conversion Library Improve Your Programs?

polymorphic_cast

polymorphic_downcast

numeric_cast

lexical_cast

Conversion Summary

Library 3: Utility.

How Does the Utility Library Improve Your Programs?

BOOST_STATIC_ASSERT

checked_delete

noncopyable

addressof

enable_if

Utility Summary

Library 4: Operators.

How Does the Operators Library Improve Your Programs?

Operators

Usage

Operators Summary

Library 5: Regex.

How Does the Regex Library Improve Your Programs?

How Does Regex Fit with the Standard Library?

Regex

Usage

Regex Summary

II. CONTAINERS AND DATA STRUCTURES.

Library 6: Any.

How Does the Any Library Improve Your Programs?

How Does Any Fit with the Standard Library?

Any

Usage

Any Summary

Library 7: Variant.

How Does the Variant Library Improve Your Programs?

How Does Variant Fit with the Standard Library?

Variant

Usage

Variant Summary

Library 8: Tuple.

How Does the Tuple Library Improve Your Programs?

How Does the Tuple Library Fit with the Standard Library?

Tuple

Usage

Tuple Summary

III. FUNCTION OBJECTS AND HIGHER-ORDER PROGRAMMING.

Library 9: Bind.

How Does the Bind Library Improve Your Programs?

How Does Bind Fit with the Standard Library?

Bind

Usage

Bind Summary

Library 10: Lambda.

How Does the Lambda Library Improve Your Programs?

How Does Lambda Fit with the Standard Library?

Lambda

Usage

Lambda Summary

Library 11: Function.

How Does the Function Library Improve Your Programs?

How Does Function Fit with the Standard Library?

Function

Usage

Function Summary

Library 12: Signals.

How Does the Signals Library Improve Your Programs?

How Does Signals Fit with the Standard Library?

Signals

Usage

Signals Summary

Bibliography.

Index.

Read More Show Less

Preface

PrefacePreface

Dear Reader,

Welcome to Beyond the C++ Standard Library: An Introduction to Boost.

If you are interested in generic programming, library design, and the C++ Standard Library, this book is for you. Because the intended audience for the book is intermediate to advanced C++ programmers, there is little coverage of basic C++ concepts. As the title suggests, the focus of this book is on the Boost libraries—general usage, best practices, implementation techniques, and design rationale.

Almost from the day I discovered Boost, the people behind it, and the extraordinary libraries in it, I've wanted to write this book. It is amazing that a language as mature as C++ still offers room for exploration into higher-level abstractions as well as technical detail, all without requiring changes to the language. Of course, this is what sets C++ apart from many other programming languages: It is specifically and intentionally designed for extension, and the language's facilities for generic constructs are extremely powerful. This exploration is at the core of the Boost libraries and the Boost community itself. Boost is about making programming in C++ more elegant, more robust, and more productive. As discoveries are made and best practices are shaped, a great challenge faces the C++ community; to share this knowledge with others. In isolation, there is limited value to these remarkable findings, but when exposed to a larger audience, a whole industry will evolve.

This book shows how to use a selection of the wonderfully useful Boost libraries, teaches best practices for their use,and even goes behind the scenes to see how they actually work. The Boost libraries' license grants permission to copy, use, and modify the software for any use (commercial and non-commercial), so all you need to do is visit www.boost.org and download the latest version.

For all the C++ Standard Library aficionados out there, it is well known that a new revision of the Standard Library is in progress. From a standardization point of view, there are three primary areas where the C++ Standard Library is likely to change:

  • Fixing broken libraries

  • Augmenting missing features to existing libraries

  • Adding libraries that provide functionality that is missing in the Standard Library

The Boost libraries address all of these areas in one way or another. Of the 12 libraries covered in this book, six have already been accepted for inclusion in the upcoming Library Technical Report, which means that they will most likely be part of the next version of the Standard Library. Thus, learning about these libraries has excellent long-term value. I hope that you will find this book to be a valuable tool for using, understanding, and extending the Boost libraries. From that vantage, you'll want to incorporate those libraries and the knowledge enshrined within them into your own designs and implementations. That's what I call reuse.

Thank you for reading.

Björn Karlsson


© Copyright Pearson Education. All rights reserved.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted September 20, 2005

    strong new maths functions

    C++ may lack the glamour of Java, or Microsoft's advertising budget that massively promotes C#/.NET. But C++ still keeps moving along. This book chronicles recent tested innovations. It describes free code in the Boost libraries, that has been contributed by volunteers across the world. Karlsson speculates that several of these classes will soon be adopted into the official Standard Template Library. Perhaps. But the point of this book is that you don't have to wait for that official imprimateur to start using Boost. The book's snapshot of Boost lists 58 libraries. Karlsson gives thumbnail summaries of all these. He then proceeds to explain in detail 12 of them. Space considerations dictated this. The choice that he made is somewhat subjective. Based on my own background, I would have wished for more details on Boost.Graph. I've had to write my own code to find adjacency matrices and lists, and a comparison with what Graph offers would have been interesting. Come to think of it, most of the Maths and Numerics libraries sound useful. The Boost.Random might save you having to code a robust random number generator. Especially if you need one that exhibits high randomness. Maybe for crypto work? Speaking of which, look at Boost.Math. It has routines for finding the greatest common divisor and least common multiple. These are workhorse capabilities in number theory. With crypto often making heavy use of such methods. While Boost.Integer and Boost.Numeric Conversion may let you write safer code. So that you can better detect overflows. Needless to say, your interest may well differ from mine. Certainly, mine differed from the author's. But even the summaries that he gave are intriguing. And the libraries he covers more deeply are useful in their own ways. Perhaps to you, too.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)