C++11 in the Wild: Techniques from a Real Codebase
Three techniques from a production C++11 codebase.
The Auto() macro allows writing arbitrary end-of-scope cleanup code in-line, with zero boilerplate and zero runtime overhead.
make_iterable() (alias boost::iterator_range) takes a pair of iterators and turns them back into a "container" usable in C++11's ranged for loop.
std::spaceship (not actually part of the standard) implements a Perl-style <=> operator in a maximally efficient way for C++11 tuples.
Arthur O'Dwyer worked for many years at Green Hills Software, making the world's most optimizing C and C++ compilers. These days he makes DNS servers at Nominum, speaks at C++ conferences, and is writing a book about the C++ Standard Library.
- Not Interested