Fix compilation warnings and errors with recent c++ standard (compiled on clang 4.2 ; some code need to be tested).