opAssign and const?

Era Scarecrow rtcvb32 at yahoo.com
Fri May 4 20:50:26 PDT 2012


> On Saturday, 5 May 2012 at 03:32:06 UTC, Jonathan M Davis wrote:
>> ---------
>> Func­tions are over­loaded based on how well the   
>> ar­gu­ments to a func­tion can match up with the  
>> pa­ra­me­ters. The func­tion with the  best match is  
>> se­lected. The lev­els of match­ing are:
>>
>> 1. no match
>> 2. match with im­plicit con­ver­sions
>> 3. match with con­ver­sion 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 im­plicit con­ver­sions (Lvalue required)
  3. match with con­ver­sion to const (Lvalue required)
  4. match with im­plicit con­ver­sions
  5. match with con­ver­sion to const
  6. exact match


More information about the Digitalmars-d-learn mailing list