Victor A. Wagner Jr. wrote:
After reading (and re-reading a few times) the documentation on range, it appears to me that there is little (if any) difference between: boost::sub_range<T> and boost::iterator_range
I've been working on a N way merge algorithm for work, and thought it might be a nice chance to learn bost::range and maybe even get it general enough to submit for boost utility some day. At any rate. Here's the problem: I've written a test case and two implementations (work still in progress) but I get compile errors when I try to use sub_range.
the code can be found at http://www.noidea128.org/sourcefiles/15646~
to change the program from compiling/running the iterator_range to sub_range simply change the lne from:
Nway_merge(contain, ourmerged); -to- SNway_merge(contain, ourmerged);
my compiler (VC-8_0) gives two errors which I cannot decipher. Any assistance would be appreciated.... especially if I've misunderstood why sub_range instead of iterator_range.
Hi,
push_back adds constness to sub_range.
See:
#include <vector>
#include