Compiled and tested with g++ 4.8.2 on Fedora 20