PR c++/85214 - ICE with alias, generic lambda, constexpr if.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / constexpr-if20.C
blob24343adb74825fc82cb7b568b09c9ccb14efa638
1 // PR c++/85214
2 // { dg-additional-options -std=c++17 }
4 struct g {
5   constexpr operator int() { return true; }
6 };
7 template <typename T, typename U> constexpr bool m = true;
8 template <long L> struct C { typedef double q; };
9 void ao() {
10   [](auto i) {
11       using ar = typename C<i>::q;
12       [](auto j) {
13         using as = typename C<j>::q;
14         if constexpr (m<ar, as>) {}
15       }(g());
16   }(g());