M
Martin Rennix
I have a function declared as:
void foo(T&);
And I'm trying to pass a Bar object by doing this:
foo(T());
My compiler (VC++ 2005) gives me a warning "nonstandard extension
used: conversion from T to T&.
It compiles successfully anayway, but I assume will not compile on
other compilers?
If I do:
T bar;
foo(bar);
it compiles without the warning.
So...my question is do I need to define named variables to pass to
reference parameters in order to remain within the standard?
Martin
void foo(T&);
And I'm trying to pass a Bar object by doing this:
foo(T());
My compiler (VC++ 2005) gives me a warning "nonstandard extension
used: conversion from T to T&.
It compiles successfully anayway, but I assume will not compile on
other compilers?
If I do:
T bar;
foo(bar);
it compiles without the warning.
So...my question is do I need to define named variables to pass to
reference parameters in order to remain within the standard?
Martin