Updated to work with modern standard. Here, it turned out to be impossible to use C++ comments, so @johannesl will be happy. ;) (#2)