-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
std.complex: Add member function to returnComplex as a native type #8415
Conversation
Thanks for your pull request, @ibuclaw! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#8415" |
5654458
to
8d9d9e9
Compare
@@ -478,6 +478,17 @@ if (isFloatingPoint!T) | |||
} | |||
return this; | |||
} | |||
|
|||
auto toNative() |
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.
Can you give this a Ddoc comment?
As Dennis mentioned, this should have documentation. Maybe a documented unit test. The one you added would serve well IMO. Otherwise LGTM. |
std/complex.d
Outdated
|
||
auto toNative() | ||
{ | ||
import core.stdc.config; |
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.
Buildkite:
std/complex.d(484:16)[warn]: Local imports should specify the symbols being imported to avoid hiding local symbols.
Why not a Ddoc comment though? |
@dukc I simply followed the style that is currently present. But I made it a ddoc comment now. |
So that
std.complex
can be passed to extern(C) complex functions where ABI compatibility is required.