opAssign and const?

Era Scarecrow rtcvb32 at yahoo.com
Fri May 4 00:01:28 PDT 2012


On Friday, 4 May 2012 at 06:55:47 UTC, Jonathan M Davis wrote:
> With the last beta, there was a discussion in changing how ref 
> and const ref works to allow rvalues while disallowing whatever 
> use cases it is that causes problems with that in C++. If that 
> gets sorted out and fully implemented, then you'd only need one 
> overload. As it stands, the closest that you could get would be 
> to use auto ref, but that only works with templated functions.

  I'll be looking forward to how that works out. I'm trying to be 
contentious of what code I can label as const (usable) and what I 
can't. I know there will be cases where I am using my struct as 
const, and having this minor oddity come out of the woodwork is 
one of the first real issues I've found that wasn't my own fault.


More information about the Digitalmars-d-learn mailing list