[Issue 12918] Copying-constructing structs onto the heap
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Jun 14 02:34:25 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12918
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #1 from bearophile_hugs at eml.cc ---
(In reply to Jonathan M Davis from comment #0)
> I think that this code should compile
>
> struct Foo
> {
> int i;
> }
>
> void main()
> {
> auto f = Foo(5);
> auto g = new Foo(f);
> }
Implicit functionality cause problems, so you need something significant to
justify its presence. What are some use cases of code like that?
--
More information about the Digitalmars-d-bugs
mailing list