Source: https://calcul.math.cnrs.fr/attachments/spip/IMG/pdf/advanced_cpp.pdf