Tested in Ubuntu 13.04 with gcc 4.6 and 4.7