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

✨ Convert double to Number implicitly #32

Merged
merged 11 commits into from
Dec 30, 2024
Merged

Conversation

SizzinSeal
Copy link
Member

@SizzinSeal SizzinSeal commented Dec 27, 2024

Overview

title

Motivation

Consider the following:

Number num = double(2);

This code does not compile, even though it really should

Implementation

Number is defined manually instead of through macros, so the constructor is not marked explicit

@SizzinSeal SizzinSeal self-assigned this Dec 28, 2024
@sufferiing
Copy link
Member

If we want to have Number have some special behavior, I think it might be better to define it manually rather than through the NEW_UNIT macro. I would like to try to keep these macros from getting any more complex.

@SizzinSeal SizzinSeal changed the title ✨ Convert Number to double implicitly ✨ Convert Number to and from arithmetic types implicitly Dec 28, 2024
@SizzinSeal SizzinSeal changed the title ✨ Convert Number to and from arithmetic types implicitly ✨ Convert double to Number implicitly Dec 29, 2024
@sufferiing sufferiing merged commit cfc47fc into main Dec 30, 2024
3 checks passed
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.

2 participants