-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpp: force static functions #22
Comments
Good point. I have seen it also for isl::space::map_from_domain_and_range. An alternative name could be: __isl_constructor_static |
I was thinking about that name but wouldn't that require to replace all
already existing `__isl_export` that actually create a static
constructor with `__isl_constructor_static` ?
…On 25/09/17 10:08, Tobias Grosser wrote:
Good point. I have seen it also for isl::space::map_from_domain_and_range.
An alternative name could be:
__isl_constructor_static
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABcTa3tvqwIrqnm_sXxD-Vd_2MvJ-4k9ks5sl19ogaJpZM4PiUvW>.
|
Why? If you want to make it more explicit, what about: __isl_constructor_ensure_static I think the best is to submit a patch to isl and discuss with Sven. No need to have two bikesheding discussions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 asisl::space::map_from_domain_and_range(domain, range)
and not asdomain.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
.The text was updated successfully, but these errors were encountered: