"Ioannis Vranos" <iv*@remove.this.grad.com> wrote in message
news:1110510959.80224@athnrd02...
The code is taken from another thread:
class Var_T
{
public:
Var_T( const int& i = int() )
Not an answer to your question, but...
That's confusing. What's the parameter list do? I'm guessing it
default-constructs a temporary integer if none is provided, which gets bound
to the const reference? Does that make i get the value 0 as part of the
default construction? If so, and if it's possible in the syntax, I think
I'd have made that "= int(0)" just to be obvious what the default initial
value is going to be.
Or the whole thing could have been avoided by just having an int instead of
a const int reference. There's no more overhead for an int than there is
for a reference, so why use the reference?
-Howard