Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How do you generate stubs for template class functions?

jfalter Posts: 2

When collecting stub information in my test configuration I am not finding references to our functions in template classes. Is there a way to generate stubs for our template class functions?

Here is an example of a template that we are using in another class that is under test. The function func_1 doesn't show up in when we collect stub information.

template <typename T>
class example_class_template


   : type_data()


   T func_1(T var)
      return type_data+=var;


   T type_data;



  • piotr
    piotr Posts: 36

    At this moment C/C++test supports stubs for non-template functions or fully specialized template functions.

    Creating stubs for regular template functions (or functions that are called from template functions) is not supported.