[Boost-users] 99 Bottles of Beer using Boost MPL, feedback invited

6 views
Skip to first unread message

Alastair Rankine

unread,
Aug 7, 2011, 7:53:34 AM8/7/11
to boost...@lists.boost.org
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,


_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Reply all
Reply to author
Forward
0 new messages