C++ Template Metaprogramming
Solutions to the exercises throughout the book
|
Solution to Exercise 5-8. More...
#include <boost/static_assert.hpp>
#include <boost/mpl/advance.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/iterator_tags.hpp>
#include <boost/mpl/next_prior.hpp>
Go to the source code of this file.
Classes | |
struct | exercise_5_8::fibonacci_series_tag |
A tag for tag-dispatched sequence metafunctions. More... | |
struct | exercise_5_8::fibonacci_series_iterator< N, LastN > |
Iterator for moving through Fibonacci series sequence. More... | |
struct | exercise_5_8::fibonacci_series |
The Fibonacci series for use with Boost MPL sequences. More... | |
struct | boost::mpl::begin_impl< exercise_5_8::fibonacci_series_tag > |
Start with 1 in the "last" position so we don't waste time with 0+0. More... | |
struct | boost::mpl::begin_impl< exercise_5_8::fibonacci_series_tag >::apply |
struct | boost::mpl::next< exercise_5_8::fibonacci_series_iterator< N, LastN > > |
Make the new N the sum of both numbers; save the old N. More... | |
struct | boost::mpl::deref< exercise_5_8::fibonacci_series_iterator< N, LastN > > |
Give us N. More... | |
Namespaces | |
namespace | exercise_5_8 |
Encapsulate solution for Exercise 5-8. | |
namespace | boost |
Exists to inject functionality into the Boost namespace. | |
namespace | boost::mpl |
Exists to inject functionality into the Boost MPL namespace. | |
Solution to Exercise 5-8.
Definition in file exercise-5-8.hpp.