[HP aCC 3.63] bogus error 643 on template specialization and inheritance ------------------------------------------------------------------------ Key: STDCXX-150 URL: http://issues.apache.org/jira/browse/STDCXX-150 Project: C++ Standard Library Type: Bug Components: External Environment: HP aCC 3.63 Reporter: Martin Sebor -------- Original Message -------- Subject: aCC 3.63 bogus error 643 on template specialization Date: Mon, 20 Feb 2006 12:54:09 -0700 From: Martin Sebor To: acxx-beta@cup.hp.com Hi, The program below was reduced from our latest implementation of numeric_limits. aCC 3 (but not 6) chokes on it for some strange reason. I can't think of a workaround -- do you have any ideas? Martin $ cat t.cpp && aCC -AA -V -c t.cpp /* 1 */ template struct S { static const int i = 0; }; /* 2 */ template struct S: S { }; /* 3 */ template const int S::i; /* 4 */ template <> struct S { static const int i = 1; }; /* 5 */ const int S::i; aCC: HP ANSI C++ B3910B A.03.63 Error 643: "t.cpp", line 3 # Template type parameter 'i' may not be redeclared within the scope of the template. template const int S::i; ^^^^^^^^^^^^^^^^^^ Error 309: "t.cpp", line 3 # Only classes, functions, and static data members may be used as templates. template const int S::i; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error 445: "t.cpp", line 3 # Cannot recover from earlier errors. template const int S::i; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira