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,621 of 33,346   
   Dave Abrahams to All   
   Re: Fun with compile-time binary literal   
   04 Nov 11 22:10:31   
   
   From: dave@boostpro.com   
      
   on Fri Nov 04 2011, "Gennaro Prota"  wrote:   
      
   > On Thu, 03 Nov 2011 19:12:52 +0100, Daniel Krügler   
   >  wrote:   
   >   
   >> Since gcc 4.7 has recently implemented user-defined literals, it is now   
   >> finally possible to define a binary literal operator template that   
   >> behaves very much like built-in literals.   
   >   
   > "Finally possible"? Apart from fun, what is the real-word need   
   > for this stuff?   
      
   Haven't you always wanted to write an entire lisp (or   
   haskell or c++ or...) compiler as a template metaprogram so you can   
   embed that language in your C++ code?  ;-)   
      
   Everything we might do with template metaprogramming today can now have   
   arbitrary syntax, without the limitations imposed by C++, if you're   
   willing to write the programs inside user-defined literals.   
      
   --   
   Dave Abrahams   
   BoostPro Computing   
   http://www.boostpro.com   
      
      
         [ 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