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,653 of 33,346   
   =?windows-1252?Q?Daniel_Kr=FCgler?= to Carlos Moreno   
   Re: Reference to show that if (this == N   
   09 Nov 11 12:21:10   
   
   From: daniel.kruegler@googlemail.com   
      
   On 2011-11-09 00:56, Carlos Moreno wrote:   
   > On 11-11-08 03:05 AM, Daniel Krügler wrote:   
   >   
   >> Pictorial arguments aside, 5.2.2 [expr.call] p4 says:   
   >>   
   >> "4 When a function is called, each parameter (8.3.5) shall be   
   >> initialized (8.5, 12.8, 12.1) with its corresponding argument. [ Note:   
   >> Such initializations are indeterminately sequenced with respect to each   
   >> other (1.9) — end note ] If the function is a non-static member   
   >> function, the this parameter of the function (9.3.2) shall be   
   >> initialized with a pointer to the object of the call, converted as if by   
   >> an explicit type conversion (5.4)."   
   >   
   > I assume this is some recent version of the standard?? I have   
   > a copy of the 1998 standard, and 5.2.2/4 reads completely different   
   > (it starts with the same sentence, but the rest of the paragraph is   
   > not even similar). Could you confirm?   
      
   Yes, this is from the C++11 standard. But in C++03 the content is   
   essentially the same for this particular scenario, see ISO/IEC   
   14882:2003(E), 5.2.2 [expr.call] p4:   
      
   "When a function is called, each parameter (8.3.5) shall be initialized   
   (8.5, 12.8, 12.1) with its corresponding argument. If the function is a   
   nonstatic member function, the “this” parameter of the function (9.3.2)   
   shall be initialized with a pointer to the object of the call, converted   
   as if by an explicit type conversion (5.4)."   
      
   HTH & 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