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,357 of 33,346   
   =?ISO-8859-1?Q?Daniel_Kr=FCgler?= to All   
   Re: arrays decaying to pointers   
   31 May 11 13:14:07   
   
   From: daniel.kruegler@googlemail.com   
      
   On 2011-05-31 00:17, Daniel Krügler wrote:   
      
   [..]   
      
   > I would stay away from adding several overloads. Instead I would follow   
   > the spirit of make_tuple as described in TR1 (modulo reference_wrapper   
   > unwrapping but plus decaying): The function template takes arguments by   
   > const& Ti, but would convert them to std::decay::type. This requires   
   > that you can create a helper function like   
   >   
   > template    
   > typename decay::type decay_copy(const T& v)   
   > { return v; }   
   >   
   > with C++03 means.   
      
   Oops, I was a bit too quick here. The C++03 way of defining decay_copy   
   is better expressed by:   
      
   template   
   T decay_copy(T v) { return v; }   
      
   I apologize for any irritations,   
      
   - 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)   

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


(c) 1994,  bbs@darkrealms.ca