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,195 of 33,346   
   James K. Lowden to nroberts   
   Re: Initialization and trivial construct   
   25 Apr 12 12:11:21   
   
   2364686b   
   From: jklowden@speakeasy.net   
      
   On Tue, 24 Apr 2012 16:15:56 -0700 (PDT)   
   nroberts  wrote:   
      
   > Although you cannot construct a POD with values   
   > in the initializer (not in C++03 and earlier anyway)   
      
   I'm confused by that statement.  You seem to be saying the code below   
   wouldn't compile, but it does and I'm sure you would expect it to.   
      
     class A   
   {   
      int a;   
   public:   
      A( int a ) : a(a) {}   
   };   
      
   int i(17);   
      
   What am I missing?   
      
   --jkl   
      
      
   --   
         [ 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