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,893 of 33,346   
   =?ISO-8859-15?Q?Daniel_Kr=FCgler?= to Frank Birbacher   
   Re: How to discover argument and result    
   07 Feb 12 01:46:51   
   
   From: daniel.kruegler@googlemail.com   
      
   On 2012-02-07 01:00, Frank Birbacher wrote:   
   >> template  struct   
   >> deduce_function  { typedef   
   >> std::function  type; };   
   >   
   > Wow, what does that do? I haven't yet come across a double ellipsis. I   
   > can think of template template parameters, but a concrete function   
   > type cannot have such arguments, does it? Please provide an example   
   > that invokes this specialization.   
      
   It just captures function types with ellipses, e.g. consider printf's   
   function type (modulo linkage) void(const char*, ...). Or expressed as a   
   lambda expression   
      
   [](const char*, ...) { }   
      
   But I was over-engineering here, std::function does not promise to hold   
   such entities, given it's specification to solely match   
      
   template   
   class function;   
      
   > I'm considering making the example complete and providing it to   
   > Boost.Function. Would you agree on this?   
      
   Sure.   
      
   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)   

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


(c) 1994,  bbs@darkrealms.ca