主要内容

Cpp.TemplateFunction Class

Namespace: Cpp
Superclasses: AstNodeProperties

Represents the template_function nodes in the syntax tree of your code

Since R2026a

Description

The PQL class TemplateFunction represents the node template_function in the syntax tree of your code.

// example demonstrating template function nodes
template<typename T>
void foo(T t) {}

template<class U, int N>
U bar(U (&arr)[N]) { return arr[0]; }


int main() {
    foo<int>(42);
    int a[3] = {1,2,3};
    bar<int,3>(a);
    return 0;
}

The code shows template function definitions foo and bar. The class Cpp.TemplateFunction macthes with the call to these template functions..

Predicates

expand all

Version History

Introduced in R2026a