Skip to content

Conversation

@ftynse
Copy link
Member

@ftynse ftynse commented Sep 27, 2017

Introduce the __isl_ensure_static macro that forces the generators to make the
method static if it would otherwise be an instance member function.

This macro is primarily intended for static constructors of an object from
another object of the same type, which are present in sets and spaces. Marking
such methods as constructors would interfere with standard copy construction.
Exporting them directly masks the fact of construction and is inconsistent with
other static methods serving as named constructors. Consider readbility of

isl::set s = isl::set::from_params(another_set);

enabled by this macro against

isl::set s = another_set.from_params();

Closes #22

Introduce the __isl_ensure_static macro that forces the generators to make the
method static if it would otherwise be an instance member function.

This macro is primarily intended for static constructors of an object from
another object of the same type, which are present in sets and spaces. Marking
such methods as constructors would interfere with standard copy construction.
Exporting them directly masks the fact of construction and is inconsistent with
other static methods serving as named constructors. Consider readbility of

	isl::set s = isl::set::from_params(another_set);

enabled by this macro against

	isl::set s = another_set.from_params();

Signed-off-by: Oleksandr Zinenko <git@ozinenko.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants