[Issue 8118] Impossible to initialize a member struct without default constructor or assigment

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 19 12:16:13 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8118



--- Comment #4 from wfunction at hotmail.com 2012-05-19 12:17:48 PDT ---
(In reply to comment #3)
> (In reply to comment #2)
> > No bug here you just diabled too much. Undisable opAssign.
> > 
> > It's opAssign that gets called whne a = ... is seen:
> > this() { s = S(to!int("1")); }
> > If opAssign is trivial it replaced with bitblit. (that is disable comes first!)
> 
> Uh, no, it's a bug IMO.
> 
> 
> I never asked for an assignment. I want to CONSTRUCT the object manually.

For example, pretend this is the Scoped struct. I *obviously* wouldn't want to
assign anything, but I'd want to construct the object.

The fact that it's **impossible** to call the constructor directly without an
assignment getting in the way (as far as I see) is a bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list