You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2008/04/01 23:11:58 UTC

svn commit: r643574 - /stdcxx/trunk/tests/include/23.containers.h

Author: sebor
Date: Tue Apr  1 14:11:56 2008
New Revision: 643574

URL: http://svn.apache.org/viewvc?rev=643574&view=rev
Log:
2008-04-01  Martin Sebor  <se...@roguewave.com>

	* test/include/23.containers.h (~ContainerTestCaseData): Tweaked
	a workaround for STDCXX-802 to avoid preprocessor conditionals.

Modified:
    stdcxx/trunk/tests/include/23.containers.h

Modified: stdcxx/trunk/tests/include/23.containers.h
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/include/23.containers.h?rev=643574&r1=643573&r2=643574&view=diff
==============================================================================
--- stdcxx/trunk/tests/include/23.containers.h (original)
+++ stdcxx/trunk/tests/include/23.containers.h Tue Apr  1 14:11:56 2008
@@ -258,23 +258,10 @@
     SizeType off2_;
     SizeType ext2_;
 
-#if    !defined (_RWSTD_HP_aCC_MAJOR)  \
-    || 6 == _RWSTD_HP_aCC_MAJOR && 1600 < _RWSTD_HP_aCC_MINOR
-
     const T* str_;   // pointer to the expanded string
     const T* arg_;   // pointer to the expanded argument
     const T* res_;   // pointer to the expanded result
 
-#else   // 6.0 <= HP aCC <= 6.16
-
-    // non-const to work around an HP aCC 6.16 and prior bug
-    // described in STDCXX-802
-    T* str_;
-    T* arg_;
-    T* res_;
-
-#endif   // HP aCC
-
     const ContainerFunc     &func_;
     const ContainerTestCase &tcase_;
 
@@ -338,9 +325,12 @@
 ~ContainerTestCaseData ()
 {
     // clean up dynamically allocated memory
-    delete[] str_;
-    delete[] arg_;
-    delete[] res_;
+
+    // cast away the constness of the pointers to work around
+    // an HP aCC 6.16 and prior bug described in STDCXX-802
+    delete[] _RWSTD_CONST_CAST (T*, str_);
+    delete[] _RWSTD_CONST_CAST (T*, arg_);
+    delete[] _RWSTD_CONST_CAST (T*, res_);
 }
 
 /**************************************************************************/