Using more idiomatic modern C++