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

Simulate overload resolution in macros #110

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

mingxwa
Copy link
Collaborator

@mingxwa mingxwa commented Jun 4, 2024

The following macros are merged into their siblings without _WITH_DEFAULT suffix:

PRO_DEF_MEM_DISPATCH_WITH_DEFAULT
PRO_DEF_FREE_DISPATCH_WITH_DEFAULT
PRO_DEF_OPERATOR_DISPATCH_WITH_DEFAULT
PRO_DEF_PREFIX_OPERATOR_DISPATCH_WITH_DEFAULT
PRO_DEF_POSTFIX_OPERATOR_DISPATCH_WITH_DEFAULT
PRO_DEF_CONVERTION_DISPATCH_WITH_DEFAULT

The macro PRO_DEF_MEM_DISPATCH now accepts 2~4 arguments. The third argument can be specified as the new name of the member function. The forth argument is the default implementation.

Resolves #108
Resolves #109

@mingxwa mingxwa requested review from tian-lt and guominrui June 4, 2024 05:32
@mingxwa mingxwa self-assigned this Jun 4, 2024
@tian-lt tian-lt merged commit ddd4ef0 into microsoft:main Jun 4, 2024
4 checks passed
@mingxwa mingxwa deleted the user/mingxwa/improve-macro branch June 5, 2024 01:59
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.

Add support for renaming a member function Simplify syntax of helper macros
2 participants