C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
Modules
Here is a list of all modules:
[detail level 12]
 Chapter 1: Introduction"You can think of this chapter as a warm-up for the rest of the book..."
 Chapter 2: Traits and Type Manipulation"Metaprogramming as 'type computation'..."
 Exercise 2-0Define a metafunction to add const&
 Exercise 2-1Define a metafunction to replace types
 Exercise 2-2Rewrite boost::polymorphic_downcast
 Exercise 2-3Print data-types using Boost MPL
 Exercise 2-4Print data-types using a home-grown solution
 Exercise 2-5Describe a data-type in English
 Chapter 3: A Deeper Look at Metafunctions"Adding static type checking to traditionally unchecked operations."
 Exercise 3-0Redefine the binary template to sanity-check its parameter
 Exercise 3-1Transform a vector by adding 1 to all its elements
 Exercise 3-2Square all elements in a sequence
 Exercise 3-3Manipulate pointers with the twice metafunction
 Exercise 3-4Iteratively call twice to add pointers to a type
 Exercise 3-5Add multiplication and division that honors units of measurement
 Exercise 3-6Rewrite twice as a lambda
 Exercise 3-8Add the ability to specify units
 Chapter 4: Integral Type Wappers and Operators"How best to write metafunctions returning integral constants."
 Exercise 4-0Basic tests for MPL boolean operations
 Exercise 4-1Implement my own versions of Boost MPL boolean operations
 Exercise 4-2Implement my versions of MPL boolean operations with many arguments
 Exercise 4-3Weed out compile-time inefficiencies
 Exercise 4-4Implement some new type traits with existing MPL facilities
 Exercise 4-5Return different types based on parameter types
 Chapter 5: Sequences and Iterators"Compile-time STL."
 Exercise 5-0Exercise the parts of tiny we've implemented
 Exercise 5-1Double the numbers in the first half of a RandomAccessSequence
 Exercise 5-10Write a tree structure with different view-based traversals
 Exercise 5-2Make push_front as strict as push_back
 Exercise 5-3Implement insert for tiny sequences
 Exercise 5-4Reducing push_back template instantiations
 Exercise 5-5Add algorithms for tiny
 Exercise 5-6Present array dimensions as a numerical sequence
 Exercise 5-7Provide bi-directional iterators to Exercise 5-6
 Exercise 5-8Write Fibonacci sequences with Boost MPL's sequence APIs
 Exercise 5-9Limit the max number of elements in the Fibonacci sequence
 Chapter 6: AlgorithmsAll about the MPL algorithms
 Exercise 6-0Find the smallest type in a sequence with boost::mpl::copy
 Exercise 6-1Implement a binary to decimal converter as a sequence of binary digits
 Exercise 6-2Why is there no for_each?
 Exercise 6-3Insert into a binary tree
 Exercise 6-4Search a binary tree structure using an inserter
 Exercise 6-5Differences between STL algorithms and MPL ones
 Chapter 7: Views and Iterators Adaptors"This chapter covers the user of sequence views."
 Exercise 7-0Use zip_view
 Exercise 7-1Why use transform_view?
 Exercise 7-2Modify zip_iterator category to be "least refined."
 Exercise 7-3Implement rotate_view sequence view
 Exercise 7-4Create permutation_iterator
 Exercise 7-5Change permutation_iterator traversal
 Exercise 7-6Create permutation_view from permutation_iterator
 Exercise 7-7Create a reverse view and iterator
 Exercise 7-8Create crossproduct_view