C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise_5_1::double_first_half< S > Struct Template Reference

Double the values in the first half of the given sequence. More...

#include <exercise-5-1.hpp>

Inheritance diagram for exercise_5_1::double_first_half< S >:
exercise_5_1::double_first_half_impl< S, boost::mpl::vector_c< int >, boost::mpl::begin< S >::type >

Additional Inherited Members

- Public Types inherited from exercise_5_1::double_first_half_impl< S, boost::mpl::vector_c< int >, boost::mpl::begin< S >::type >
typedef boost::mpl::eval_if< boost::is_same< boost::mpl::begin< S >::type, typenameboost::mpl::end< S >::type >, boost::mpl::vector_c< int >, double_first_half_impl< S, typenameboost::mpl::push_back< boost::mpl::vector_c< int >, typenamemultiply_or_not::type >::type, typenameboost::mpl::next< boost::mpl::begin< S >::type >::type > >::type type
 Produce a result and keep iterating until we reach the end.
 

Detailed Description

template<typename S>
struct exercise_5_1::double_first_half< S >

Double the values in the first half of the given sequence.

Takes a RandomAccessSequence of integral constant wrappers of length N as an argument, and returns a copy with the first N/2 elements doubled in value.

Template Parameters
SThe sequence to transform.

Definition at line 124 of file exercise-5-1.hpp.


The documentation for this struct was generated from the following file: