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,827 of 33,346   
   Richard to All   
   Re: iostream replacement   
   26 Jan 13 18:58:08   
   
   From: legalize+jeeves@mail.xmission.com   
      
   [Please do not mail me a copy of your followup]   
      
   fmatthew5876  spake the secret code   
   <061dc3c8-ec30-4a9c-8b97-4dcba5c28a27@googlegroups.com> thusly:   
      
   ><< and >> are bit shift operators. I would only define them for a class where   
   >they were actually shifting bits, like std::bitset.   
   >   
   >The only reason we accept << and >> is because the standard library does it.   
   >If you looked at someone else's code base where they invented a new purpose   
   >for some operator you'd probably be very skeptical, I know I would.   
      
   Boost.Spirit overloads a bunch of operators to make an embedded DSL   
   for parsers.  It works fine in that context; noone is confused that <<   
   in a spirit parser is doing bit shift.   
   --   
   "The Direct3D Graphics Pipeline" free book    
        The Computer Graphics Museum    
            The Terminals Wiki    
     Legalize Adulthood! (my blog)    
      
      
         [ 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