Splitting tuples

This recipe will show a tiny piece of the Boost.Fusion library's abilities. We'll be splitting a single tuple into two tuples, one with arithmetic types and the other with all the other types.

Splitting tuples

Getting ready

This recipe requires knowledge of Boost.MPL, placeholders, and Boost.Tuple. Read the following recipes from Chapter 1, Starting to Write Your Application, Combining multiple values into one for more information about tuples and Reordering parameters of a function for information about placeholders. Reading this chapter from the beginning is recommended.

How to do it...

This is possibly one of the hardest recipes in this chapter. ...

Get Boost C++ Application Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.