|
C++ Template Metaprogramming
Solutions to the exercises throughout the book
|
Exists to inject functionality into the Boost MPL namespace. More...
Classes | |
| struct | advance< chapter5::tiny_iterator< Tiny, Pos >, N > |
| Iterator advance is simple numerical addition. More... | |
| struct | advance< chapter7::zip_iterator< IteratorSeq, random_access_iterator_tag >, N > |
Creates a sequence from the result of boost::mpl::advance. More... | |
| struct | at_impl< chapter5::tiny_tag > |
| Forward to tiny_at for O(1) access. More... | |
| struct | at_impl< chapter7::zip_view_tag > |
Create a sequence from the result of boost::mpl::at. More... | |
| struct | begin_impl< chapter5::tiny_tag > |
| Initialize the iterator with a position of 0. More... | |
| struct | begin_impl< chapter7::permutation_view_tag > |
| Load an iterator with the beginning to both sequences. More... | |
| struct | begin_impl< exercise_5_10::inorder_view_tag > |
| The begin algorithm needs to traverse to the leftmost element, creating iterators along the way. More... | |
| struct | begin_impl< exercise_5_6::dimensions_tag > |
| Just wrap the sequence in an iterator. More... | |
| struct | begin_impl< exercise_5_7::dimensions_b_tag > |
| Wrap an iterator around the front of the sequence. More... | |
| struct | 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 | begin_impl< exercise_6_1::binary_tag > |
| Simply return the binary type as is. More... | |
| struct | clear_impl< chapter5::tiny_tag > |
| Simply return a new, empty tiny sequence. More... | |
| struct | deref< chapter5::tiny_iterator< Tiny, Pos > > |
| Dereferencing the iterator is the first time we actually examine tiny. More... | |
| struct | deref< chapter7::permutation_iterator< CurIdxIter, SeqBegin > > |
| Advance the prescribed amount, and return the element found. More... | |
| struct | deref< exercise_5_10::inorder_view_iterator< chapter5::tree< Cur, L, R >, Parent, VisitCount > > |
| Grab the first value from the subtree contained in the iterator. More... | |
| struct | deref< exercise_5_10::inorder_view_iterator< Cur, Parent, VisitCount > > |
| This specialization is only for leaf nodes. Grab it directly from the iterator. More... | |
| struct | deref< exercise_5_6::dimensions_iterator< S > > |
| The iterator just contains a subset of the underlying sequence. More... | |
| struct | deref< exercise_5_7::dimensions_b_iterator< S > > |
| The sequence IS its identity, really. More... | |
| struct | deref< exercise_5_8::fibonacci_series_iterator< N, LastN > > |
| Give us N. More... | |
| struct | deref< exercise_6_1::binary< N > > |
| Algorithms require the full binary type for computations. More... | |
| struct | deref< exercise_7_7::reverse_iterator< ForwardIt > > |
| Undo double-indirection of the reverse_iterator. More... | |
| struct | distance< chapter5::tiny_iterator< Tiny, Pos1 >, chapter5::tiny_iterator< Tiny, Pos2 > > |
| Our iterators deal in integers, so simply subtract the two. More... | |
| struct | end_impl< chapter5::tiny_tag > |
| Finding the end requires tiny_size, which is O(1) complexity. More... | |
| struct | end_impl< chapter5::tree_tag > |
| Pass along our special "end" type. More... | |
| struct | end_impl< chapter7::permutation_view_tag > |
| An iterator with the end of the indices sequence and the beginning of the other. More... | |
| struct | end_impl< exercise_5_10::inorder_view_tag > |
| Simply returns inorder_view_iterator_end. More... | |
| struct | end_impl< exercise_5_6::dimensions_tag > |
The end is a boost::mpl::void_ type. More... | |
| struct | end_impl< exercise_5_7::dimensions_b_tag > |
Wrap an iterator around boost::mpl::void_. More... | |
| struct | end_impl< exercise_6_1::binary_tag > |
| When we have a value of 0, there are no more digits. More... | |
| struct | erase_impl< chapter5::tiny_tag > |
| Use our tiny_erase to form the new sequence in O(1) time. More... | |
| struct | insert_impl< chapter5::tiny_tag > |
Using tiny_insert is O(1) time. More... | |
| struct | next< chapter5::tiny_iterator< Tiny, Pos > > |
| Iterator next simply increments our numerical position info. More... | |
| struct | next< chapter7::permutation_iterator< CurIdxIter, SeqBegin > > |
| Advance only the index iterator. More... | |
| struct | next< chapter7::zip_iterator< IteratorSeq, Category > > |
| Creates a sequence of the next element for each (sub-)iterator. More... | |
| struct | next< exercise_5_10::inorder_view_iterator< chapter5::tree< Cur, L, R >, Parent, 0 > > |
| We've never visited this item, so we should start by going left. More... | |
| struct | next< exercise_5_10::inorder_view_iterator< chapter5::tree< Cur, L, R >, Parent, 1 > > |
| Seen this node once, so we should present it as the "next" item. More... | |
| struct | next< exercise_5_10::inorder_view_iterator< chapter5::tree< Cur, L, R >, Parent, 2 > > |
| Visited this node twice already, so the only place to go is right. More... | |
| struct | next< exercise_5_10::inorder_view_iterator< chapter5::tree< Cur, L, R >, Parent, 3 > > |
| Go back up the tree. If we reach "end" as the parent, we've fully traversed the tree. More... | |
| struct | next< exercise_5_10::inorder_view_iterator< chapter5::tree< Cur, L, R >, Parent, VisitCount > > |
| This is an error – Visit count must not be [0,3]. More... | |
| struct | next< exercise_5_10::inorder_view_iterator< chapter5::tree< Cur, L, void_ >, Parent, 2 > > |
| Same as above, but R node is empty, so go back up... More... | |
| struct | next< exercise_5_10::inorder_view_iterator< chapter5::tree< Cur, void_, R >, Parent, 0 > > |
| Same as above, but L node is empty, so go back up... More... | |
| struct | next< exercise_5_10::inorder_view_iterator< Cur, Parent, 0 > > |
| Visiting a leaf for the first time: present it as the "next" item. More... | |
| struct | next< exercise_5_10::inorder_view_iterator< Cur, Parent, VisitCount > > |
| In-order traversal. More... | |
| struct | next< exercise_5_6::dimensions_iterator< S > > |
| The sequence itself defines "next". More... | |
| struct | next< exercise_5_7::dimensions_b_iterator< S > > |
| Next is defined by the sequence. More... | |
| struct | next< exercise_5_8::fibonacci_series_iterator< 1134903170, 701408733 > > |
| Establish an end (based on 32-bit signed int size). More... | |
| struct | next< exercise_5_8::fibonacci_series_iterator< N, LastN > > |
| Make the new N the sum of both numbers; save the old N. More... | |
| struct | next< exercise_6_1::binary< N > > |
| Strip the least-significant binary digit from the number. More... | |
| struct | next< exercise_7_7::reverse_iterator< ForwardIt > > |
| Turn next into prior. More... | |
| struct | pop_back_impl< chapter5::tiny_tag > |
| This forwards operation to the erase metafunction. More... | |
| struct | pop_back_impl< exercise_5_7::dimensions_b_tag > |
| Popping from the back just means drop one array dimension. More... | |
| struct | pop_front_impl< chapter5::tiny_tag > |
| This forwards operation to the erase metafunction. More... | |
| struct | prior< chapter5::tiny_iterator< Tiny, Pos > > |
| Iterator prior simply decrements our numerical position info. More... | |
| struct | prior< chapter7::permutation_iterator< CurIdxIter, SeqBegin > > |
| Move only the index iterator. More... | |
| struct | prior< chapter7::zip_iterator< IteratorSeq, Category > > |
| Specialize prior, but only for bidirection or better iterator types. More... | |
| struct | prior< exercise_5_7::dimensions_b_iterator< S > > |
| Prev is defined by the sequence. More... | |
| struct | prior< exercise_5_8::fibonacci_series_iterator< 0, 1 > > |
| Don't go before 0... More... | |
| struct | prior< exercise_5_8::fibonacci_series_iterator< 1, 1 > > |
| Special case because we chose an irregular "begin" iterator value. More... | |
| struct | prior< exercise_5_8::fibonacci_series_iterator< N, LastN > > |
| Backward iteration is computable easily. More... | |
| struct | prior< exercise_7_7::reverse_iterator< ForwardIt > > |
| Turn prior into next. More... | |
| struct | push_back_impl< chapter5::tiny_tag > |
| If we can insert, use that, otherwise, use tiny_push_back. More... | |
| struct | push_back_impl< chapter5::tree_tag > |
| Alter a tree structure by adding an element with sorted placement. More... | |
| struct | push_back_impl< exercise_5_7::dimensions_b_tag > |
| Just convert the input to an integer, and add to the array dimension. More... | |
| struct | push_front_impl< chapter5::tiny_tag > |
| Front insertion is straightforward. Assert we're not already full. More... | |
| struct | rbegin |
| Grab a reverse_iterator from the a sequence directly. More... | |
| struct | rend |
| Acquire a reverse_iterator at the end of a sequence. More... | |
| struct | size_impl< chapter5::tiny_tag > |
| Forward the MPL size lambda over to tiny_size. More... | |
Exists to inject functionality into the Boost MPL namespace.