Improve accessibility #124
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
accessor. Let accessors defined in a dispatch be aware of the overload types to generate better APIs. This also improves diagnostics and code completion from a modern IDE. Invoking aproxywill no longer cause confusion in IntelliSense (tested with the latest version of Visual Studio and VS Code). Resolves Unexpected intellisense error message in VS2022 #103+,-,++,--,*and&) requires the operator be defined in a same type to avoid ambiguity. Therefore, we have decided to divide the definition of operator dispatches in a new way: whether it applies to left-hand-side operand (LHS) or right-hand-side operand (RHS). As a result, for most cases (except for the 6 operators mentioned above),PRO_DEF_POSTFIX_OPERATOR_DISPATCHis replaced byPRO_DEF_LHS_OPERATOR_DISPATCH;PRO_DEF_PREFIX_OPEATOR_DISPATCHis replaced byPRO_DEF_RHS_OPERATOR_DISPATCH.__declspec(empty_bases)for MSVC to improve code generation for accessors. Covered by unit tests. Resolves Having two or more indirect conventions will makeproxy8 bytes larger than expected in MSVC #123+=,-=,*=,/=,&=,|=,^=,<<=,>>=), which was missing before this change. Covered by unit tests.