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,134 of 33,346   
   Pete Becker to James K. Lowden   
   Re: ostream_iterator for map   
   14 Apr 12 11:27:02   
   
   From: pete@versatilecoding.com   
      
   On 2012-04-13 22:28:09 +0000, James K. Lowden said:   
      
   > I would guess the commmittee's intention was to make the std   
   > namespace *standard* and thus predictable on inspection.   
      
   Not so much. Mostly it means you can count on it being there. Library   
   implementors can take liberties with how they define things under the   
   as-if rule: if a conforming program can't detect a difference, it's   
   okay. So a library vendor can add identifiers to std pretty much   
   without risk, because a conforming program won't use those   
   identifiers.   
      
   > They didn't want library vendors extending it.   
      
   No, just the opposite; if users can add to std they run the risk of   
   conflicting with implementation details and vendor extensions.   
      
   > But I don't see how anything I might add to std in my application   
   > could lead to, say, undefined behavior.   
      
   It leads to undefined behavior because the standard says that it does.   
   Undefined behavior means only that the standard doesn't say what that   
   code has to do. If you write code that has undefined behavior you have   
   to look elsewhere to know what it does. Sometimes that's compiler   
   documentation, sometimes it's experience and luck.   
      
   --   
      Pete   
   Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The   
   Standard C++ Library Extensions: a Tutorial and Reference   
   (www.petebecker.com/tr1book)   
      
      
         [ 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