gcc/testsuite/g++.dg/warn/template-2.C
raw| 1 | // PR c++/94938 - ICE in value_dependent_expression_p in C++98 mode. |
| 2 | // { dg-do compile } |
| 3 | |
| 4 | template <typename> struct S { S(); S(bool); }; |
| 5 | |
| 6 | struct C { |
| 7 | bool operator()(S<float>); |
| 8 | }; |
| 9 | |
| 10 | S<float> fn (bool); |
| 11 | |
| 12 | template<typename T> void |
| 13 | foo (T) |
| 14 | { |
| 15 | S<float> s; |
| 16 | S<float> x = fn(false || C()(s)); |
| 17 | } |
| 18 | |
| 19 | int main () |
| 20 | { |
| 21 | foo(int()); |
| 22 | } |