blob: df652b5ba38d30262ffc30f8df98b8edba4473b4 [file] [log] [blame]
Douglas Gregorc8ab2562009-05-31 09:31:02 +00001// RUN: clang-cc -fsyntax-only -verify %s
2template<typename T>
3struct is_pointer {
4 static const bool value = false;
5};
6
7template<typename T>
8struct is_pointer<T*> {
9 static const bool value = true;
10};
11
12template<typename T>
13struct is_pointer<const T*> {
14 static const bool value = true;
15};
16
17int array0[is_pointer<int>::value? -1 : 1];
18int array1[is_pointer<int*>::value? 1 : -1];
19int array2[is_pointer<const int*>::value? 1 : -1]; // expected-error{{partial ordering}} \
20// expected-error{{negative}}