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,640 of 33,346   
   =?ISO-8859-2?Q?Vladimir_Petrovi=E6? to All   
   lambda objects not assignable   
   08 Nov 12 10:01:20   
   
   From: vladap@googlemail.com   
      
   { Please limit your text to fit within 80 columns, preferably around 70,   
     so that readers don't have to scroll horizontally to read each line.   
     This article has been reformatted manually by the moderator. -mod }   
      
   Hi,   
      
   The standard explicitly states that operator= is deleted from the   
   lambda object's type. What is the rationale for such decision ?   
   In case everything is captured by value and all types have operator=,   
   compiler could generate the operator =.   
      
   The issue came up while working with boost's transform itertator and   
   trying to pass lambda as a functor. Transform iterators shoudl be   
   assignable. This requires creating a wrapper class around the lambda   
   that will have operator= which destroys and copy constructs the lambda   
   member variable.   
      
   Are there any performance issues with this approach, depending on the   
   specific compiler implementation of lambdas ?   
      
   thanks,   
   Vladimir   
      
      
   --   
         [ 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