Contenuto principale

Cpp.GenericExpression Class

Namespace: Cpp
Superclasses: AstNodeProperties

Represents the generic_expression nodes in the syntax tree of your code

Since R2026a

Description

The PQL class Cpp.GenericExpression represents the node generic_expression in the syntax tree of your code.

// c11 example using _Generic expression
#include <stdio.h>

int main(void) {
    int x = 3;
    int y = _Generic(x, int: 1, float: 2);
    (void)y;
    return 0;
}

The _Generic(x, int: 1, float: 2) expression in the code corresponds to the generic_expression node and is represented by Cpp.GenericExpression in PQL.

Predicates

expand all

Version History

Introduced in R2026a