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

Ensure that char doesn't box when using generic math #104684

Closed
wants to merge 1 commit into from

Conversation

tannergooding
Copy link
Member

These APIs weren't explicitly defined, so they deferred down to the DIM which can box on some runtimes or scenarios.

I went and checked what other DIMs weren't explicitly redefined and found the newer IUtf8SpanParsable APIs weren't handled on char, Int128/UInt128, BigInteger, or Complex. Additionally IUtf8SpanFormattable wasn't handled on BigInteger. I'll handle these in a different PR

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 10, 2024
@tannergooding tannergooding added area-System.Runtime and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 10, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

@stephentoub
Copy link
Member

which can box on some runtimes or scenarios.

Could you share an example where boxing was occurring?

@tannergooding
Copy link
Member Author

Could you share an example where boxing was occurring?

My mistake, the boxing was from a different bit of code in the sample I was looking at.

This one is fine since its a static method and therefore only ever deals with the TSelf. It's only the instance DIMs that are problematic since this is INumberBase<TSelf>

@stephentoub
Copy link
Member

Phew, ok, thanks :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants