OSDN Git Service

PR c++/24163
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / dependent-expr3.C
1 // { dg-do compile }
2 // Origin: jbrandmeyer at users dot sourceforge dot net
3 // PR c++/12573: COMPONENT_REFs must be inspected for dependness.
4
5 template <bool> struct S;
6
7 template <typename K> struct Y : K {
8   int x;
9 };
10
11 template <class T> struct Z {
12   S< (bool)(&static_cast<Y<T> *>(0)->x == 0) > // { dg-error "" }
13   s;
14 };