Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/consteval-expinst1.C

raw
1 // PR c++/96905
2 // { dg-do compile { target c++20 } }
3
4 template<typename Rep>
5 struct duration
6 {
7 static consteval int
8 gcd(int m, int n) noexcept
9 {
10 while (m != 0 && n != 0)
11 {
12 int rem = m % n;
13 m = n;
14 n = rem;
15 }
16 return m + n;
17 }
18 };
19
20 template class duration<int>;