cplusplus.co.il

Archive for the ‘tr1’ Category

Tuples

Posted on: 15/01/2010

One of the containers introduced within TR1 (which is already widely available – both in gcc and Visual Studio) is a Tuple type, which is adopted from The Boost Tuple Library. Tuple types are very convenient at times; For example, it is possible to return multipe values from a function through a tuple, or write more intuitive and expressive code by utilizing tuples.

In this post we will examine the functionality offered by the new Tuple container, and have a go at profiling its performance. Actually, the results of said profiling were a small (pleasant) surprise to me.

Read the rest of this entry »

Advertisements