![]()
June 2003
Volume 21 Number 6Algorithms
An Algorithm for Error Correcting Cyclic Redundance Checks
Bill McDaniel
A straightforward technique to leverage the error-correcting capability inherent in CRCs.Building a Mutable Set
Brian Ruud
Getting around the immutability of std::set in the name of performance.FEATURES
Function Overloading Based on Arbitrary Properties of Types
Howard Hinnant, Jaakko Järvi, Andrew Lumsdaine and Jeremiah Willcock
With these groundbreaking Function Enablers, you have much more control over function overload resolution than you thought.CONTRIBUTING EDITORS
The Embedded Angle Déjà Vu
Miro Samek
It's Déjà Vu all over again as Miro reveals the object-oriented nature of the behavorial abstractions that pervade embedded programs.STL & Generic Programming Expression Templates
Thomas Becker
This is the second in a short series of articles on the subject of using C++ template and template metaprogramming techniques to create highly efficient code that makes C++ acceptable for scientific and numerical programming. In my last column, I talked about loop unrolling via inline function templates. I also mentioned a much more difficult problem, namely, the elimination of gratuitous temporary objects and gratuitous loop iterations when overloading operators such as operator+ for algebraic objects such as matrices. Expression templates solve that problem. Todd Veldhuizen and David Vandevoorde independently invented expression templates. Todd Veldhuizen's original article from the now defunct C++ Report is reprinted in C++ Gems [1]. David Vandevoorde's take on expression templates can be found in the book on C++ templates he wrote with Nicolai Josuttis [2]. This book is highly recommended reading even if you're not all that interested in advanced topics such as expression templates. It is clearly the definitive source and reference for all your template-related questions.Conversations Imagine
Jim Hyslop and Herb Sutter
Portability without #idefs? It's (sort of) easy if you really try.C++ Made Easier Simple Loops, Generalized
Andrew Koenig and Barbara E. Moo
Compelling motivation for a universal loop-coding style.DEPARTMENTS
Editor's Forum
New Products
We Have Mail
C++ EXPERTS ON THE WEB
Generic <Programming> Enforcements
by Andrei Alexandrescu and Petru Marginean
You gotta love writing error-handling codeyou know, all the joy of testing conventions and formatting strings and throwing exceptions and... This is no joke. After you read "Enforcements," maybe you'll agree: error handling can be fun. The inimitable duo of ScopeGuard fame hits again, this time to take the boredom away from error-handling code.The New C++ Tuple Types
by Herb Sutter
Generalized tuple types are available in other languages, though not in Standard C++. One of the first two library extensions to be adopted by the standards committee since the first standard was closed was tuple typesÑand it is a testament to the power of C++, particularly the power of C++ templates, that this could be done well entirely as a library, without any changes to the core language.Common Knowledge N-Ary Nibbling
by Steve Dewhurst
Can't get by with 500-bit compile time arithmetic? Nibble away at template instantiation recursion depth problems and work with 5000-bit precison instead.Book Review: "Real-Time Design Patterns"
by Graham Wall
Bruce Powel Douglass's "Real-Time Design Patterns" is a well organized wealth of information that features an accurate catalog of highly recognizable real-time patterns.Resource Patterns
by Bruce Powel Douglass
This excerpt from Bruce Powel Douglass's "Real-Time Design Patterns" investigates resource patterns, such as the Critical Section Pattern, the Priority Inheritance Pattern, and the Highest Locker Pattern.Boost Corner Generic Printable ENUM++
by Mitch Besser
Luckily, templates are not the only tool for generating code or writing generic C++. The Boost library contains a framework of macros that help when C++ templates fall short.