home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 31,427 of 33,346   
   Carlos Moreno to All   
   Re: Rvalue references for *this   
   27 Aug 11 18:08:26   
   
   From: moreno_news@mailinator.com   
      
   >> Are these two new kinds of qualifications distinct, or is there an   
   >> overlap (like "const" member functions can be used by both const and   
   >> non-const objects)?   
   >   
   > Good question.  I don't actually know; I suggest checking the FDIS   
   > yourself.   
      
   I thought the answer to this one was easy, but maybe I'm missing   
   something?   
      
   Given that an rvalue can be implicitly created from an lvalue, I   
   would venture to guess that the rvalue-qualified version would be   
   useful for both --- the compiler would just create an rvalue from   
   the given lvalue (or just "pretend" to create;  or actually create   
   it but then have the optimizer optimize it away).   
      
   Am I missing something?   
      
   Carlos   
   --   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca