Skip to content

cpp: force static functions #22

@ftynse

Description

@ftynse

Currently, the exported function is made static if its first argument is of a different type than its expected surrounding class (determined from the function name prefix).

There are "constructing" functions which make more sense as static rather than as instance functions, but with current generator it seems impossible to make them static. In particular, space construction:
isl_space_map_from_domain_and_range(isl_space *, isl_space *) makes more sense if translated as
isl::space::map_from_domain_and_range(domain, range) and not as domain.map_from_domain_and_range(range). Same goes for, e.g., isl_space_set_from_params.

I would suggest an extra tag __isl_export_ensure_static that forces the generator to produce a static function even if the function would be instance function otherwise. The danger here is to avoid a mixup with all the implicitly static functions with only __isl_export.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions