RAD Studio
ContentsIndex
PreviousUpNext
W8031: Temporary used for parameter 'parameter' OR W8029 Temporary used for parameter 'number' OR W8030 Temporary used for parameter 'parameter' in call to 'function' OR W8032 Temporary used for parameter 'number' in call to 'function'

(Command-line option to suppress warning: -w-lvc) 

In C++, a variable or parameter of reference type must be assigned a reference to an object of the same type. 

If the types do not match, the actual value is assigned to a temporary of the correct type, and the address of the temporary is assigned to the reference variable or parameter. 

The warning means that the reference variable or parameter does not refer to what you expect, but to a temporary variable, otherwise unused.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!