Skip to content
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

Use FieldTypeTuple!S instead of typeof(S.tupleof). #1262

Conversation

denis-sh
Copy link
Contributor

FieldTypeTuple is what have to be used when searching through fields as it ignores hidden fields which we don't need here.

Replace in std.traits.hasElaborate{CopyConstructor,Assign,Destructor}.

@dnadlinger
Copy link
Member

LGTM, but could you maybe add a test case?

@denis-sh
Copy link
Contributor Author

No test cases - it is not a bugfix. A scan of additional void* in some cases doesn't affect these traits. It is just a bad style as an other trait may be created using the same technique and a nasty issue may occur (IMO).

@dnadlinger
Copy link
Member

Could you please make it clear that this is only a stylistic refactoring in the commit message then? "is what have to be used" sounds like if there actually was a difference in behavior.

Sorry for not following up earlier, but I'm rather busy right now.

`FieldTypeTuple` is what have to be used when searching through fields as it ignores hidden fields which we don't need here.

Replace in `std.traits.hasElaborate{CopyConstructor,Assign,Destructor}`. This is a refactoring change as hidden fields didn't affect these templates behaviour.
@denis-sh
Copy link
Contributor Author

Changed commit description.

dnadlinger added a commit that referenced this pull request Apr 23, 2013
…-of-`typeof(S.tupleof)`

Use `FieldTypeTuple!S` instead of `typeof(S.tupleof)`.
@dnadlinger dnadlinger merged commit 8391dcb into dlang:master Apr 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants