This article describes how to create stack based allocators for use with STL containers.
Vectors are one of the single most useful and most used objects in the STL. They are easy to use, and remove the burden of memory management from the user. It is possible to partially control memory usage by using functions like
reserve, but nothing is provided to free up excess memory. Users have come up with ways to trim a vector by hand, but with the advent of the new C++0x and its move semantics, the classic solution of copy-swaping has become excessively expensive. This article seeks to find a better solution.
Bjarne Stroustrup talks about the imminent C++0x standard and the forthcoming features it brings, the difficulties of standardizing programming languages in general, the calculated risks that the standards committee can afford to take with new features, and even his own New Year's resolutions.
Read along as Marc Gregoire provides a brief overview of TxF and TxR to give you an idea of what you can accomplish with it.
Std::tuple is a compact, fixed size container that packs a variable number of elements of different types. This property makes tuples useful in simulating multiple return types for a function, assigning and comparing multiple values simultaneously and abstracting complex data structures.
For every true C++ developer, the Standard C++ Library is the first choice for utility classes, collections and algorithms to streamline the development effort. Continuing on from the investment in core C++ programming improvements in Visual C++ 2008, Visual C++ 2010 introduces improvements in the Standard C++ Library related to C++ 0x, and this article focuses on advancements in Standard C++ collections and algorithms.