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

Add ToString() methods to ordinary typedef structs #1020

Merged
merged 1 commit into from
Aug 11, 2023
Merged

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Aug 11, 2023

No description provided.

@AArnott AArnott enabled auto-merge August 11, 2023 20:36
@AArnott AArnott merged commit 204a18a into main Aug 11, 2023
@AArnott AArnott deleted the typedefToString branch August 11, 2023 20:55
@elachlan
Copy link
Contributor

We are running into an issue where we have implemented BOOL.ToString() => ((bool)this).ToString(); This clashes with this change. Obvious solution would be to rename the winforms ToString to something else.

Does returning to hex value for BOOL make sense though?

@AArnott
Copy link
Member Author

AArnott commented Sep 15, 2023

I could imagine CsWin32 special casing BOOL to print a boolean value. However since some uses of BOOL stick more values into it than the customary two, it may indeed be useful to print its full value as an integer.

@AArnott
Copy link
Member Author

AArnott commented Sep 15, 2023

Another option is to notice that your compilation already defines a ToString method and suppress automatic generation.

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