![]()
April 2002
Volume 20 Number 4TESTING AND DEBUGGING
Debugging Memory Errors with Custom Allocators
Cristian Vlasceanu
Allocators may be weird, but it's a Good Weird. With a little help from your operating system, they can even find memory access errors.Tracing Exceptions with an Exception Stack
Richard Nies
Ever wonder what happened to that lost exception? Traceable exceptions to the rescue!An Efficient and Flexible Tracing Technique
Dmitri Leman
This extensible tracing framework tames the dreaded multithreaded debugging demon.FEATURES
Smart Pointers in Boost
Bjorn Karlsson
Welcome to Boost, the peerless community of C++ innovators. If you can't find what you need in the Standard C++ library, chances are Boost has it production-ready.BOOK REVIEW
Modern C++ Design
reviewed by Herb Sutter
An informative review of a revolutionary book.C/C++ CONTRIBUTING EDITORS
STL & Generic Programming: STL Algorithms
Thomas Becker
Wait! Dont write that algorithm! Someone already did. But if you insist, follow this advice.C++ Made Easier: Plain Old Data
Andrew Koenig & Barbara E. Moo
Refresh your memory on why traditional techniques for processing plain old data don't apply to objects.Common Knowledge: Metaprogrammed Adapters
Steve Dewhurst
A little template metaprogramming goes a very long way. This time it lets you treat multiple sequences as a single, logical sequence. Cool.Post-Mortem Debunker: Spurious Precision
Stan Kelly-Bootle
Caveat Reador: You may question your understanding of numbers after you read this.DEPARTMENTS
Editors Forum
New Products
We Have Mail
C++ EXPERTS ON THE WEB
In this web-only component of CUJ, we publish columns by experts involved in the development, standardization, and deployment of C++. The following articles are featured on the CUJ website this month:
Generic<Programming>: Discriminated Unions (I)
by Andrei Alexandrescu
Discriminated unions are an important data abstraction, very helpful in database interfaces, efficient parsers, and various other type-safe abstractions. Usually, support for discriminated unions must be present in the language. This column presents a full-blown source-level implementation of discriminated unions in existing C++, an implementation that satisfies most of the requirements that one would normally ask from an innate language feature, syntactic nicety included.The New C++: The Group of Seven Extensions under Consideration for the C++ Standard Library
by Herb Sutter
In this months column, we visit the Group of Seven. No, not the Canadian artists, but rather the first group of seven suggested C++ Standard library extensions considered at the most recent standards meeting in October 2001.The Standard Librarian: Hash Tables for the Standard Library
by Matt Austern
The C++ Standard library is being extended, and the standardization committee is looking for proposals. This column gives you an idea of what a proposal should look like, by presenting a sample proposal on hash tables.Conversations: To Sleep, Perchance
by Jim Hyslop and Herb Sutter
Just how many threading and streaming mistakes can arise in one poor little dozen-line function? Quite a few, and thats not even counting the magic... The effects of sleep deprivation can have an astonishing effect on the clarity of ones code.