diff options
author | Treeston <treeston.mmoc@gmail.com> | 2019-08-12 14:25:28 +0200 |
---|---|---|
committer | Treeston <treeston.mmoc@gmail.com> | 2019-08-12 14:25:28 +0200 |
commit | 7378bcb4182cea04d00b74393ba73ce9cb7ea49e (patch) | |
tree | e03917419b90c1512de2cd1a667e33081778edd4 | |
parent | 31b5632c0006cf74f83d5cece5e0e40579d27501 (diff) |
ugh. compilers. 31b5632 follow-up.
-rw-r--r-- | src/common/Utilities/advstd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/Utilities/advstd.h b/src/common/Utilities/advstd.h index 187df3c15be..d9776b02acb 100644 --- a/src/common/Utilities/advstd.h +++ b/src/common/Utilities/advstd.h @@ -110,8 +110,9 @@ namespace advstd // C++17 std::gcd template <typename T1, typename T2> - constexpr std::enable_if_t<advstd::is_unsigned_v<T1> && advstd::is_unsigned_v<T2>, std::common_type_t<T1, T2>> gcd(T1 m, T2 n) + constexpr std::enable_if_t<advstd::is_unsigned_v<T1> && advstd::is_unsigned_v<T2>, std::common_type_t<T1, T2>> gcd(T1 _m, T2 _n) { + std::common_type_t<T1, T2> n = _n, m = _m; while (n) { std::swap(m,n); |