Can I call the default opAssign after overloading opAssign?

Jonathan M Davis jmdavisProg at gmx.com
Fri Nov 16 20:48:12 PST 2012


On Friday, November 16, 2012 21:31:26 Rob T wrote:
> My understanding is that a struct will have a default postblit
> opAssign. What I want to know is if I can call the default
> opAssign after overriding it, or is it inaccessible?
> 
> I know that I do not have to execute the default after
> overriding, but if I can call it, I'd like to know because in
> some cases it may be useful to run the default. So this is just a
> general knowledge kind of question at this point.

I don't think that it even exists. Basically, if you don't define an opAssign, 
one is provided for you. If you do define one, then you already have one, so 
the compiler doesn't provide one.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list