Perhaps the most popular Standard Library extension is the set of new smart pointer classes: std::
tr1::shared_ptr and its little known sibling, std::tr1::weak_ptr.
The class template std::tr1::array wraps a built-in array with a standard container's interface.
Similarly, a
tuple groups an arbitrary number of objects of unrelated types in single, container-like
object. With respect to algorithms, 11 new algorithms were voted into draft standard in June 2008.
Some of these algorithms fill holes in the C++98 standard, whereas others simplify common tasks.
Here are some of them:
● all_of( first, last, pred): This returns true if all elements in the range satisfy the predicate
pred
● any_of( first, last, pred): This returns true if any element in the range satisfies pred
● copy_n(first, n, result): This copies n elements into the result
● iota( first, last, value): For each element in the range, this assigns value and pre-increment
value by ++value
● none_of( first, last, pred): This returns true if none of the elements in the range satisfies
pred
Finally, the
range and subrange class templates of C++0x bundle pairs of iterators, thus
significantly simplifying certain sequence operations and compacting the signatures of many
popular algorithms.
The Road Ahead
The vast number of new features forces the committee to work at an incredible speed. A clear
statement of intent was made to complete work on the new standard at the San Francisco meeting
of September 2008 in order to achieve publication in 2009. To meet this ambitious timetable the
plan is to vote out a feature complete Working Draft at the next meeting. A Final Committee Draft
will be issued from the following meeting, allowing at least a minimal time for review and
"integration testing" of the new featuresparticularly a conceptualized Standard Library.
Danny Kalev is a certified system analyst and software engineer specializing in C++ and
theoretical linguistics. He has an MA degree in general linguistics and is the author of
Informit C++
Reference Guide and The ANSI/ISO Professional C++ Programmer's Handbook. Danny was a
member of the C++ standards committee between 1997 and 2000. Danny recently finished his MA
in general linguistics summa cum laude. In his spare time he likes to listen to classical music, read
Victorian literature, and explore new natural and formal languages alike. He also gives lectures
about programming and applied linguistics at academic institutes.
DevX is a division of Jupitermedia Corporation
© Copyright 2007 Jupitermedia Corporation. All Rights Reserved. Legal Notices