[go: up one dir, main page]

Menu

[5a71d8]: / lazy / lazy_algorithm.cpp  Maximize  Restore  History

Download this file

25 lines (15 with data), 486 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "algorithm.h"
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> input(100);
vector<int> output(100);
fill(input.begin(),input.end(),555);
fill(output.begin(),output.end(),333);
iterator_range_to_la<vector<int>::iterator>
lazy_input = create_lazy_stream(input.begin(),input.end()); // creating input stream
flush_to_iterator(output.begin(),lazy_input); // flushing lazy stream to container
return 0;
}