changes to c++ because gcc 4.8 seems to allow things the compiler
on travis will not.