opAssign and const?
    Jonathan M Davis 
    jmdavisProg at gmx.com
       
    Fri May  4 21:14:57 PDT 2012
    
    
  
On Saturday, May 05, 2012 05:50:26 Era Scarecrow wrote:
> > On Saturday, 5 May 2012 at 03:32:06 UTC, Jonathan M Davis wrote:
> >> ---------
> >> Functions are overloaded based on how well the
> >> arguments to a function can match up with the
> >> parameters. The function with the  best match is
> >> selected. The levels of matching are:
> >> 
> >> 1. no match
> >> 2. match with implicit conversions
> >> 3. match with conversion to const
> >> 4. exact match
> >> ---------
> 
> Hmm maybe it should have a preference for Lvalue vs Rvalue...
> So... Walter or Andrei?
> 
>   1. no match
>   2. match with implicit conversions (Lvalue required)
>   3. match with conversion to const (Lvalue required)
>   4. match with implicit conversions
>   5. match with conversion to const
>   6. exact match
This will likely be _very_ relevant to the proposed changes which make ref and 
const ref work with rvalues (the details on that are still being sorted out, I 
believe). However, I don't believe that either Walter or Andrei pays attention 
to D.Learn, so if you want to bring it up for discussion, post about it in the 
main newsgroup (not to mention, your post is buried enough in this thread that 
many who _do_ pay attention to D.Learn wouldn't see it).
- Jonathan M Davis
    
    
More information about the Digitalmars-d-learn
mailing list