Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Simulate overload resolution in macros#110

Merged
tian-lt merged 1 commit intomicrosoft:mainfrom
mingxwa:user/mingxwa/improve-macro
Jun 4, 2024
Merged

Simulate overload resolution in macros#110
tian-lt merged 1 commit intomicrosoft:mainfrom
mingxwa:user/mingxwa/improve-macro

Conversation

@mingxwa
Copy link
Contributor

@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 guominrui and tian-lt 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
@mingxwa mingxwa deleted the user/mingxwa/improve-macro branch June 5, 2024 01:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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