From: daniel.kruegler@googlemail.com   
      
   Am 02.11.2011 19:19, schrieb Nevin ":-]" Liber:   
   > In article,   
   > Daniel Krügler wrote:   
   >   
   >> There exists a fundamental   
   >> requirement, that the wrapped functor is CopyConstructible.   
   >   
   > While this is a requirement of std::function, is it forced by the   
   > implementation? If all one does is moves, couldn't the requirement for   
   > the underlying functor to be Moveable (say, in some future version of   
   > the standard)?   
      
   So do you suggest that std::function is no longer a copyable type, but   
   move-only? In fact this would be the consequence of such a decision,   
   unless you would be willing to standardize a type that *declares* a   
   copy-constructor/assignment operator (and similar for the move   
   operations), but might simply throw an exception "sorry, guys, my   
   internals just tell me that I cannot copy". This will break all static   
   deduction tools like std::is_copy_constructible (which say "yes, we   
   can"), until the runtime tells us something different. I don't think   
   that this would be a good idea.   
      
   HTH & Greetings from Bremen,   
      
   Daniel Krügler   
      
      
      
   --   
    [ 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)   
|