S
Simon
Hi,
When defining a default value I was wondering if I could do the following...
// ---------------------------------------------------------------
....
const MyClass& GetMyClass( const MyClass& default = MyClass() );
....
// ---------------------------------------------------------------
On VS2008 the code compiles and works but I was wondering if this was
actually legal, (and not 'undefined' behaviour).
if it is legal, (as I think it is), can you think of anything wrong with
actually using that code?
Thanks
Simon
When defining a default value I was wondering if I could do the following...
// ---------------------------------------------------------------
....
const MyClass& GetMyClass( const MyClass& default = MyClass() );
....
// ---------------------------------------------------------------
On VS2008 the code compiles and works but I was wondering if this was
actually legal, (and not 'undefined' behaviour).
if it is legal, (as I think it is), can you think of anything wrong with
actually using that code?
Thanks
Simon