RAD Studio
ContentsIndex
PreviousUpNext
E2137: Destructor for 'class' required in conditional expression (C++)

If the compiler must create a temporary local variable in a conditional expression, it has no good place to call the destructor because the variable might or might not have been initialized. 

The temporary can be explicitly created, as with classname(val, val), or implicitly created by some other code. 

You should recast your code to eliminate this temporary value.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!