May 2018
Intermediate to advanced
328 pages
8h 15m
English
The pairwise function proposed for this problem must pair adjacent elements of an input range and produce std::pair elements that are added to an output range. The following code listing provides two implementations:
template <typename Input, typename Output>void pairwise(Input begin, Input end, Output result){ auto it = begin; while (it != end) ...Read now
Unlock full access