Source: https://www.creatis.insa-lyon.fr/~grenier/wp-content/uploads/teaching/Cpp/NoteCpp.pdf