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,512 of 33,346   
   Kaba to All   
   Re: Return-type deduction for all functi   
   10 Aug 12 14:35:46   
   
   From: kaba@nowhere.com   
      
   10.8.2012 21:19, Francis Glassborow kirjoitti:   
   > On 09/08/2012 19:51, Kaba wrote:   
   >> Would it make sense to generalize the implicit return-type   
   >> deduction of the lambda functions to all functions? Motivation:   
   >> reading the Boost.Proto documentation and seeing something like   
   >> this:   
   >>   
   > But the problem is that only a function declaration is needed in   
   > order to call a function. How will the caller know what the return   
   > type is?   
      
   Perhaps the exact type is not always important to the user, such as in   
   this Proto-example. What is important though is the underlying concept   
   the type implements. However, without support from the language the   
   concept would have to be looked up from the documentation; I could   
   live with that:) But something like this would be even nicer:   
      
         auto[Grammar_Concept] f();   
      
   --   
   http://kaba.hilvi.org   
      
      
         [ 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