Skip to content
Snippets Groups Projects
Commit 1724b1b0 authored by Bernhard Manfred Gruber's avatar Bernhard Manfred Gruber
Browse files

fix lambda example to match the generator behavior of the solution

parent 64a24f64
Branches
No related tags found
1 merge request!17Fix lambda example to match the generator behavior of the solution
...@@ -10,7 +10,7 @@ using namespace std; ...@@ -10,7 +10,7 @@ using namespace std;
template<class T> template<class T>
struct Generator { struct Generator {
T m_value, m_step; T m_value, m_step;
Generator(T initial, T step):m_value(initial-step), m_step(step){}; Generator(T initial, T step):m_value(initial), m_step(step){};
T operator()() { T operator()() {
T cur_value = m_value; T cur_value = m_value;
m_value += m_step; m_value += m_step;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment