OSDN Git Service

PR c++/9335
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / static19.C
1 // PR c++/24275
2
3 template <bool val>  struct bool_var {
4   static const bool value = val;
5 };
6 namespace is_inc_ {
7   struct any {
8     template <class T> any(T const&);
9   };
10   int operator++(any const&);
11   template <class T>   struct impl {
12     static T &x;
13     static const bool value = sizeof(++x) == 1;
14   };
15 }
16 template<typename T> struct is_incr : bool_var< is_inc_::impl<T>::value> {};
17 struct not_incr{};
18 typedef int sa1[ is_incr<not_incr>::value ? -1 : 1];