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 32,246 of 33,346   
   Dave Harris to Dave Abrahams   
   Re: Internal move vs. copy in std::vecto   
   05 May 12 06:10:44   
   
   From: brangdon@cix.compulink.co.uk   
      
   dave@boostpro.com (Dave Abrahams) wrote (abridged):   
   > > let's forget for a second what VC11 beta actually is and think   
   > > about what we'd want from a C++11 compiler: we'd like it to always   
   > > use move _but_ switch back to copy only those elements(!)  where   
   > > move construct would _actually_ throw (assuming CopyInsertable   
   > > T). and we'd want it to do this magically not based on help from   
   > > us.   
   >   
   > Ha.  That would be great.  Impossible, but great.  And no, I don't   
   > plan to work out a formal proof that it's impossible.   
      
   Figuring out whether a move constructor can throw is equivalent to   
   solving the Halting Problem. To see this, replace the "throw" clause   
   with a "halt" instruction.  For a proof that the Halting Problem   
   cannot be solved in the general case, see Turing. It's is one of the   
   oldest bits of computer science.   
      
   (Apologies if I'm taking a rhetorical point too literally. Today's   
   youngsters don't always know this stuff.)   
      
   -- Dave Harris, Nottingham, UK.   
      
      
   --   
         [ 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