Export (0) Print
Expand All

The __if_not_exists Statement

__if_not_exists allows you to conditionally include code depending on whether the specified symbol does not exist.

__if_not_exist ( variable ) {
statements
}

where:

variable
The symbol whose existence you want to test for.
statements
One or more statements to execute if variable does not exists.

Remarks

__if_not_exists can be applied to identifiers both inside of and outside of a class. When testing for overload functions, you cannot test for a specific form of the overload.

__if_exists allows you to conditionally include code depending on whether the specified symbol exists.

Example

See __if_exists for an example of how to use __if_not_exists.

See Also

Selection Statements | C++ Keywords

Show:
© 2014 Microsoft