Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
SunOS marbles 5.10 Generic_118855-33 i86pc i386 i86pc
CC: Sun C++ 5.9 SunOS_i386 Patch 124864-01 2007/07/25
-
Incorrect Behavior
Description
$ cat t.cpp && CC t.cpp template <class T> struct __rw_is_const { enum { value = 0 }; }; template <class T> struct __rw_is_const<const T> { enum { value = 1 }; }; extern "C" int printf (const char*, ...); int main () { #define test(X) if (!(X)) printf ("%s != 1\n", #X) test (!__rw_is_const<int>::value); test (__rw_is_const<const int>::value); test (__rw_is_const<const int []>::value); test (__rw_is_const<const int [2]>::value); return 0; } __rw_is_const<const int []>::value != 1 __rw_is_const<const int [2]>::value != 1