Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp1z/constexpr-if20.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
131 | 1 // PR c++/85214 |
2 // { dg-do compile { target c++17 } } | |
3 | |
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()); | |
17 } |