Skip to content

Automatic discovery for explicit template instantiations #73

@kwabenantim

Description

@kwabenantim

Summary

Currently template_substitutions need to be added to the yaml configuration to generate wrappers for each explicit instantiation of a class.

For example, Foo will need the yaml configuration below to generate wrappers for Foo<1>, Foo<2> and Foo<3>

Foo.hpp

template<unsigned SPACE_DIM>
class Foo {...}

Foo.cpp

...
template class Foo<1>;
template class Foo<2>;
template class Foo<3>;

config.yaml

...
template_substitutions:
  - signature: <unsigned SPACE_DIM >
    replacement: [[1], [2], [3]]

This configuration is needed because castxml only parses headers to extract the interface, but template instantiations are normally in cpp files.

One possible way to automate the discovery of template instantiations might be to add custom parsing logic in addition to the functionality provided by castxml.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions