DConf 2013 Day 1 Talk 2: Copy and Move Semantics in D by Ali Cehreli

Robert Jacques rjacque2 at live.johnshopkins.edu
Tue May 21 16:58:44 PDT 2013


On Fri, 10 May 2013 05:08:09 -0700, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> Enjoy!
>
> https://www.youtube.com/watch?v=mPr2UspS0fE
>
> Andrei

Thanks. I noticed a subtle error in the response to the question on  
logical const (at 32:11). Specifically, overloading the function on  
immutable doesn't allow you to 'know' that the object you are passed is  
const or not, as prior to the invocation of the function (and thus  
overload determination) an immutable object could be bound to a const  
reference. As an alternative, IIRC, the RTTI of a class can be  
introspected inside the function to determine mutable/immutable at runtime.


More information about the Digitalmars-d-announce mailing list