Allow default constructors for structs

IchorDev zxinsworld at gmail.com
Thu Aug 29 20:39:49 UTC 2024


On Thursday, 29 August 2024 at 14:28:09 UTC, Ogi wrote:
>  especially those who need C++ interop.

Yes, hello. Here I am. I had to manually write C++ constructor 
mangling to hack in default constructors for C++ interop! It 
SUCKED!

> Here’s how it can be implemented in a non-problematic way.
>
> A struct with a default constructor can only be instantiated by 
> an implicit constructor call, following the same rules as a 
> struct with a disabled default constructor.

Genius. This shouldn’t even need to become a DIP because it’s so 
genius.


More information about the dip.ideas mailing list