-
Notifications
You must be signed in to change notification settings - Fork 337
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
cxx_name attribute - function aliases, import/export static methods, … #220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks; I think the other approach is more promising to me though. I see that you noticed that #[cxx_side(name = "method", class = "C", static)]
can be condensed to #[cxx_side(name = "C::method", static)]
. But that's still a lot of redundancy because whether the method is a static member function or non-static member function is clear from whether it has a self: &C
/ self: &mut C
first argument. And once you are down to #[cxx_side(name = "C::method")]
that is just needless annoyance over the other style which was #[cxx_name = "C::method"]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing in favor of #218.
Thanks anyway!
Hi, currently it is impossible to do |
I guess the workaround is to wrap in non-static function. Thanks! |
I found a better solution for #218: cxx_side attribute
Features:
In the future we can add new features for this attribute: replace return type to UniquePtr/Box, implement constructors, etc.