assignment operator

Hello forum,

I have a list defined as follows:
 
std::list<LaserLine> laserList;


Then I have declared an non-constant iterator to go through the list as follows:

1
2
3
4
5
6

while(iter != lasetList.end())
{
   LaserLine &line = *iter; 
}


My question is does the default constructor get called with the statement inside the while statement ?

I have already checked with the help of the debugger that values (variables of the LaserLine ) from the previous iteration remains there unless updated in the current iteration. This is strage .


Any idea ?
&line is a reference. There is no constructor, line is just an alias for the current list element.
Topic archived. No new replies allowed.