-
-
Notifications
You must be signed in to change notification settings - Fork 380
Add documentation about "Nested template" feature. #479
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
Conversation
Are you sure this belongs in the language specification? If it is a limitation of the current implementation, it should be clearly noted that these restrictions will go away in the future. |
@CyberShadow To explain about language/implementation limitation is much better than nothing is written. I'm placed the description under the "Limitation" section. On the other hand, I don't know the limitation can be surely resolved in the future. See issue 5710 for the detailed discussion. |
Sorry, didn't see that. Thanks.
Thanks, that was insightful. But I do not see any conceptual problems:
|
Current ABI specification describes that member functions and nested functions are called by exactly same call convention, and it is strongly tied to the delegate object memory layout. That is why fixing alias parameter issue will change the delegate memory layout. |
Sorry if I wasn't clear - I meant to delay solving the problem of taking the address of a function with multiple context pointers. Calling the function directly can use any calling convention that the implementation wants. This will also be an opportunity to improve the error message: e.g. when you try to take the address of such a function, the compiler could say:
BTW, in the original issue I brought up the function was getting called in CTFE, so there it's not even a question of codegen, just semantics. |
LGTM, please rebase |
Why close the pull though? |
I didn't mean to. |
---- | ||
) | ||
|
||
$(P In above, $(D Foo!().foo) will work just same as member function |
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.
s/In above/above/
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.
s/just same as member/just the same as a member/
otherwise lgtm at least for now |
Thanks for many corrections. Updated. |
Add documentation about "Nested template" feature.
Thanks! |
From the discussion in issue 11946, I felt necessity of clear documentation about "Nested Templates" feature.
Note that, this is not a new feature from 2.065. it has been existed from early D2 age, although it was not well documented.