C++ version is also compilable with GCC 4.6

My old compiler don't understand this notation. This is also a good solution and works with old compilers.