With C++17 we get lots of new mathematical functions like gcd, lcm, clamp and other special ones.
gcd
lcm
std::gcd and std::lcm, introduced in P0295R0, are declared in <numeric> header:​
std::gcd
std::lcm
<numeric>
Get hands-on with 1300+ tech skills courses.