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 33,262 of 33,346    |
|    Martin B. to K. Frank    |
|    Re: Is broad use of uniform initializati    |
|    28 Nov 13 05:22:30    |
   
   From: 0xCDCDCDCD@gmx.at   
      
   On 26.11.2013 07:26, K. Frank wrote:   
   > Hello Group!   
   >   
   > Would you recommend broadly adopting uniform initialization   
   > (in new code that doesn't have legacy style constraints)?   
   >   
   > That is, would you recommend using uniform initialization   
   > for things like:   
   >   
   > const float PI{3.14159};   
   > for (unsigned i{3}; i < 10; i += 2)   
   > ...   
   >   
   > Hardly of earth-shattering importance, but these minor details   
   > do matter some.   
   >   
      
      
   IIRC, Herb Sutter(*) proposed something along the lines of:   
      
   const auto Pi = float{3.14159};   
      
   I'm not sure how that'd look in a for-initializer though :-)   
      
   cheers,   
   Martin   
      
   (*):   
   http://herbsutter.com/2013/08/12/gotw-94-solution-aaa-style-almost-always-auto/   
      
      
   --   
    [ 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