Skip to content
UPEEC

Concepts

Named requirements on template arguments (C++20) with clear error messages.

Intermediate
Comments 0
template <std::integral T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.