Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp1z/constexpr-if20.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
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 } |