added C++11 definition
reversed commit 9f3a49f9 partially, it introduced algorithmic errors.
added -Wall to compiler definitions