questions around mutating range algorithms, const, and return ref

aliak something at something.com
Tue Jan 30 20:32:37 UTC 2018


On Tuesday, 30 January 2018 at 09:51:18 UTC, Ali Çehreli wrote:
> > [...]
> is trying to
> > [...]
>
> It's the same with C++: A type with a const member cannot have 
> a compiler-generated assignment operator.

Ok, that made it obvious :)


> 'const' as a member function attribute is meaningful: It makes 
> the implicit 'this' parameter const. Same as a function 
> parameter attribute in that regard.
>
> >>> [...]
> I can
> >> [...]
> as in move
> >> [...]
> the
> >> [...]
> point.
> > [...]
> constructed,
> > [...]
>
> I'm not happy that I can answer that question. At least I 
> opened a bug about some part of the confusion recently. :)
>
>   https://issues.dlang.org/show_bug.cgi?id=18036
>
> Ali

ah, ok. Gotcha, thanks again, Ali.



More information about the Digitalmars-d-learn mailing list