Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Preface

Algorithms + Data Structures = Programs.

--Niklaus Wirth

Description

Fusion is a library for working with heterogenous collections of data, commonly referred to as tuples. A set of containers (vector, list, set and map) is provided, along with views that provide a transformed presentation of their underlying data. Collectively the containers and views are referred to as sequences, and Fusion has a suite of algorithms that operate upon the various sequence types, using an iterator concept that binds everything together.

The architecture is modeled after MPL which in turn is modeled after STL. It is named "fusion" because the library is a "fusion" of compile time metaprogramming with runtime programming.

Motivation

Tuples are powerful beasts. After having developed two significant projects (Spirit and Phoenix) that relied heavily metaprogramming, it became apparent that tuples are a powerful means to simplify otherwise tricky tasks; especially those that require a combination of metaprogramming and manipulation of heterogenous data types with values. While MPL is an extremely powerful metaprogramming tool, MPL focuses on type manipulation only. Ultimately, you'll have to map these types to real values to make them useful in the runtime world where all the real action takes place.

As Spirit and Phoenix evolved, patterns and idioms related to tuple manipulation emerged. Soon, it became clear that those patterns and idioms were best assembled in a tuples algorithms library. David Abrahams outlined such a scheme in 2002. At that time, it just so happened that Spirit and Phoenix had an adhoc collection of tuple manipulation and traversal routines. It was an instant AHA! moment.

How to use this manual

Some icons are used to mark certain topics indicative of their relevance. These icons precede some text to indicate:

Table 1.1. Icons

Icon

Name

Meaning

note

Note

Information provided is auxiliary but will give the reader a deeper insight into a specific topic. May be skipped.

alert

Alert

Information provided is of utmost importance.

caution

Caution

A mild warning.

tip

Tip

A potentially useful and helpful piece of information.

This documentation is automatically generated by Boost QuickBook documentation tool. QuickBook can be found in the Boost Tools.

Support

Please direct all questions to Spirit's mailing list. You can subscribe to the Spirit Mailing List. The mailing list has a searchable archive. A search link to this archive is provided in Spirit's home page. You may also read and post messages to the mailing list through Spirit General NNTP news portal (thanks to Gmane). The news group mirrors the mailing list. Here is a link to the archives: http://news.gmane.org/gmane.comp.parsers.spirit.general.


PrevUpHomeNext