99 Bottles of Beer using Boost MPL, feedback invited

7 Aug
2011
7 Aug
'11
11:53 a.m.
So inspired by http://programmingpraxis.com/2011/08/05/ninety-nine-bottles-of-beer/ , I decided to attempt to generate the lyrics to the 99 bottles of beer song. To make it interesting I decided to use Boost MPL to generate the lyrics using template metaprogramming. Here is my attempt. https://gist.github.com/1130306 It compiles with gcc 4.2 against boost 1.47. Given that I am pretty inexperienced with MPL I would very much appreciate some constructive criticism. I'd specifically like to know if the code can be cleaned up to be simpler or to perform better. Also I'm not entirely happy with the duplication in the PrintX functors, would definitely like to get a better approach here. Thanks,
4949
Age (days ago)
4949
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alastair Rankine