svn commit: r1242128 - in /stdcxx/branches/4.2.x: include/valarray tests/regress/26.valarray.binary.stdcxx-1061.cpp
Author: vitek Date: Wed Feb 8 21:59:52 2012 New Revision: 1242128 URL: http://svn.apache.org/viewvc?rev=1242128view=rev Log: 2012-02-08 Travis Vitek vi...@roguewave.com * include/valarray (operator): Use appropriate function object logical_and to implement non-member operator. * test/regress/26.valarray.binary.stdcxx-1061.cpp: Add new regression test. Added: stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp Modified: stdcxx/branches/4.2.x/include/valarray Modified: stdcxx/branches/4.2.x/include/valarray URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/valarray?rev=1242128r1=1242127r2=1242128view=diff == --- stdcxx/branches/4.2.x/include/valarray (original) +++ stdcxx/branches/4.2.x/include/valarray Wed Feb 8 21:59:52 2012 @@ -776,7 +776,7 @@ inline valarraybool operator (const valarray_TypeT __lhs, const _TypeT __rhs) { return _RW::__rw_binary_function (__lhs, - bind2nd (equal_to_TypeT(), __rhs)); + bind2nd (logical_and_TypeT(), __rhs)); } templateclass _TypeT Added: stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp?rev=1242128view=auto == --- stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp (added) +++ stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp Wed Feb 8 21:59:52 2012 @@ -0,0 +1,45 @@ +/ + * + * 26.valarray.binary.stdcxx-1061.cpp - regression test for STDCXX-1061 + * + * http://issues.apache.org/jira/browse/STDCXX-1061 + * + * $Id: 26.valarray.binary.stdcxx-1061.cpp 590132 2007-10-30 16:01:33Z faridz $ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + **/ + +#include cassert +#include cstddef +#include valarray + +int main () +{ +const int a[] = { 0, 1, 0, 3, 0, -5, 0, -7, 0, -11 }; + +const std::valarrayint v0 (a, sizeof a); +const std::valarraybool v1 = std::operator (v0, 1); + +for (std::size_t i = 0; i sizeof a; ++i) +assert ((a [i] 1) == v1 [i]); + +return 0; +} +
svn commit: r1242179 - /stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp
Author: vitek Date: Wed Feb 8 23:47:30 2012 New Revision: 1242179 URL: http://svn.apache.org/viewvc?rev=1242179view=rev Log: 2012-02-08 Travis Vitek vi...@roguewave.com * test/regress/26.valarray.binary.stdcxx-1061.cpp: Update loop condition to avoid stepping past the end of arrays. Modified: stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp Modified: stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp?rev=1242179r1=1242178r2=1242179view=diff == --- stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp (original) +++ stdcxx/branches/4.2.x/tests/regress/26.valarray.binary.stdcxx-1061.cpp Wed Feb 8 23:47:30 2012 @@ -34,10 +34,10 @@ int main () { const int a[] = { 0, 1, 0, 3, 0, -5, 0, -7, 0, -11 }; -const std::valarrayint v0 (a, sizeof a); +const std::valarrayint v0 (a, sizeof a / sizeof *a); const std::valarraybool v1 = std::operator (v0, 1); -for (std::size_t i = 0; i sizeof a; ++i) +for (std::size_t i = 0; i sizeof a / sizeof *a; ++i) assert ((a [i] 1) == v1 [i]); return 0;
svn commit: r683727 - /stdcxx/branches/4.2.x/src/collate.cpp
Author: vitek Date: Thu Aug 7 14:39:55 2008 New Revision: 683727 URL: http://svn.apache.org/viewvc?rev=683727view=rev Log: 2008-08-06 Travis Vitek [EMAIL PROTECTED] * src/collate.cpp (__rw_hash): Add throw spec to make explicit instantiation request consistent with template declaration and resolve compile failures. Modified: stdcxx/branches/4.2.x/src/collate.cpp Modified: stdcxx/branches/4.2.x/src/collate.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/collate.cpp?rev=683727r1=683726r2=683727view=diff == --- stdcxx/branches/4.2.x/src/collate.cpp (original) +++ stdcxx/branches/4.2.x/src/collate.cpp Thu Aug 7 14:39:55 2008 @@ -822,11 +822,11 @@ // templates even of they are completely defined in .cpp files // (e.g., Compaq C++) -template long __rw_hash (const char*, const char*); +template long __rw_hash (const char*, const char*) _THROWS(()); #ifndef _RWSTD_NO_WCHAR_T -template long __rw_hash (const wchar_t*, const wchar_t*); +template long __rw_hash (const wchar_t*, const wchar_t*) _THROWS(()); #endif // _RWSTD_NO_WCHAR_T
svn propchange: r683727 - svn:log
Author: vitek Revision: 683727 Modified property: svn:log Modified: svn:log at Thu Aug 7 14:43:23 2008 -- --- svn:log (original) +++ svn:log Thu Aug 7 14:43:23 2008 @@ -1,6 +1,6 @@ -2008-08-06 Travis Vitek [EMAIL PROTECTED] +2008-08-07 Travis Vitek [EMAIL PROTECTED] -* src/collate.cpp (__rw_hash): Add throw spec to make -explicit instantiation request consistent with template -declaration and resolve compile failures. + * src/collate.cpp (__rw_hash): Add throw spec to make + explicit instantiation request consistent with template + declaration and resolve compile failures.
svn commit: r683729 - /stdcxx/trunk/src/collate.cpp
Author: vitek Date: Thu Aug 7 14:44:06 2008 New Revision: 683729 URL: http://svn.apache.org/viewvc?rev=683729view=rev Log: 2008-08-07 Travis Vitek [EMAIL PROTECTED] Merge r683727 from branches/4.2.x: 2008-08-07 Travis Vitek [EMAIL PROTECTED] * src/collate.cpp (__rw_hash): Add throw spec to make explicit instantiation request consistent with template declaration and resolve compile failures. Modified: stdcxx/trunk/src/collate.cpp Modified: stdcxx/trunk/src/collate.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/collate.cpp?rev=683729r1=683728r2=683729view=diff == --- stdcxx/trunk/src/collate.cpp (original) +++ stdcxx/trunk/src/collate.cpp Thu Aug 7 14:44:06 2008 @@ -822,11 +822,11 @@ // templates even of they are completely defined in .cpp files // (e.g., Compaq C++) -template long __rw_hash (const char*, const char*); +template long __rw_hash (const char*, const char*) _THROWS(()); #ifndef _RWSTD_NO_WCHAR_T -template long __rw_hash (const wchar_t*, const wchar_t*); +template long __rw_hash (const wchar_t*, const wchar_t*) _THROWS(()); #endif // _RWSTD_NO_WCHAR_T
svn commit: r682771 - /stdcxx/branches/4.2.x/include/rw/_select.h
Author: vitek Date: Tue Aug 5 09:17:12 2008 New Revision: 682771 URL: http://svn.apache.org/viewvc?rev=682771view=rev Log: 2008-08-05 Travis Vitek [EMAIL PROTECTED] STDCXX-968 * include/rw/_select.h: Use 0 for select descriminator to avoid 64-bit migration warnings for converting the integer to pointer. Modified: stdcxx/branches/4.2.x/include/rw/_select.h Modified: stdcxx/branches/4.2.x/include/rw/_select.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_select.h?rev=682771r1=682770r2=682771view=diff == --- stdcxx/branches/4.2.x/include/rw/_select.h (original) +++ stdcxx/branches/4.2.x/include/rw/_select.h Tue Aug 5 09:17:12 2008 @@ -89,7 +89,7 @@ #if !defined (__SUNPRO_CC) || __SUNPRO_CC 0x530 # define _RWSTD_DISPATCH(iter) \ - (_TYPENAME _RW::__rw_select_int iter ::_SelectT (1)) + (_TYPENAME _RW::__rw_select_int iter ::_SelectT (0)) #else // working around a SunPro 5.3 a prior bug (PR #28739)
svn commit: r682772 - /stdcxx/branches/4.3.x/include/rw/_select.h
Author: vitek Date: Tue Aug 5 09:20:58 2008 New Revision: 682772 URL: http://svn.apache.org/viewvc?rev=682772view=rev Log: 2008-08-05 Travis Vitek [EMAIL PROTECTED] Merge r682771 from branches/4.2.x 2008-08-05 Travis Vitek [EMAIL PROTECTED] STDCXX-968 * include/rw/_select.h: Use 0 for select descriminator to avoid 64-bit migration warnings for converting the integer to pointer. Modified: stdcxx/branches/4.3.x/include/rw/_select.h Modified: stdcxx/branches/4.3.x/include/rw/_select.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_select.h?rev=682772r1=682771r2=682772view=diff == --- stdcxx/branches/4.3.x/include/rw/_select.h (original) +++ stdcxx/branches/4.3.x/include/rw/_select.h Tue Aug 5 09:20:58 2008 @@ -89,7 +89,7 @@ #if !defined (__SUNPRO_CC) || __SUNPRO_CC 0x530 # define _RWSTD_DISPATCH(iter) \ - (typename _RW::__rw_select_int iter ::_SelectT (1)) + (typename _RW::__rw_select_int iter ::_SelectT (0)) #else // working around a SunPro 5.3 a prior bug (PR #28739)
svn commit: r682834 - /stdcxx/branches/4.2.x/tests/utilities/20.function.objects.cpp
Author: vitek Date: Tue Aug 5 10:52:10 2008 New Revision: 682834 URL: http://svn.apache.org/viewvc?rev=682834view=rev Log: 2008-08-05 Travis Vitek [EMAIL PROTECTED] * tests/utilities/20.function.objects.cpp [__GNUG__]: Enable gcc specific workaround only for gcc-2.95 to silence bogus HP aCC 6/cadvise warning #20035-D. Modified: stdcxx/branches/4.2.x/tests/utilities/20.function.objects.cpp Modified: stdcxx/branches/4.2.x/tests/utilities/20.function.objects.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/utilities/20.function.objects.cpp?rev=682834r1=682833r2=682834view=diff == --- stdcxx/branches/4.2.x/tests/utilities/20.function.objects.cpp (original) +++ stdcxx/branches/4.2.x/tests/utilities/20.function.objects.cpp Tue Aug 5 10:52:10 2008 @@ -505,12 +505,16 @@ #undef CTOR_ARG_LIST +#if defined __GNUG__ __GNUG__ 3 __GNU_MINOR__ 96 // broken out of the macro definition to work around // a bug in g++ 2.95.2 parser std::minusint obj_minus; -// use std::negate as an argument in negator ctors -#define CTOR_ARG_LIST (obj_minus, 1) + // use std::negate as an argument in negator ctors +# define CTOR_ARG_LIST (obj_minus, 1) +#else +# define CTOR_ARG_LIST (std::minusint(), 1) +#endif // 20.3.6.1, p1 and p2 TEST_UNARY_OP (binder1ststd::minusint , 1 -, 0);
svn commit: r682835 - in /stdcxx/branches/4.2.x/tests: regress/21.string.append.stdcxx-438.cpp support/18.exception.cpp
Author: vitek Date: Tue Aug 5 10:52:53 2008 New Revision: 682835 URL: http://svn.apache.org/viewvc?rev=682835view=rev Log: 2008-08-05 Travis Vitek [EMAIL PROTECTED] * tests/regress/21.string.append.stdcxx-438.cpp: Check pointer to silence HP aCC 6/cadvise warning #20035-D. * tests/support/18.exception.cpp (induce_exception): Provide deallocation code to avoid HP aCC 6/cadvise warning #20201-D. Modified: stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp stdcxx/branches/4.2.x/tests/support/18.exception.cpp Modified: stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp?rev=682835r1=682834r2=682835view=diff == --- stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp (original) +++ stdcxx/branches/4.2.x/tests/regress/21.string.append.stdcxx-438.cpp Tue Aug 5 10:52:53 2008 @@ -39,6 +39,9 @@ void* operator new (std::size_t n) throw (std::bad_alloc) { void* const ptr = std::malloc (n + sizeof n); +if (!ptr) +return 0; + std::memset (ptr, -1, n); *(std::size_t*)ptr = n; return (std::size_t*)ptr + 1; Modified: stdcxx/branches/4.2.x/tests/support/18.exception.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/support/18.exception.cpp?rev=682835r1=682834r2=682835view=diff == --- stdcxx/branches/4.2.x/tests/support/18.exception.cpp (original) +++ stdcxx/branches/4.2.x/tests/support/18.exception.cpp Tue Aug 5 10:52:53 2008 @@ -803,7 +803,9 @@ // try to allocate a huge amount of memory to induce bad_alloc const std::size_t huge_amount = _RWSTD_SIZE_MAX - 4096; -::operator new (huge_amount); +void * const p = ::operator new (huge_amount); + +::operator delete (p); # ifndef _RWSTD_NO_SETRLIMIT #if !defined (__HP_aCC)
svn propchange: r682834 - svn:log
Author: vitek Revision: 682834 Modified property: svn:log Modified: svn:log at Tue Aug 5 10:54:22 2008 -- --- svn:log (original) +++ svn:log Tue Aug 5 10:54:22 2008 @@ -1,5 +1,6 @@ 2008-08-05 Travis Vitek [EMAIL PROTECTED] + STDCXX-772 * tests/utilities/20.function.objects.cpp [__GNUG__]: Enable gcc specific workaround only for gcc-2.95 to silence bogus HP aCC 6/cadvise warning #20035-D.
svn commit: r682503 - in /stdcxx/trunk/tests: self/0.printf.cpp src/value.cpp
Author: vitek Date: Mon Aug 4 13:49:15 2008 New Revision: 682503 URL: http://svn.apache.org/viewvc?rev=682503view=rev Log: 2008-08-04 Travis Vitek [EMAIL PROTECTED] Merge r677461 from branches/4.2.x 2008-07-16 Martin Sebor [EMAIL PROTECTED] * tests/self/0.printf.cpp (rw_value.h): #included for UserClass. (test_userclass_format): New function to exercise the %{X=} formatting directive for arrays of UserClass objects. (main): Called it. * tests/src/value.cpp (_rw_fmtxarrayv): Corrected and simplified cursor positioning. Modified: stdcxx/trunk/tests/self/0.printf.cpp stdcxx/trunk/tests/src/value.cpp Modified: stdcxx/trunk/tests/self/0.printf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/self/0.printf.cpp?rev=682503r1=682502r2=682503view=diff == --- stdcxx/trunk/tests/self/0.printf.cpp (original) +++ stdcxx/trunk/tests/self/0.printf.cpp Mon Aug 4 13:49:15 2008 @@ -30,9 +30,10 @@ // but not in the compiler's pure C++ libc headers) #undef __PURE_CNAME +#include rw_environ.h // for rw_putenv() #include rw_printf.h #include rw_process.h // for rw_pid_t -#include rw_environ.h // for rw_putenv() +#include rw_value.h // for UserClass #include bitset // for bitset #include ios // for ios::iostate, ios::openmode, ios::seekdir @@ -813,7 +814,6 @@ const int bad = std::ios_base::badbit; const int eof = std::ios_base::eofbit; const int fail = std::ios_base::failbit; -const int good = std::ios_base::goodbit; TEST ([%{Is}], 0,0, 0, [goodbit]); TEST ([%{Is}], bad, 0, 0, [badbit]); @@ -2924,6 +2924,84 @@ /***/ +static void +test_userclass_format () +{ +// %{X=} directive syntax: +// +// X= [ '#' ] [ '+' ] [ '*' | n ] [ '.' [ '*' | '@' | n ] ] +// +// where +// '#' causes UserClass::id_ to be included in output +// '+' forces UserClass::data_.val_ to be formatted as an int +// otherwise it is formatted as an (optionally escaped) +// char +// '*' or n is the number of elements in the sequence +// (the first occurrence) +// '*', n is the offset of the cursor within the sequence +//(where the cursor is a pair of pointy brackets +//surrounding the element, e.g., 123) +// '@' is the pointer to the element to be surrended by the +// pair of pointy brackets + +UserClass* const x = UserClass::from_char (abcdef); + +TEST ([%{X=*}], 0, x, 0, []); +TEST ([%{X=*}], 1, x, 0, [a]); +TEST ([%{X=*}], 2, x, 0, [ab]); +TEST ([%{X=*}], 3, x, 0, [abc]); +TEST ([%{X=*}], 4, x, 0, [abcd]); +TEST ([%{X=*}], 5, x, 0, [abcde]); +TEST ([%{X=*}], 6, x, 0, [abcdef]); + +TEST ([%{X=#*}], 0, x, 0, []); +TEST ([%{X=#*}], 1, x, 0, [1:a]); +TEST ([%{X=#*}], 2, x, 0, [1:a2:b]); +TEST ([%{X=#*}], 3, x, 0, [1:a2:b3:c]); +TEST ([%{X=#*}], 4, x, 0, [1:a2:b3:c4:d]); +TEST ([%{X=#*}], 5, x, 0, [1:a2:b3:c4:d5:e]); +TEST ([%{X=#*}], 6, x, 0, [1:a2:b3:c4:d5:e6:f]); + +TEST ([%{X=+*}], 0, x, 0, []); +TEST ([%{X=+*}], 1, x, 0, [97]); +TEST ([%{X=+*}], 2, x, 0, [97,98]); +TEST ([%{X=+*}], 3, x, 0, [97,98,99]); +TEST ([%{X=+*}], 4, x, 0, [97,98,99,100]); +TEST ([%{X=+*}], 5, x, 0, [97,98,99,100,101]); +TEST ([%{X=+*}], 6, x, 0, [97,98,99,100,101,102]); + +TEST ([%{X=+*.0}], 0, x, 0, []); + +TEST ([%{X=+*.0}], 1, x, 0, [97]); + +TEST ([%{X=+*.*}], 2, 0, x, [97,98]); +TEST ([%{X=+*.1}], 2, x, 0, [97,98]); + +TEST ([%{X=+*.0}], 3, x, 0, [97,98,99]); +TEST ([%{X=+*.*}], 3, 1, x, [97,98,99]); +TEST ([%{X=+*.*}], 3, 2, x, [97,98,99]); + +TEST ([%{X=+*.*}], 4, 0, x, [97,98,99,100]); +TEST ([%{X=+*.*}], 4, 1, x, [97,98,99,100]); +TEST ([%{X=+*.*}], 4, 2, x, [97,98,99,100]); +TEST ([%{X=+*.*}], 4, 3, x, [97,98,99,100]); + +TEST ([EMAIL PROTECTED], 4, x + 3, x, [97,98,99,100]); +TEST ([EMAIL PROTECTED], 4, x + 2, x, [97,98,99,100]); +TEST ([EMAIL PROTECTED], 4, x + 1, x, [97,98,99,100]); +TEST ([EMAIL PROTECTED], 4, x + 0, x, [97,98,99,100]); + +TEST ([%{X=+#5.*}], 0, x, 0, [1:97,2:98,3:99,4:100,5:101]); +TEST ([%{X=+#5.*}], 1, x, 0, [1:97,2:98,3:99,4:100,5:101]); +TEST ([%{X=+#5.*}], 2, x, 0, [1:97,2:98,3:99,4:100,5:101]); +TEST ([%{X=+#5.*}], 3, x, 0, [1:97,2:98,3:99,4:100,5:101]); +TEST ([%{X=+#5.*}], 4, x, 0, [1:97,2:98,3:99,4:100,5:101]); + +delete[] x; +} + +/***/ + static int user_fun_va (const char *fun_name, // name of calling function char **pbuf, // pointer to a buffer @@ -3319,6 +3397,9 @@ test_conditional (); +// must be exercised before user
svn commit: r682505 - /stdcxx/trunk/tests/include/rw_testdefs.h
Author: vitek Date: Mon Aug 4 13:52:16 2008 New Revision: 682505 URL: http://svn.apache.org/viewvc?rev=682505view=rev Log: 2008-08-04 Travis Vitek [EMAIL PROTECTED] Merge rest of r665784 from branches/4.2.x 2008-06-09 Farid Zaripov [EMAIL PROTECTED] * tests/include/rw_testdefs.h: Use dllimport/dllexport attributes on MSVC and ICC/Windows only. Modified: stdcxx/trunk/tests/include/rw_testdefs.h Modified: stdcxx/trunk/tests/include/rw_testdefs.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/include/rw_testdefs.h?rev=682505r1=682504r2=682505view=diff == --- stdcxx/trunk/tests/include/rw_testdefs.h (original) +++ stdcxx/trunk/tests/include/rw_testdefs.h Mon Aug 4 13:52:16 2008 @@ -43,8 +43,7 @@ #endif // _RWSTD_TEST_SRC -#if(defined (_WIN32) || defined (_WIN64)) \ - (defined (RWDLL) || defined (_RWSHARED)) +#if defined (_MSC_VER) (defined (RWDLL) || defined (_RWSHARED)) # ifndef _RWSTD_TEST_SRC // using a shared lib, import names #define _TEST_EXPORT __declspec (dllimport)
svn commit: r682512 - in /stdcxx/trunk/tests/utilities: 20.meta.rel.cpp 20.meta.trans.other.cpp 20.meta.unary.prop.cpp
Author: vitek Date: Mon Aug 4 14:26:00 2008 New Revision: 682512 URL: http://svn.apache.org/viewvc?rev=682512view=rev Log: 2008-08-04 Travis Vitek [EMAIL PROTECTED] Merge r676102 and r679158 from branches/4.3.x 2008-07-11 Travis Vitek [EMAIL PROTECTED] STDCXX-916 * tests/utilities/20.meta.trans.other.cpp (_cond_if_char): Change linkage so that function is found when instantiating cond_if_char. * tests/utilities/20.meta.unary.prop.cpp: Add constructor to type member_t. [_RWSTD_NO_LONG_LONG]: Guard code using long long to avoid compile error when type is not supported. 2008-07-23 Travis Vitek [EMAIL PROTECTED] * tests/utilities/20.meta.rel.cpp (test_is_same): Add cv-qual testing. (test_is_base_of): Ditto. (test_is_convertible) [_MSC_VER]: Work around msvc extension that allows conversion from function pointer to void pointer. Modified: stdcxx/trunk/tests/utilities/20.meta.rel.cpp stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp Modified: stdcxx/trunk/tests/utilities/20.meta.rel.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.meta.rel.cpp?rev=682512r1=682511r2=682512view=diff == --- stdcxx/trunk/tests/utilities/20.meta.rel.cpp (original) +++ stdcxx/trunk/tests/utilities/20.meta.rel.cpp Mon Aug 4 14:26:00 2008 @@ -150,6 +150,15 @@ TEST (std::is_same, signed long, unsigned long, false); TEST (std::is_same, unsigned long, signed long, false); +TEST (std::is_same, long, const long, false); +TEST (std::is_same, const long, long, false); + +TEST (std::is_same, long, volatile long, false); +TEST (std::is_same, volatile long, long, false); + +TEST (std::is_same, long, const volatile long, false); +TEST (std::is_same, const volatile long, long, false); + TEST (std::is_same, enum_A, char, false); TEST (std::is_same, enum_A, short, false); TEST (std::is_same, enum_A, int, false); @@ -224,6 +233,21 @@ TEST (std::is_base_of, struct_A, derived_private_tstruct_A, true); #endif +// cv-qualified +TEST (std::is_base_of, const struct_A, struct_A, true); +TEST (std::is_base_of, struct_A, const struct_A, true); +TEST (std::is_base_of, volatile struct_A, struct_A, true); +TEST (std::is_base_of, struct_A, volatile struct_A, true); +TEST (std::is_base_of, const volatile struct_A, struct_A, true); +TEST (std::is_base_of, struct_A, const volatile struct_A, true); + +TEST (std::is_base_of, const struct_A, derived_tstruct_A, true); +TEST (std::is_base_of, struct_A, const derived_tstruct_A, true); +TEST (std::is_base_of, volatile struct_A, derived_tstruct_A, true); +TEST (std::is_base_of, struct_A, volatile derived_tstruct_A, true); +TEST (std::is_base_of, const volatile struct_A, derived_tstruct_A, true); +TEST (std::is_base_of, struct_A, const volatile derived_tstruct_A, true); + // other combinations should fail TEST (std::is_base_of, signed char, char, false); TEST (std::is_base_of, char, signed char, false); @@ -366,7 +390,14 @@ TEST (std::is_convertible, int (), int ()(char), false); TEST (std::is_convertible, int*, void*, true); + +#if defined (_MSC_VER) || defined (__IBMCPP__) +// microsoft language extension allows this conversion, and that +// extension is enabled by default. +TEST (std::is_convertible, int (*)(), void*, true); +#else TEST (std::is_convertible, int (*)(), void*, false); +#endif TEST (std::is_convertible, int (*)(derived_tstruct_A*), Modified: stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp?rev=682512r1=682511r2=682512view=diff == --- stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp (original) +++ stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp Mon Aug 4 14:26:00 2008 @@ -70,12 +70,14 @@ return 0; } -static int _cond_if_char (void* = 0) +// must have external linkage +int _cond_if_char (void*) { return 0; } -static int _cond_if_char (long* = 0) +// must have external linkage +int _cond_if_char (long*) { return 1; } Modified: stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp?rev=682512r1=682511r2=682512view=diff == --- stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp (original) +++ stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp Mon Aug 4 14:26:00 2008 @@ -96,6 +96,7 @@ template class T struct member_t { +member_t (T); T val; }; @@ -933,13 +934,16
svn commit: r682548 - /stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp
Author: vitek Date: Mon Aug 4 17:13:55 2008 New Revision: 682548 URL: http://svn.apache.org/viewvc?rev=682548view=rev Log: 2008-08-04 Travis Vitek [EMAIL PROTECTED] STDCXX-776 * tests/containers/23.list.erase.cpp (test_erase): Asserted precondition to silence another bugus HP aCC 6/cadvise warning. Modified: stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp Modified: stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp?rev=682548r1=682547r2=682548view=diff == --- stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp (original) +++ stdcxx/branches/4.2.x/tests/containers/23.list.erase.cpp Mon Aug 4 17:13:55 2008 @@ -383,13 +383,19 @@ line %d. %{$FUNCALL} != end(), __LINE__); } else { + + // assert precondition to silence a bogus HP cadvise + // warning #20200-D: Potential null pointer dereference + const ListIter::pointer pres_iter = *res_iter; + RW_ASSERT (pres_iter != 0); + bool success = - tdata.res_ [tcase.off].data_.val_ == res_iter-data_.val_; + tdata.res_ [tcase.off].data_.val_ == pres_iter-data_.val_; rw_assert (success, 0, tcase.line, line %d. %{$FUNCALL} == %{#c}, got %{#c}, __LINE__, char (tdata.res_ [tcase.off].data_.val_), - char (res_iter-data_.val_)); + char (pres_iter-data_.val_)); } }
svn commit: r682549 - /stdcxx/branches/4.3.x/tests/containers/23.list.erase.cpp
Author: vitek Date: Mon Aug 4 17:16:41 2008 New Revision: 682549 URL: http://svn.apache.org/viewvc?rev=682549view=rev Log: 2008-08-04 Travis Vitek [EMAIL PROTECTED] Merge r682548 from branches/4.2.x 2008-08-04 Travis Vitek [EMAIL PROTECTED] STDCXX-776 * tests/containers/23.list.erase.cpp (test_erase): Asserted precondition to silence another bugus HP aCC 6/cadvise warning. Modified: stdcxx/branches/4.3.x/tests/containers/23.list.erase.cpp Modified: stdcxx/branches/4.3.x/tests/containers/23.list.erase.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/containers/23.list.erase.cpp?rev=682549r1=682548r2=682549view=diff == --- stdcxx/branches/4.3.x/tests/containers/23.list.erase.cpp (original) +++ stdcxx/branches/4.3.x/tests/containers/23.list.erase.cpp Mon Aug 4 17:16:41 2008 @@ -383,13 +383,19 @@ line %d. %{$FUNCALL} != end(), __LINE__); } else { + + // assert precondition to silence a bogus HP cadvise + // warning #20200-D: Potential null pointer dereference + const ListIter::pointer pres_iter = *res_iter; + RW_ASSERT (pres_iter != 0); + bool success = - tdata.res_ [tcase.off].data_.val_ == res_iter-data_.val_; + tdata.res_ [tcase.off].data_.val_ == pres_iter-data_.val_; rw_assert (success, 0, tcase.line, line %d. %{$FUNCALL} == %{#c}, got %{#c}, __LINE__, char (tdata.res_ [tcase.off].data_.val_), - char (res_iter-data_.val_)); + char (pres_iter-data_.val_)); } }
svn commit: r682550 - /stdcxx/trunk/tests/containers/23.list.erase.cpp
Author: vitek Date: Mon Aug 4 17:17:17 2008 New Revision: 682550 URL: http://svn.apache.org/viewvc?rev=682550view=rev Log: 2008-08-04 Travis Vitek [EMAIL PROTECTED] Merge r682548 from branches/4.2.x 2008-08-04 Travis Vitek [EMAIL PROTECTED] STDCXX-776 * tests/containers/23.list.erase.cpp (test_erase): Asserted precondition to silence another bugus HP aCC 6/cadvise warning. Modified: stdcxx/trunk/tests/containers/23.list.erase.cpp Modified: stdcxx/trunk/tests/containers/23.list.erase.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/containers/23.list.erase.cpp?rev=682550r1=682549r2=682550view=diff == --- stdcxx/trunk/tests/containers/23.list.erase.cpp (original) +++ stdcxx/trunk/tests/containers/23.list.erase.cpp Mon Aug 4 17:17:17 2008 @@ -383,13 +383,19 @@ line %d. %{$FUNCALL} != end(), __LINE__); } else { + + // assert precondition to silence a bogus HP cadvise + // warning #20200-D: Potential null pointer dereference + const ListIter::pointer pres_iter = *res_iter; + RW_ASSERT (pres_iter != 0); + bool success = - tdata.res_ [tcase.off].data_.val_ == res_iter-data_.val_; + tdata.res_ [tcase.off].data_.val_ == pres_iter-data_.val_; rw_assert (success, 0, tcase.line, line %d. %{$FUNCALL} == %{#c}, got %{#c}, __LINE__, char (tdata.res_ [tcase.off].data_.val_), - char (res_iter-data_.val_)); + char (pres_iter-data_.val_)); } }
svn commit: r681820 [7/7] - in /stdcxx/trunk: ./ doc/ etc/config/src/ examples/include/ include/ include/loc/ include/rw/ src/ tests/containers/ tests/diagnostics/ tests/include/ tests/intro/ tests/lo
Copied: stdcxx/trunk/tests/utilities/20.tuple.creation.cpp (from r672948, stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp) URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.tuple.creation.cpp?p2=stdcxx/trunk/tests/utilities/20.tuple.creation.cppp1=stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cppr1=672948r2=681820rev=681820view=diff == --- stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp (original) +++ stdcxx/trunk/tests/utilities/20.tuple.creation.cpp Fri Aug 1 13:51:17 2008 @@ -28,8 +28,9 @@ #include rw_driver.h - // compile out all test code if extensions disabled - #ifndef _RWSTD_NO_EXT_CXX_0X +// compile out all test code if extensions disabled +#if!defined(_RWSTD_NO_EXT_CXX_0X) \ + !defined(_RWSTD_NO_RVALUE_REFERENCES) #include functional // for reference_wrapper #include tuple @@ -45,47 +46,58 @@ { rw_info (0, __FILE__, __LINE__, make_tuple); -IntTuple it1 = std::make_tuple (1); +std::tupleint it1 = std::make_tuple (1); -typedef std::tupleint, intIntTuple2; int i = 2; -IntTuple2 it2 = std::make_tuple (1, i); +std::tupleint, int it2 = std::make_tuple (1, i); -typedef std::tupleint, int, int IntTuple3; const int j = 3; -IntTuple3 it3 = std::make_tuple (1, i, j); +std::tupleint, int, int it3 = std::make_tuple (1, i, j); +std::tupleint rt1 = std::make_tuple (std::ref (i)); + +std::tupleconst int rt2 = std::make_tuple (std::cref (i)); } /**/ +#include cstring + static void test_tie () { rw_info (0, __FILE__, __LINE__, tie); +int i = 0; double d = 0.0; const char* s = 0; +std::tie (i, std::ignore, s) += std::make_tuple (256, 3.14159, string); + +rw_assert (i == 256, __FILE__, __LINE__, + i == 256, got false, expected true); +rw_assert (d == 0.0, __FILE__, __LINE__, + d == 0.0, got false, expected true); +rw_assert (0 == std::strcmp (s, string), __FILE__, __LINE__, + s == \string\, got false, expected true); } /**/ -#define Big1stPart bool, char, int, double -#define Big2ndPart void*, UserClass - static void test_tuple_cat () { rw_info (0, __FILE__, __LINE__, tuple_cat); -#define Big1stPart bool, char, int, double -#define Big2ndPart void*, UserClass +#define FirstHalf bool, char, int, double +#define SecondHalf void*, UserDefined -typedef std::tupleBig1stPart Big1stTuple; -Big1stTuple bt1 (true, 'a', 256, 3.14159); +typedef std::tupleFirstHalf FirstTuple; +FirstTuple t1 (true, 'a', 256, 3.14159); -typedef std::tupleBig2ndPart Big2ndTuple; -Big2ndTuple bt2 (bt1, UserClass ()); +typedef std::tupleSecondHalf SecondTuple; +SecondTuple t2 (t1, UserDefined ()); -//BigTuple bt (tuple_cat (bt1, bt2)); +typedef std::tupleFirstHalf, SecondHalf WholeTuple; +//WholeTuple t3 (tuple_cat (t1, t2)); } /**/ @@ -103,17 +115,28 @@ return 0; } -#else // !_RWSTD_NO_EXT_CXX_0X +#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES static int run_test (int, char*[]) { -rw_info (0, 0, __LINE__, - tests for C++0x tuple extension disabled); +#if defined (_RWSTD_NO_EXT_CXX_0X) + +rw_warn (0, 0, __LINE__, + test disabled because _RWSTD_NO_EXT_CXX_0X is defined); + +#elif defined (_RWSTD_NO_RVALUE_REFERENCES) + +rw_warn (0, 0, __LINE__, +test disabled because _RWSTD_NO_RVALUE_REFERENCES is +defined); + +#endif + return 0; } -#endif // !_RWSTD_NO_EXT_CXX_0X +#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES /*extern*/ int main (int argc, char* argv []) Modified: stdcxx/trunk/tests/utilities/20.tuple.elem.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.tuple.elem.cpp?rev=681820r1=681819r2=681820view=diff == --- stdcxx/trunk/tests/utilities/20.tuple.elem.cpp (original) +++ stdcxx/trunk/tests/utilities/20.tuple.elem.cpp Fri Aug 1 13:51:17 2008 @@ -2,7 +2,7 @@ * * 20.tuple.elem.cpp - tests exercising tuple element accessors * - * $Id$ + * $Id: 20.tuple.elem.cpp 677985 2008-07-18 18:05:55Z elemings $ * *** * @@ -11,7 +11,7 @@ * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the License); you may not use this file - * except in compliance with the License. You may obtain a copy of + * except in
svn propchange: r681820 - svn:log
Author: vitek Revision: 681820 Modified property: svn:log Modified: svn:log at Fri Aug 1 13:53:24 2008 -- --- svn:log (original) +++ svn:log Fri Aug 1 13:53:24 2008 @@ -5,7 +5,7 @@ r675044, r675316, r675344, r675390, r675429, r675434, r675458, r675803, r675809, r675829, r676788, r677418, r677464, r677465, r677985, r678247, r678475, r678894, r678901, r678907, r678913, r678931, r680574, r681567 -from branches/4.3.x: + from branches/4.3.x: 2008-06-24 Travis Vitek [EMAIL PROTECTED] @@ -599,7 +599,7 @@ * examples/include/stocks.h: Removed unused code. -2008-07-22 Travis Vitek [EMAIL PROTECTED] + 2008-07-22 Travis Vitek [EMAIL PROTECTED] * include/type_traits [_RWSTD_NO_ALIGN_TRAITS]: Conditionally remove traits that deal with alignment as there is a good chance they will
svn propchange: r681820 - svn:log
Author: vitek Revision: 681820 Modified property: svn:log Modified: svn:log at Fri Aug 1 13:55:05 2008 -- --- svn:log (original) +++ svn:log Fri Aug 1 13:55:05 2008 @@ -455,6 +455,89 @@ * tests/utilities/20.function.objects.cpp: Same. + 2008-07-09 Travis Vitek [EMAIL PROTECTED] + + STDCXX-916 + * include/rw/_meta_help.h: Remove doxygen tags from comments. + * include/rw/_meta_prop.h: Reduce lines to 76 characters or + less where necessary. + [_MSC_VER]: Simplify workaround for broken __is_pod() and + __is_empty(). + [!_RWSTD_TT_IS_STANDARD_LAYOUT]: Change fallback for the + __rw_is_standard_layout trait to be more reliable. + [!_RWSTD_TT_IS_EMPTY]: Change fallback for __rw_is_empty + trait to be more reliable. + [!_RWSTD_TT_IS_POLYMORPHIC]: Add fallback to detect polymorphic + class types when compiler support is not available. + [!_RWSTD_TT_IS_ABSTRACT]: Add fallback to detect abstract + class types when compiler support is not available. + [!_RWSTD_TT_HAS_TRIVIAL_CTOR]: Add fallback to detect types + that have a trivial constructor when compiler support is not + available. + [!_RWSTD_TT_HAS_TRIVIAL_COPY]: Add fallback to detect types + that have a trivial copy constructor when compiler support is + not available. + [!_RWSTD_TT_HAS_TRIVIAL_ASSIGN]: Add fallback to detect types + that have a trivial assignment operator when compiler support + is not available. + [!_RWSTD_TT_HAS_TRIVIAL_DTOR]: Add fallback to detect types + that have a trivial destructor when compiler support is not + available. + [!_RWSTD_TT_HAS_NOTHROW_CTOR]: Add fallback to detect types + that have a nothrow constructor when compiler support is not + available. + [!_RWSTD_TT_HAS_NOTHROW_COPY]: Add fallback to detect types + that have a nothrow copy constructor when compiler support is + not available. + [!_RWSTD_TT_HAS_NOTHROW_ASSIGN]: Add fallback to detect types + that have a nothrow assignment operator when compiler support + is not available. + [!_RWSTD_TT_HAS_VIRTUAL_DTOR]: Add fallback to detect types + that have a virtual destructor when compiler support is not + available. Currently tests that the type is polymorphic, which + may not be entirely accurate. + * include/rw/_meta_other.h [__GNUG__]: Use simpler implementation for + __rw_aligned_storage. Reorder union members to make most strictly + aligned member first. + [_RWSTD_TT_MAX_ALIGNMENT]: Guard __rw_aligned_storage_impl + specializations to prevent their use when the requested alignment + is out of range. + * include/rw/_meta_comp.h: Reduce lines to 76 characters or less. + * include/rw/_meta_cat.h: Add __rw_is_class_or_union helper. + [!_RWSTD_TT_IS_CLASS]: Add fallback to detect class types, using + _RWSTD_TT_IS_UNION if available. + [!_RWSTD_TT_IS_UNION]: Add fallback to detect union types, using + _RWSTD_TT_IS_CLASS if available. + [!_RWSTD_TT_IS_ENUM]: Add fallback to detect enum types when compiler + support is not available. + [!_RWSTD_TT_IS_FUNCTION]: Fix fallback for __rw_is_function to avoid + compiler warnings on HP aCC 6.16. + * include/rw/_meta_ref.h: Reduce lines to 76 characters or less. + Remove use of _TYPENAME macro. + * include/rw/_meta_rel.h: Fix __rw_is_convertible_impl to avoid + warning on HP aCC 6.16. Reduce lines to 76 characters or less. + Remove use of _TYPENAME macro. Fix __rw_is_convertible_impl to + avoid compiler warnings on HP aCC 6.16. + [_RWSTD_TT_IS_CONVERTIBLE]: Guard header inclusion. Rename template + parameters to _From and _To for clarity. + [_RWSTD_TT_IS_BASE_OF]: Guard header inclusion. Change fallback for + __rw_is_base_of to be more reliable. Rename template parameters to + _Base and _Derived for clarity. + * include/rw/_config-gcc.h [__GNUG__]: Reduce lines to 76 characters + or less where necessary. Work around issue with gcc aligned attribute + so we can use it to define __rw_aligned_storage. + * include/rw/_config-acc.h [__HP_aCC]: Add macros _RWSTD_TT_ALIGN_OF, + _RWSTD_TT_MAX_ALIGNMENT, and _RWSTD_TT_ALIGNED_POD. + * include/rw/_config-msvc.h [_MSC_VER]: Remove comments about broken + __is_pod(). Reduce lines to 76 characters or less where necessary. + Provide accurate definition of _RWSTD_TT_MAX_ALIGNMENT. + * tests/utilities/20.meta.trans.other.cpp: Add include for stddef.h. + Use std::alignment_of instead of __alignof() for portability. Test + default alignment for various aligned storage sizes. + * tests/utilities/20.meta.rel.cpp (test_is_base_of): Fix test cases
svn commit: r681836 - in /stdcxx/trunk: include/deque include/deque.cc include/vector tests/localization/22.locale.synopsis.cpp
Author: vitek Date: Fri Aug 1 14:26:37 2008 New Revision: 681836 URL: http://svn.apache.org/viewvc?rev=681836view=rev Log: 2008-08-01 Travis Vitek [EMAIL PROTECTED] Merge rev r679133 from branches/4.3.x 2008-07-23 Eric Lemings [EMAIL PROTECTED] STDCXX-978 * include/deque: Remove function declarations that were guarded by `#ifdef _RWSTD_NO_MEMBER_TEMPLATES' directive. * include/vector: Same. * inclue/deque.cc: Replace all `__self' pointers with `this'. * include/vector.cc: Same. * tests/localization/22.locale.synopsis.cpp: Remove unused member functions what were guarded by same directive. Modified: stdcxx/trunk/include/deque stdcxx/trunk/include/deque.cc stdcxx/trunk/include/vector stdcxx/trunk/tests/localization/22.locale.synopsis.cpp Modified: stdcxx/trunk/include/deque URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/deque?rev=681836r1=681835r2=681836view=diff == --- stdcxx/trunk/include/deque (original) +++ stdcxx/trunk/include/deque Fri Aug 1 14:26:37 2008 @@ -58,29 +58,6 @@ template class _TypeT, class _Allocator = allocator_TypeT class deque; -// declarations of non-member function templates implementing -// the functionality of deque member function templates - -_EXPORT -template class _TypeT, class _Allocator, class _InputIter -void __rw_assign_range (deque_TypeT, _Allocator*, -_InputIter, _InputIter, input_iterator_tag); - -_EXPORT -template class _TypeT, class _Allocator, class _FwdIter -void __rw_assign_range (deque_TypeT, _Allocator*, -_FwdIter, _FwdIter, forward_iterator_tag); - -_EXPORT -template class _TypeT, class _Allocator, class _DequeIter, class _InputIter -void __rw_insert_range (deque_TypeT, _Allocator*, _DequeIter, -_InputIter, _InputIter, input_iterator_tag); - -_EXPORT -template class _TypeT, class _Allocator, class _DequeIter, class _BidirIter -void __rw_insert_range (deque_TypeT, _Allocator*, _DequeIter, -_BidirIter, _BidirIter, bidirectional_iterator_tag); - template class _TypeT, class _DiffT, class _Pointer, class _Reference, class _Allocator Modified: stdcxx/trunk/include/deque.cc URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/deque.cc?rev=681836r1=681835r2=681836view=diff == --- stdcxx/trunk/include/deque.cc (original) +++ stdcxx/trunk/include/deque.cc Fri Aug 1 14:26:37 2008 @@ -525,10 +525,8 @@ { typedef deque _Deque; -deque* const __self = this; - _RWSTD_ASSERT_RANGE (__first, __last); -_RWSTD_ASSERT (__self-_C_is_valid ()); +_RWSTD_ASSERT (this-_C_is_valid ()); #ifndef _RWSTD_NO_EXT_DEQUE_ASSIGN_IN_PLACE @@ -541,21 +539,21 @@ //assignment operator and iterator operations do not throw // -- basic otherwise -const iterator __end = __self-end (); +const iterator __end = this-end (); // avoid using the name __i or __it below so as not to trigger // a (bogus) gcc 2.95.2 -Wshadow warning: declaration of `__i' // shadows previous local -for (iterator __ix = __self-begin (); !(__ix == __end); +for (iterator __ix = this-begin (); !(__ix == __end); ++__ix, ++__first) { if (__first == __last) { -__self-erase (__ix, __end); +this-erase (__ix, __end); return; } *__ix = *__first; } -__self-insert (__end, __first, __last); +this-insert (__end, __first, __last); #else // if defined (_RWSTD_NO_EXT_DEQUE_ASSIGN_IN_PLACE) @@ -564,8 +562,8 @@ // complexity: linear in distance(first, last) // exception safety: basic -__self-clear (); -__self-insert (__self-begin (), __first, __last); +this-clear (); +this-insert (this-begin (), __first, __last); #endif // _RWSTD_NO_EXT_DEQUE_ASSIGN_IN_PLACE @@ -581,9 +579,7 @@ { typedef deque _Deque; -_Deque* const __self = this; - -_RWSTD_ASSERT_RANGE (__it, __self-end ()); +_RWSTD_ASSERT_RANGE (__it, this-end ()); _RWSTD_ASSERT_RANGE (__first, __last); #ifndef _RWSTD_NO_EXT_DEQUE_INSERT_IN_PLACE @@ -592,21 +588,21 @@ // from the input sequence in the case of an exception for ( ; !(__first == __last); ++__it, ++__first) -__it = __self-insert (__it, *__first); +__it = this-insert (__it, *__first); #else // if defined (_RWSTD_NO_EXT_DEQUE_INSERT_IN_PLACE) // 23.2.1.3, p2: if an exception is thrown other than by the copy // constructor or assignment operator of T there are no effects. -_Deque __tmp (__self-begin (), __it, __self-get_allocator ()); +_Deque __tmp (this-begin (), __it, this-get_allocator ()); for (; !(__first == __last); ++__first) __tmp.push_back
svn commit: r681841 - /stdcxx/trunk/src/wcodecvt.cpp
Author: vitek Date: Fri Aug 1 14:28:56 2008 New Revision: 681841 URL: http://svn.apache.org/viewvc?rev=681841view=rev Log: 2008-08-01 Travis Vitek [EMAIL PROTECTED] Merge r676075 from branches/4.2.x 2008-07-11 Martin Sebor [EMAIL PROTECTED] STDCXX-992 * src/wcodecvt.cpp (mblen): Declared with the correct return type. Modified: stdcxx/trunk/src/wcodecvt.cpp Modified: stdcxx/trunk/src/wcodecvt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/wcodecvt.cpp?rev=681841r1=681840r2=681841view=diff == --- stdcxx/trunk/src/wcodecvt.cpp (original) +++ stdcxx/trunk/src/wcodecvt.cpp Fri Aug 1 14:28:56 2008 @@ -86,7 +86,7 @@ # undef _RWSTD_NO_MBLEN -extern C _RWSTD_SIZE_T +extern C int mblen (const char*, size_t) _LIBC_THROWS(); #endif // _RWSTD_NO_MBLEN !_RWSTD_NO_MBLEN_IN_LIBC
svn propchange: r681836 - svn:log
Author: vitek Revision: 681836 Modified property: svn:log Modified: svn:log at Fri Aug 1 14:29:35 2008 -- --- svn:log (original) +++ svn:log Fri Aug 1 14:29:35 2008 @@ -1,6 +1,6 @@ 2008-08-01 Travis Vitek [EMAIL PROTECTED] - Merge rev r679133 from branches/4.3.x + Merge r679133 from branches/4.3.x 2008-07-23 Eric Lemings [EMAIL PROTECTED]
svn commit: r680545 - /stdcxx/branches/4.2.x/include/rw/_defs.h
Author: vitek Date: Mon Jul 28 15:29:38 2008 New Revision: 680545 URL: http://svn.apache.org/viewvc?rev=680545view=rev Log: 2008-07-28 Travis Vitek [EMAIL PROTECTED] * include/rw/_defs.h: Use _RWSTD_DECLARE_NOTHROW macro only after definition of _THROWS to avoid compile errors. Modified: stdcxx/branches/4.2.x/include/rw/_defs.h Modified: stdcxx/branches/4.2.x/include/rw/_defs.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_defs.h?rev=680545r1=680544r2=680545view=diff == --- stdcxx/branches/4.2.x/include/rw/_defs.h (original) +++ stdcxx/branches/4.2.x/include/rw/_defs.h Mon Jul 28 15:29:38 2008 @@ -1127,6 +1127,56 @@ # define _RWSTD_ASSUME(expr) _RWSTD_ASSERT (expr) #endif // _RWSTD_ASSUME +#define _RWSTD_STR(x) #x +#define _RWSTD_STRSTR(x)_RWSTD_STR(x) + +#ifndef _RWSTD_NO_PRETTY_FUNCTION +# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __PRETTY_FUNCTION__ +#elif !defined (_RWSTD_NO_FUNC) +# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __func__ +#elif defined (__FUNCSIG__) +# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __FUNCSIG__ +#else +# define _RWSTD_FUNC(name) _RWSTD_FILE_LINE, name +#endif + +#define _RWSTD_FILE_LINE __FILE__ : _RWSTD_STRSTR (__LINE__) + +#if !defined (__DECCXX_VER) || __DECCXX_VER 60290024 +# define _RWSTD_REQUIRES(pred, args) (pred) ? (void)0 : _RW::__rw_throw args +#else + // working around a DEC cxx bug +# define _RWSTD_REQUIRES(pred, args) if (pred) ; else _RW::__rw_throw args +#endif + + +// function exception specification +#if!defined (_RWSTD_NO_EXCEPTIONS) \ + !defined (_RWSTD_NO_EXCEPTION_SPECIFICATION) + // type_id_list is a possibly empty parenthesized list + //of comma-separated type-id's +# define _THROWS(type_id_list) throw type_id_list +#else // if _RWSTD_NO_EXCEPTIONS || _RWSTD_NO_EXCEPTION_SPECIFICATION +# define _THROWS(ignore) /* empty */ +#endif // !_RWSTD_NO_EXCEPTIONS !_RWSTD_NO_EXCEPTION_SPECIFICATION + + +// function exception specification on extern C libc functions +#ifndef _RWSTD_NO_LIBC_EXCEPTION_SPEC +# define _LIBC_THROWS(/* empty */) throw () +#else +# define _LIBC_THROWS(/* empty */) /* empty */ +#endif // _RWSTD_NO_LIBC_EXCEPTION_SPEC + + +// function exception specification on operator new +#ifndef _RWSTD_NO_EXCEPTION_SPECIFICATION_ON_NEW +# define _NEW_THROWS(args) _THROWS (args) +#else +# define _NEW_THROWS(ignore) /* empty */ +#endif // _RWSTD_NO_EXCEPTION_SPECIFICATION_ON_NEW + + #ifndef _RWSTD_ATTRIBUTE_NORETURN // gcc (and others) __attribute__ ((noreturn)) # define _RWSTD_ATTRIBUTE_NORETURN /* empty */ @@ -1181,56 +1231,6 @@ } // namespace __rw -#define _RWSTD_STR(x) #x -#define _RWSTD_STRSTR(x)_RWSTD_STR(x) - -#ifndef _RWSTD_NO_PRETTY_FUNCTION -# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __PRETTY_FUNCTION__ -#elif !defined (_RWSTD_NO_FUNC) -# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __func__ -#elif defined (__FUNCSIG__) -# define _RWSTD_FUNC(ignore) _RWSTD_FILE_LINE, __FUNCSIG__ -#else -# define _RWSTD_FUNC(name) _RWSTD_FILE_LINE, name -#endif - -#define _RWSTD_FILE_LINE __FILE__ : _RWSTD_STRSTR (__LINE__) - -#if !defined (__DECCXX_VER) || __DECCXX_VER 60290024 -# define _RWSTD_REQUIRES(pred, args) (pred) ? (void)0 : _RW::__rw_throw args -#else - // working around a DEC cxx bug -# define _RWSTD_REQUIRES(pred, args) if (pred) ; else _RW::__rw_throw args -#endif - - -// function exception specification -#if!defined (_RWSTD_NO_EXCEPTIONS) \ - !defined (_RWSTD_NO_EXCEPTION_SPECIFICATION) - // type_id_list is a possibly empty parenthesized list - //of comma-separated type-id's -# define _THROWS(type_id_list) throw type_id_list -#else // if _RWSTD_NO_EXCEPTIONS || _RWSTD_NO_EXCEPTION_SPECIFICATION -# define _THROWS(ignore) /* empty */ -#endif // !_RWSTD_NO_EXCEPTIONS !_RWSTD_NO_EXCEPTION_SPECIFICATION - - -// function exception specification on extern C libc functions -#ifndef _RWSTD_NO_LIBC_EXCEPTION_SPEC -# define _LIBC_THROWS(/* empty */) throw () -#else -# define _LIBC_THROWS(/* empty */) /* empty */ -#endif // _RWSTD_NO_LIBC_EXCEPTION_SPEC - - -// function exception specification on operator new -#ifndef _RWSTD_NO_EXCEPTION_SPECIFICATION_ON_NEW -# define _NEW_THROWS(args) _THROWS (args) -#else -# define _NEW_THROWS(ignore) /* empty */ -#endif // _RWSTD_NO_EXCEPTION_SPECIFICATION_ON_NEW - - // for convenience #if!defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) \ (!defined (__SUNPRO_CC) || __SUNPRO_CC 0x540)
svn commit: r680574 - /stdcxx/branches/4.3.x/tests/src/thread.cpp
Author: vitek Date: Mon Jul 28 17:02:48 2008 New Revision: 680574 URL: http://svn.apache.org/viewvc?rev=680574view=rev Log: 2008-07-28 Travis Vitek [EMAIL PROTECTED] * tests/src/thread.cpp [__EDG__]: Disable error for use of long long in pthreadtypes.h system header. Modified: stdcxx/branches/4.3.x/tests/src/thread.cpp Modified: stdcxx/branches/4.3.x/tests/src/thread.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/thread.cpp?rev=680574r1=680573r2=680574view=diff == --- stdcxx/branches/4.3.x/tests/src/thread.cpp (original) +++ stdcxx/branches/4.3.x/tests/src/thread.cpp Mon Jul 28 17:02:48 2008 @@ -83,6 +83,20 @@ #if defined (_RWSTD_POSIX_THREADS) + +# if defined (__linux__) +#ifdefined (__EDG__)\ + !defined (__DECCXX) \ + !defined (__HP_aCC) \ + !defined (__INTEL_COMPILER) \ + !defined (_SGI_COMPILER_VERSION) + // disable error #450-D: the type long long is nonstandard + // when using the vanilla EDG eccp in strict mode (i.e., w/o + // long long support) +# pragma diag_suppress 450 +#endif // vanilla EDG eccp on Linux +# endif + # include pthread.h _TEST_EXPORT int
svn commit: r679158 - in /stdcxx/branches/4.3.x: include/rw/_config-eccp.h include/rw/_meta_prop.h include/rw/_meta_rel.h tests/utilities/20.meta.rel.cpp
Author: vitek Date: Wed Jul 23 11:39:45 2008 New Revision: 679158 URL: http://svn.apache.org/viewvc?rev=679158view=rev Log: 2008-07-23 Travis Vitek [EMAIL PROTECTED] * include/rw/_config-eccp.h: Use built-in __is_empty() trait. * include/rw/_meta_prop.h: Remove sunpro-5.9 workaround for __rw_is_const and __rw_is_volatile in favor of one that works with msvc-8.0 also. Add msvc-8.0 workarounds removed in r678931. Apply workaround for __is_empty() on eccp-3.10. * include/rw/_meta_rel.h: Invert logic on __rw_is_base_of_impl specializations to improve readability. Ensure that cv-qualified types are considered equal for __is_base_of_impl. Add msvc-8.0 workarounds removed in r678931. * tests/utilities/20.meta.rel.cpp (test_is_same): Add cv-qual testing. (test_is_base_of): Ditto. (test_is_convertible) [_MSC_VER]: Work around msvc extension that allows conversion from function pointer to void pointer. Modified: stdcxx/branches/4.3.x/include/rw/_config-eccp.h stdcxx/branches/4.3.x/include/rw/_meta_prop.h stdcxx/branches/4.3.x/include/rw/_meta_rel.h stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp Modified: stdcxx/branches/4.3.x/include/rw/_config-eccp.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config-eccp.h?rev=679158r1=679157r2=679158view=diff == --- stdcxx/branches/4.3.x/include/rw/_config-eccp.h (original) +++ stdcxx/branches/4.3.x/include/rw/_config-eccp.h Wed Jul 23 11:39:45 2008 @@ -73,8 +73,7 @@ # define _RWSTD_TT_IS_CLASS(T) __is_class(T) # define _RWSTD_TT_IS_POD(T) __is_pod(T) -// __is_empty() fails to detect union types -//# define _RWSTD_TT_IS_EMPTY(T) __is_empty(T) +# define _RWSTD_TT_IS_EMPTY(T) __is_empty(T) # define _RWSTD_TT_IS_POLYMORPHIC(T) __is_polymorphic(T) // __is_convertible_to() fails for decay and void-void conversions Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_prop.h?rev=679158r1=679157r2=679158view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_prop.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_prop.h Wed Jul 23 11:39:45 2008 @@ -44,80 +44,48 @@ template struct TraitType volatile : __rw_true_type { }; \ template struct TraitType const volatile : __rw_true_type { } - -#if defined (__SUNPRO_CC) (__SUNPRO_CC = 0x590) - template class _TypeT -struct __rw_is_const_impl +struct __rw_is_const : __rw_false_type { -struct _C_no { }; -struct _C_yes { _C_no __pad [2]; }; - -template class _TypeU -struct _C_nest { }; - -template class _TypeU -static _C_yes _C_test (_C_nestconst _TypeU*); - -template class _TypeU -static _C_no _C_test (_C_nest_TypeU*); - -enum { _C_value = -sizeof (_C_test ((_C_nest_TypeT*)0)) == sizeof (_C_yes) -}; }; template class _TypeT -struct __rw_is_const - : __rw_integral_constantbool, __rw_is_const_impl_TypeT::_C_value +struct __rw_is_constconst _TypeT : __rw_true_type { }; template class _TypeT -struct __rw_is_volatile_impl +struct __rw_is_volatile : __rw_false_type { -struct _C_no { }; -struct _C_yes { _C_no __pad [2]; }; - -template class _TypeU -struct _C_nest { }; - -template class _TypeU -static _C_yes _C_test (_C_nestvolatile _TypeU*); - -template class _TypeU -static _C_no _C_test (_C_nest_TypeU*); - -enum { _C_value = -sizeof (_C_test ((_C_nest_TypeT*)0)) == sizeof (_C_yes) -}; }; template class _TypeT -struct __rw_is_volatile - : __rw_integral_constantbool, __rw_is_volatile_impl_TypeT::_C_value +struct __rw_is_volatilevolatile _TypeT : __rw_true_type { }; -#else +#ifdefined (__SUNPRO_CC) (__SUNPRO_CC = 0x590) \ +|| defined (_MSC_VER) (_MSC_VER = 1400) + +// additional specializations needed for these compilers template class _TypeT -struct __rw_is_const : __rw_false_type +struct __rw_is_constconst _TypeT [] : __rw_true_type { }; -template class _TypeT -struct __rw_is_constconst _TypeT : __rw_true_type +template class _TypeT, _RWSTD_SIZE_T _Size +struct __rw_is_constconst _TypeT [_Size] : __rw_true_type { }; template class _TypeT -struct __rw_is_volatile : __rw_false_type +struct __rw_is_volatilevolatile _TypeT [] : __rw_true_type { }; -template class _TypeT -struct __rw_is_volatilevolatile _TypeT : __rw_true_type +template class _TypeT, _RWSTD_SIZE_T _Size +struct __rw_is_volatilevolatile _TypeT [_Size] : __rw_true_type { }; @@ -140,7 +108,7 @@ # define _RWSTD_IS_POD(T) _RW::__rw_is_pod_implT::_C_value -#elif defined (__EDG_VERSION__) +#elif defined (__EDG_VERSION__) || defined (_MSC_VER) template class _TypeT
svn commit: r678894 - /stdcxx/branches/4.3.x/include/rw/_meta_prop.h
Author: vitek Date: Tue Jul 22 13:49:11 2008 New Revision: 678894 URL: http://svn.apache.org/viewvc?rev=678894view=rev Log: 2008-07-22 Travis Vitek [EMAIL PROTECTED] STDCXX-1002 * include/rw/_meta_prop.h [__SUNPRO_CC]: Work around sunpro-5.9 detecting cv-qualifiers on array types. Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_prop.h?rev=678894r1=678893r2=678894view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_prop.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_prop.h Tue Jul 22 13:49:11 2008 @@ -45,18 +45,71 @@ template struct TraitType const volatile : __rw_true_type { } +#if defined (__SUNPRO_CC) (__SUNPRO_CC = 0x590) + template class _TypeT -struct __rw_is_const : __rw_false_type +struct __rw_is_const_impl { +struct _C_no { }; +struct _C_yes { _C_no __pad [2]; }; + +template class _TypeU +struct _C_nest { }; + +template class _TypeU +static _C_yes _C_test (_C_nestconst _TypeU*); + +template class _TypeU +static _C_no _C_test (_C_nest_TypeU*); + +enum { _C_value = +sizeof (_C_test ((_C_nest_TypeT*)0)) == sizeof (_C_yes) +}; }; template class _TypeT -struct __rw_is_constconst _TypeT : __rw_true_type +struct __rw_is_const + : __rw_integral_constantbool, __rw_is_const_impl_TypeT::_C_value { }; -#define _RWSTD_IS_CONST(T) _RW::__rw_is_constT::value +template class _TypeT +struct __rw_is_volatile_impl +{ +struct _C_no { }; +struct _C_yes { _C_no __pad [2]; }; +template class _TypeU +struct _C_nest { }; + +template class _TypeU +static _C_yes _C_test (_C_nestvolatile _TypeU*); + +template class _TypeU +static _C_no _C_test (_C_nest_TypeU*); + +enum { _C_value = +sizeof (_C_test ((_C_nest_TypeT*)0)) == sizeof (_C_yes) +}; +}; + +template class _TypeT +struct __rw_is_volatile + : __rw_integral_constantbool, __rw_is_volatile_impl_TypeT::_C_value +{ +}; + +#else + +template class _TypeT +struct __rw_is_const : __rw_false_type +{ +}; + +template class _TypeT +struct __rw_is_constconst _TypeT : __rw_true_type +{ +}; template class _TypeT struct __rw_is_volatile : __rw_false_type @@ -68,6 +121,9 @@ { }; +#endif + +#define _RWSTD_IS_CONST(T) _RW::__rw_is_constT::value #define _RWSTD_IS_VOLATILE(T) _RW::__rw_is_volatileT::value
svn commit: r678901 - in /stdcxx/branches/4.3.x/include/rw: _meta_arr.h _meta_cat.h _meta_prop.h
Author: vitek Date: Tue Jul 22 14:03:10 2008 New Revision: 678901 URL: http://svn.apache.org/viewvc?rev=678901view=rev Log: 2008-07-22 Travis Vitek [EMAIL PROTECTED] STDCXX-1001 * include/rw/_meta_arr.h [__IBMCPP__]: Conditionally compile out definitions of traits that are partial specializations of unbound array types to avoid issues on vacpp-9.0. * include/rw/_meta_cat.h: Ditto. * include/rw/_meta_prop.h: Ditto. Modified: stdcxx/branches/4.3.x/include/rw/_meta_arr.h stdcxx/branches/4.3.x/include/rw/_meta_cat.h stdcxx/branches/4.3.x/include/rw/_meta_prop.h Modified: stdcxx/branches/4.3.x/include/rw/_meta_arr.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_arr.h?rev=678901r1=678900r2=678901view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_arr.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_arr.h Tue Jul 22 14:03:10 2008 @@ -46,12 +46,16 @@ typedef _TypeT type; }; +#if !defined (__IBMCPP__) || (900 __IBMCPP__) + template class _TypeT struct __rw_remove_extent_TypeT [] { typedef _TypeT type; }; +#endif + #define _RWSTD_REMOVE_EXTENT(T) _RW::__rw_remove_extentT::type template class _TypeT @@ -66,12 +70,16 @@ typedef typename __rw_remove_all_extents_TypeT::type type; }; +#if !defined (__IBMCPP__) || (900 __IBMCPP__) + template class _TypeT struct __rw_remove_all_extents_TypeT [] { typedef typename __rw_remove_all_extents_TypeT::type type; }; +#endif + #define _RWSTD_REMOVE_ALL_EXTENTS(T) _RW::__rw_remove_all_extentsT::type } // namespace __rw Modified: stdcxx/branches/4.3.x/include/rw/_meta_cat.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_cat.h?rev=678901r1=678900r2=678901view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_cat.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_cat.h Tue Jul 22 14:03:10 2008 @@ -134,11 +134,15 @@ { }; +#if !defined (__IBMCPP__) || (900 __IBMCPP__) + template class _TypeT struct __rw_is_array_TypeT [] : __rw_true_type { }; +#endif + #define _RWSTD_IS_ARRAY(T) _RW::__rw_is_arrayT::value template class _TypeT Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_prop.h?rev=678901r1=678900r2=678901view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_prop.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_prop.h Tue Jul 22 14:03:10 2008 @@ -679,12 +679,16 @@ { }; +#if !defined (__IBMCPP__) || (900 __IBMCPP__) + template class _TypeT struct __rw_rank_TypeT [] : __rw_integral_constant_RWSTD_SIZE_T, 1 + __rw_rank_TypeT::value { }; +#endif + #define _RWSTD_RANK(T) _RW::__rw_rankT::value @@ -702,6 +706,8 @@ { }; +#if !defined (__IBMCPP__) || (900 __IBMCPP__) + template class _TypeT, _RWSTD_SIZE_T _Depth struct __rw_extent_TypeT [], _Depth : __rw_integral_constant_RWSTD_SIZE_T, @@ -709,20 +715,25 @@ { }; +#endif + template class _TypeT, _RWSTD_SIZE_T _Size struct __rw_extent_TypeT [_Size], 0 : __rw_integral_constant_RWSTD_SIZE_T, _Size { }; +#if !defined (__IBMCPP__) || (900 __IBMCPP__) + template class _TypeT struct __rw_extent_TypeT [], 0 : __rw_integral_constant_RWSTD_SIZE_T, 0 { }; -#define _RWSTD_EXTENT_1(T) _RW::__rw_extentT::value -#define _RWSTD_EXTENT_2(T,D) _RW::__rw_extentT,D::value +#endif + +#define _RWSTD_EXTENT(T,D) _RW::__rw_extentT,D::value } // namespace __rw
svn propchange: r678894 - svn:log
Author: vitek Revision: 678894 Modified property: svn:log Modified: svn:log at Tue Jul 22 15:40:59 2008 -- --- svn:log (original) +++ svn:log Tue Jul 22 15:40:59 2008 @@ -1,7 +1,6 @@ 2008-07-22 Travis Vitek [EMAIL PROTECTED] STDCXX-1002 - * include/rw/_meta_prop.h [__SUNPRO_CC]: Work around sunpro-5.9 detecting cv-qualifiers on array types.
svn commit: r676102 - in /stdcxx/branches/4.3.x: include/rw/_config-eccp.h include/rw/_meta_prop.h tests/utilities/20.meta.trans.other.cpp tests/utilities/20.meta.unary.prop.cpp
Author: vitek Date: Fri Jul 11 16:58:13 2008 New Revision: 676102 URL: http://svn.apache.org/viewvc?rev=676102view=rev Log: 2008-07-11 Travis Vitek [EMAIL PROTECTED] STDCXX-916 * include/rw/_meta_prop.h (__rw_is_pod_impl): Remove cv-qualifiers on types. [__EDG_VERSION__]: Work around incorrect __is_pod(), __has_trivial_constructor(), __has_trivial_assign(), __has_trivial_copy(), __has_trivial_destructor(), __has_nothrow_constructor(), __has_nothrow_assign(), __has_nothrow_copy(), __is_empty(). * include/rw/_config-eccp.h [__EDG_VERSION__]: Define helper macros for built-in trait names. * tests/utilities/20.meta.trans.other.cpp (_cond_if_char): Change linkage so that function is found when instantiating cond_if_char. * tests/utilities/20.meta.unary.prop.cpp: Add constructor to type member_t. [_RWSTD_NO_LONG_LONG]: Guard code using long long to avoid compile error when type is not supported. Modified: stdcxx/branches/4.3.x/include/rw/_config-eccp.h stdcxx/branches/4.3.x/include/rw/_meta_prop.h stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.other.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp Modified: stdcxx/branches/4.3.x/include/rw/_config-eccp.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config-eccp.h?rev=676102r1=676101r2=676102view=diff == --- stdcxx/branches/4.3.x/include/rw/_config-eccp.h (original) +++ stdcxx/branches/4.3.x/include/rw/_config-eccp.h Fri Jul 11 16:58:13 2008 @@ -66,3 +66,33 @@ #define _RWSTD_NO_EXCEPTIONS # endif // _RWSTD_NO_EXCEPTIONS #endif // __EXCEPTIONS + +#if (310 = __EDG_VERSION__) +# define _RWSTD_TT_IS_ENUM(T) __is_enum(T) +# define _RWSTD_TT_IS_UNION(T) __is_union(T) +# define _RWSTD_TT_IS_CLASS(T) __is_class(T) +# define _RWSTD_TT_IS_POD(T) __is_pod(T) +# define _RWSTD_TT_IS_EMPTY(T) __is_empty(T) +# define _RWSTD_TT_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define _RWSTD_TT_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) +# define _RWSTD_TT_IS_ABSTRACT(T) __is_abstract(T) +# define _RWSTD_TT_IS_BASE_OF(T,U) __is_base_of(T,U) + +# define _RWSTD_TT_HAS_TRIVIAL_CTOR(T) __has_trivial_constructor(T) +# define _RWSTD_TT_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T) +# define _RWSTD_TT_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T) +# define _RWSTD_TT_HAS_TRIVIAL_DTOR(T) __has_trivial_destructor(T) + +# define _RWSTD_TT_HAS_NOTHROW_CTOR(T) __has_nothrow_constructor(T) +# define _RWSTD_TT_HAS_NOTHROW_COPY(T) __has_nothrow_copy(T) +# define _RWSTD_TT_HAS_NOTHROW_ASSIGN(T) __has_nothrow_assign(T) + +# define _RWSTD_TT_HAS_VIRTUAL_DTOR(T) __has_virtual_destructor(T) + +# define _RWSTD_TT_ALIGN_OF(T) __alignof__(T) +# define _RWSTD_TT_MAX_ALIGNMENT 16 + +// need to find a way to align data +# define _RWSTD_TT_ALIGNED_POD(N) struct { double _C_align; } +#endif // __EDG_VERSION__ = 3.10 + Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_prop.h?rev=676102r1=676101r2=676102view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_prop.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_prop.h Fri Jul 11 16:58:13 2008 @@ -32,6 +32,7 @@ #include rw/_defs.h #include rw/_meta_cat.h +#include rw/_meta_comp.h #include rw/_meta_arr.h #include rw/_meta_cv.h @@ -75,27 +76,24 @@ template class _TypeT struct __rw_is_pod_impl { -typedef typename -__rw_remove_all_extents_TypeT::type _TypeU; - -typedef typename -__rw_remove_cv_TypeU::type _NoCV_TypeU; +typedef typename __rw_remove_all_extents_TypeT::type _TypeU; +typedef typename __rw_remove_cv_TypeU::type _NoCV_TypeU; enum { _C_value = __rw_is_scalar_NoCV_TypeU::value }; }; #define _RWSTD_TT_IS_POD(T) _RW::__rw_is_pod_implT::_C_value -#elif defined (_MSC_VER) +#elif defined (_MSC_VER) || defined (__EDG_VERSION__) template class _TypeT struct __rw_is_pod_impl { -typedef typename __rw_remove_cv_TypeT _TypeU; -typedef typename __rw_remove_all_extents_TypeT::type _TypeV; +typedef typename __rw_remove_all_extents_TypeT::type _TypeU; +typedef typename __rw_remove_cv_TypeU::type _NoCV_TypeU; // the MSVC provided __is_pod works for pod class types only -enum { _C_value =__rw_is_scalar_TypeV::value - || _RWSTD_TT_IS_POD(_TypeV) }; +enum { _C_value =__rw_is_scalar_NoCV_TypeU::value + || _RWSTD_TT_IS_POD(_NoCV_TypeU) }; }; # undef _RWSTD_TT_IS_POD @@ -112,7 +110,7 @@ #ifndef _RWSTD_TT_IS_STANDARD_LAYOUT -# define
svn commit: r675393 - in /stdcxx/branches/4.3.x: include/rw/_config-msvc.h include/rw/_meta_cat.h include/rw/_meta_comp.h include/rw/_meta_prop.h include/rw/_meta_rel.h tests/utilities/20.meta.rel.cpp
Author: vitek Date: Wed Jul 9 17:48:07 2008 New Revision: 675393 URL: http://svn.apache.org/viewvc?rev=675393view=rev Log: 2008-07-09 Travis Vitek [EMAIL PROTECTED] STDCXX-916 * include/rw/_config-msvc.h: Fix definition of _RWSTD_TT_ALIGNED_POD broken in r675050. * include/rw/_meta_rel.h: Update comments for __rw_is_base_of_impl, simplify implementation a tiny bit. Move __rw_is_convertible_impl down to avoid defining it unless necessary. Remove stray tabs. [_MSC_VER]: Add fallback for __rw_is_convertible to detect void-void conversions. * include/rw/_meta_cat.h: Remove stray tab. * include/rw/_meta_comp.h: Remove stray tabs. * include/rw/_meta_prop.h: Fix typos in template __rw_is_empty_impl. * tests/utilities/20.meta.rel.cpp (test_is_base_of): Add additional test cases. (test_is_convertible): Ditto. Modified: stdcxx/branches/4.3.x/include/rw/_config-msvc.h stdcxx/branches/4.3.x/include/rw/_meta_cat.h stdcxx/branches/4.3.x/include/rw/_meta_comp.h stdcxx/branches/4.3.x/include/rw/_meta_prop.h stdcxx/branches/4.3.x/include/rw/_meta_rel.h stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp Modified: stdcxx/branches/4.3.x/include/rw/_config-msvc.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config-msvc.h?rev=675393r1=675392r2=675393view=diff == --- stdcxx/branches/4.3.x/include/rw/_config-msvc.h (original) +++ stdcxx/branches/4.3.x/include/rw/_config-msvc.h Wed Jul 9 17:48:07 2008 @@ -112,7 +112,7 @@ # define _RWSTD_TT_ALIGN_OF(T)__alignof(T) # define _RWSTD_TT_ALIGNED_POD(N) \ - struct {__declspec(align(Align)) unsigned char _C_align; } + struct {__declspec(align(N)) unsigned char _C_align; } # define _RWSTD_TT_MAX_ALIGNMENT 8192 #endif // _MSC_FULL_VER = 140050215 Modified: stdcxx/branches/4.3.x/include/rw/_meta_cat.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_cat.h?rev=675393r1=675392r2=675393view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_cat.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_cat.h Wed Jul 9 17:48:07 2008 @@ -312,7 +312,7 @@ struct __rw_is_function_impl_TypeT, false { typedef _TypeT _TypeT_Ref; - typedef _TypeT* _TypeT_Ptr; +typedef _TypeT* _TypeT_Ptr; struct _C_no { }; struct _C_yes { _C_no __pad [2]; }; Modified: stdcxx/branches/4.3.x/include/rw/_meta_comp.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_comp.h?rev=675393r1=675392r2=675393view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_comp.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_comp.h Wed Jul 9 17:48:07 2008 @@ -38,7 +38,7 @@ template class _TypeT struct __rw_is_reference : __rw_integral_constantbool, -__rw_is_lvalue_reference_TypeT::value + __rw_is_lvalue_reference_TypeT::value || __rw_is_rvalue_reference_TypeT::value { }; @@ -48,7 +48,7 @@ template class _TypeT struct __rw_is_arithmetic : __rw_integral_constantbool, -__rw_is_integral_TypeT::value + __rw_is_integral_TypeT::value || __rw_is_floating_point_TypeT::value { }; @@ -79,7 +79,7 @@ template class _TypeT struct __rw_is_member_pointer : __rw_integral_constantbool, -__rw_is_member_function_pointer_TypeT::value + __rw_is_member_function_pointer_TypeT::value || __rw_is_member_object_pointer_TypeT::value { }; Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_prop.h?rev=675393r1=675392r2=675393view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_prop.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_prop.h Wed Jul 9 17:48:07 2008 @@ -157,10 +157,10 @@ #elif defined (_MSC_VER) template class _TypeT -struct __rw_is_empty_impl_TypeT +struct __rw_is_empty_impl { -enum { _C_value = __rw_is_class_TypeT::value - _RWSTD_TT_IS_EMPTY (_TypeT) }; +enum { _C_value =__rw_is_class_TypeT::value + _RWSTD_TT_IS_EMPTY (_TypeT) }; }; Modified: stdcxx/branches/4.3.x/include/rw/_meta_rel.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_rel.h?rev=675393r1=675392r2=675393view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_rel.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_rel.h Wed Jul 9 17:48:07 2008 @@ -60,36 +60,9 @@ #define _RWSTD_IS_SAME(T,U
svn commit: r675050 - in /stdcxx/branches/4.3.x: include/rw/ tests/utilities/
Author: vitek Date: Tue Jul 8 16:25:19 2008 New Revision: 675050 URL: http://svn.apache.org/viewvc?rev=675050view=rev Log: 2008-07-09 Travis Vitek [EMAIL PROTECTED] STDCXX-916 * include/rw/_meta_help.h: Remove doxygen tags from comments. * include/rw/_meta_prop.h: Reduce lines to 76 characters or less where necessary. [_MSC_VER]: Simplify workaround for broken __is_pod() and __is_empty(). [!_RWSTD_TT_IS_STANDARD_LAYOUT]: Change fallback for the __rw_is_standard_layout trait to be more reliable. [!_RWSTD_TT_IS_EMPTY]: Change fallback for __rw_is_empty trait to be more reliable. [!_RWSTD_TT_IS_POLYMORPHIC]: Add fallback to detect polymorphic class types when compiler support is not available. [!_RWSTD_TT_IS_ABSTRACT]: Add fallback to detect abstract class types when compiler support is not available. [!_RWSTD_TT_HAS_TRIVIAL_CTOR]: Add fallback to detect types that have a trivial constructor when compiler support is not available. [!_RWSTD_TT_HAS_TRIVIAL_COPY]: Add fallback to detect types that have a trivial copy constructor when compiler support is not available. [!_RWSTD_TT_HAS_TRIVIAL_ASSIGN]: Add fallback to detect types that have a trivial assignment operator when compiler support is not available. [!_RWSTD_TT_HAS_TRIVIAL_DTOR]: Add fallback to detect types that have a trivial destructor when compiler support is not available. [!_RWSTD_TT_HAS_NOTHROW_CTOR]: Add fallback to detect types that have a nothrow constructor when compiler support is not available. [!_RWSTD_TT_HAS_NOTHROW_COPY]: Add fallback to detect types that have a nothrow copy constructor when compiler support is not available. [!_RWSTD_TT_HAS_NOTHROW_ASSIGN]: Add fallback to detect types that have a nothrow assignment operator when compiler support is not available. [!_RWSTD_TT_HAS_VIRTUAL_DTOR]: Add fallback to detect types that have a virtual destructor when compiler support is not available. Currently tests that the type is polymorphic, which may not be entirely accurate. * include/rw/_meta_other.h [__GNUG__]: Use simpler implementation for __rw_aligned_storage. Reorder union members to make most strictly aligned member first. [_RWSTD_TT_MAX_ALIGNMENT]: Guard __rw_aligned_storage_impl specializations to prevent their use when the requested alignment is out of range. * include/rw/_meta_comp.h: Reduce lines to 76 characters or less. * include/rw/_meta_cat.h: Add __rw_is_class_or_union helper. [!_RWSTD_TT_IS_CLASS]: Add fallback to detect class types, using _RWSTD_TT_IS_UNION if available. [!_RWSTD_TT_IS_UNION]: Add fallback to detect union types, using _RWSTD_TT_IS_CLASS if available. [!_RWSTD_TT_IS_ENUM]: Add fallback to detect enum types when compiler support is not available. [!_RWSTD_TT_IS_FUNCTION]: Fix fallback for __rw_is_function to avoid compiler warnings on HP aCC 6.16. * include/rw/_meta_ref.h: Reduce lines to 76 characters or less. Remove use of _TYPENAME macro. * include/rw/_meta_rel.h: Fix __rw_is_convertible_impl to avoid warning on HP aCC 6.16. Reduce lines to 76 characters or less. Remove use of _TYPENAME macro. Fix __rw_is_convertible_impl to avoid compiler warnings on HP aCC 6.16. [_RWSTD_TT_IS_CONVERTIBLE]: Guard header inclusion. Rename template parameters to _From and _To for clarity. [_RWSTD_TT_IS_BASE_OF]: Guard header inclusion. Change fallback for __rw_is_base_of to be more reliable. Rename template parameters to _Base and _Derived for clarity. * include/rw/_config-gcc.h [__GNUG__]: Reduce lines to 76 characters or less where necessary. Work around issue with gcc aligned attribute so we can use it to define __rw_aligned_storage. * include/rw/_config-acc.h [__HP_aCC]: Add macros _RWSTD_TT_ALIGN_OF, _RWSTD_TT_MAX_ALIGNMENT, and _RWSTD_TT_ALIGNED_POD. * include/rw/_config-msvc.h [_MSC_VER]: Remove comments about broken __is_pod(). Reduce lines to 76 characters or less where necessary. Provide accurate definition of _RWSTD_TT_MAX_ALIGNMENT. * tests/utilities/20.meta.trans.other.cpp: Add include for stddef.h. Use std::alignment_of instead of __alignof() for portability. Test default alignment for various aligned storage sizes. * tests/utilities/20.meta.rel.cpp (test_is_base_of): Fix test cases that were failing due to parameter ordering. Modified: stdcxx/branches/4.3.x/include/rw/_config-acc.h stdcxx/branches/4.3.x/include/rw/_config-gcc.h stdcxx/branches/4.3.x/include/rw
svn propchange: r672048 - svn:log
Author: vitek Revision: 672048 Modified property: svn:log Modified: svn:log at Mon Jun 30 13:19:31 2008 -- --- svn:log (original) +++ svn:log Mon Jun 30 13:19:31 2008 @@ -2,8 +2,8 @@ * tests/utilities/20.forward.cpp [_RWSTD_NO_EXT_CXX_0X]: Add guard to get test to compile and run when extension is not - explicitly enabled. Include rw/_defs.h explicitly in case - rw_driver.h does not. + explicitly enabled. Include rw/_defs.h explicitly before using + configuration macro to follow include policy. * tests/utilities/20.tuple.cnstr.cpp: Ditto. * tests/utilities/20.tuple.elem.cpp: Ditto. * tests/utilities/20.tuple.helpers.cpp: Ditto.
svn commit: r672048 - /stdcxx/branches/4.3.x/tests/utilities/
Author: vitek Date: Thu Jun 26 15:48:21 2008 New Revision: 672048 URL: http://svn.apache.org/viewvc?rev=672048view=rev Log: 2008-06-27 Travis Vitek [EMAIL PROTECTED] * tests/utilities/20.forward.cpp [_RWSTD_NO_EXT_CXX_0X]: Add guard to get test to compile and run when extension is not explicitly enabled. Include rw/_defs.h explicitly in case rw_driver.h does not. * tests/utilities/20.tuple.cnstr.cpp: Ditto. * tests/utilities/20.tuple.elem.cpp: Ditto. * tests/utilities/20.tuple.helpers.cpp: Ditto. * tests/utilities/20.meta.help.cpp: include rw/_defs.h explicitly in case rw_driver.h does not. * tests/utilities/20.meta.rel.cpp: Ditto. * tests/utilities/20.meta.trans.arr.cpp: Ditto. * tests/utilities/20.meta.trans.cv.cpp: Ditto. * tests/utilities/20.meta.trans.ptr.cpp: Ditto. * tests/utilities/20.meta.trans.ref.cpp: Ditto. * tests/utilities/20.meta.unary.comp.cpp: Ditto. * tests/utilities/20.meta.trans.other.cpp: Ditto. Move includes inside _RWSTD_NO_EXT_CXX_0X block. * tests/utilities/20.meta.trans.sign.cpp: Ditto. * tests/utilities/20.meta.unary.cat.cpp: Ditto. * tests/utilities/20.meta.unary.prop.cpp: Ditto. Modified: stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.cv.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.other.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ptr.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ref.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.cat.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.comp.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp stdcxx/branches/4.3.x/tests/utilities/20.tuple.elem.cpp stdcxx/branches/4.3.x/tests/utilities/20.tuple.helpers.cpp Modified: stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp?rev=672048r1=672047r2=672048view=diff == --- stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp (original) +++ stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp Thu Jun 26 15:48:21 2008 @@ -26,11 +26,16 @@ * **/ +#include rw_driver.h +#include rw/_defs.h + +// compile out all test code if extensions disabled +#ifndef _RWSTD_NO_EXT_CXX_0X + #include rw/_forward.h #include rw/_meta_rel.h #include rw/_static_assert.h -#include rw_driver.h struct Foo @@ -116,6 +121,17 @@ return 0; } +#else // !_RWSTD_NO_EXT_CXX_0X + +static int run_test (int, char*[]) +{ +rw_warn (0, 0, __LINE__, + test disabled because _RWSTD_NO_EXT_CXX_0X is defined); +return 0; +} + +#endif // !_RWSTD_NO_EXT_CXX_0X + /*extern*/ int main (int argc, char* argv []) { Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp?rev=672048r1=672047r2=672048view=diff == --- stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp (original) +++ stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp Thu Jun 26 15:48:21 2008 @@ -28,6 +28,7 @@ **/ #include rw_driver.h +#include rw/_defs.h // compile out all test code if extensions disabled #ifndef _RWSTD_NO_EXT_CXX_0X Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp?rev=672048r1=672047r2=672048view=diff == --- stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp (original) +++ stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp Thu Jun 26 15:48:21 2008 @@ -28,6 +28,7 @@ **/ #include rw_driver.h +#include rw/_defs.h // compile out all test code if extensions disabled #ifndef _RWSTD_NO_EXT_CXX_0X Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp?rev=672048r1=672047r2=672048view=diff == --- stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp (original
svn commit: r671608 [4/4] - in /stdcxx/trunk: etc/config/ examples/include/ examples/manual/ examples/tutorial/ include/ src/ tests/algorithms/ tests/containers/ tests/diagnostics/ tests/include/ test
Modified: stdcxx/trunk/util/time.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/time.cpp?rev=671608r1=671607r2=671608view=diff == --- stdcxx/trunk/util/time.cpp (original) +++ stdcxx/trunk/util/time.cpp Wed Jun 25 10:24:43 2008 @@ -372,171 +372,173 @@ int i; -time_out_.num_alt_digits = alt_digits_.size(); +#define UINT(x) _RWSTD_STATIC_CAST(unsigned, x) + +time_out_.num_alt_digits = UINT (alt_digits_.size()); time_out_.era_off = 0; -time_out_.alt_digits_off = time_out_.era_off + -sizeof (_RW::__rw_time_t::era_t) * era_list_.size(); +time_out_.alt_digits_off = UINT (time_out_.era_off + +sizeof (_RW::__rw_time_t::era_t) * era_list_.size()); // now calculate all the offsets for the wide string representations -time_out_.abday_off[1][0] = time_out_.alt_digits_off + -2 * sizeof (unsigned int) * time_out_.num_alt_digits; +time_out_.abday_off[1][0] = UINT (time_out_.alt_digits_off + +2 * sizeof (unsigned int) * time_out_.num_alt_digits); for (i = 1; i 7; i++) { -time_out_.abday_off[1][i] = time_out_.abday_off[1][i-1] +time_out_.abday_off[1][i] = UINT (time_out_.abday_off[1][i-1] + (time_st_.wabday[i-1].size() * sizeof (wchar_t)) -+ sizeof(wchar_t); ++ sizeof(wchar_t)); } -time_out_.day_off[1][0] = time_out_.abday_off[1][6] +time_out_.day_off[1][0] = UINT (time_out_.abday_off[1][6] + time_st_.wabday[6].size() * sizeof (wchar_t) -+ sizeof (wchar_t); ++ sizeof (wchar_t)); for (i = 1; i 7; i++) { -time_out_.day_off[1][i] = time_out_.day_off[1][i-1] +time_out_.day_off[1][i] = UINT (time_out_.day_off[1][i-1] + time_st_.wday[i-1].size() * sizeof (wchar_t) -+ sizeof (wchar_t); ++ sizeof (wchar_t)); } -time_out_.abmon_off[1][0] = time_out_.day_off[1][6] -+ time_st_.wday[6].size() * sizeof (wchar_t) + sizeof (wchar_t); +time_out_.abmon_off[1][0] = UINT (time_out_.day_off[1][6] ++ time_st_.wday[6].size() * sizeof (wchar_t) + sizeof (wchar_t)); for (i = 1; i 12; i++) { -time_out_.abmon_off[1][i] = time_out_.abmon_off[1][i-1] +time_out_.abmon_off[1][i] = UINT (time_out_.abmon_off[1][i-1] + time_st_.wabmon[i-1].size() * sizeof (wchar_t) -+ sizeof (wchar_t); ++ sizeof (wchar_t)); } -time_out_.mon_off[1][0] = time_out_.abmon_off[1][11] +time_out_.mon_off[1][0] = UINT (time_out_.abmon_off[1][11] + time_st_.wabmon[11].size() * sizeof (wchar_t) -+ sizeof (wchar_t); ++ sizeof (wchar_t)); for (i = 1; i 12; i++) { -time_out_.mon_off[1][i] = time_out_.mon_off[1][i-1] +time_out_.mon_off[1][i] = UINT (time_out_.mon_off[1][i-1] + time_st_.wmon[i-1].size() * sizeof (wchar_t) -+ sizeof (wchar_t); ++ sizeof (wchar_t)); } -time_out_.am_pm_off[1][0] = time_out_.mon_off[1][11] -+ time_st_.wmon[11].size() * sizeof (wchar_t) + sizeof (wchar_t); -time_out_.am_pm_off[1][1] = time_out_.am_pm_off[1][0] -+ time_st_.wam_pm[0].size() * sizeof (wchar_t) + sizeof (wchar_t); +time_out_.am_pm_off[1][0] = UINT (time_out_.mon_off[1][11] ++ time_st_.wmon[11].size() * sizeof (wchar_t) + sizeof (wchar_t)); +time_out_.am_pm_off[1][1] = UINT (time_out_.am_pm_off[1][0] ++ time_st_.wam_pm[0].size() * sizeof (wchar_t) + sizeof (wchar_t)); -time_out_.d_t_fmt_off[1] = time_out_.am_pm_off[1][1] +time_out_.d_t_fmt_off[1] = UINT (time_out_.am_pm_off[1][1] + time_st_.wam_pm[1].size() * sizeof (wchar_t) -+ sizeof (wchar_t); -time_out_.d_fmt_off[1] = time_out_.d_t_fmt_off[1] -+ time_st_.wd_t_fmt.size() * sizeof (wchar_t) + sizeof (wchar_t); -time_out_.t_fmt_off[1] = time_out_.d_fmt_off[1] -+ time_st_.wd_fmt.size() * sizeof (wchar_t) + sizeof (wchar_t); -time_out_.t_fmt_ampm_off[1] = time_out_.t_fmt_off[1] -+ time_st_.wt_fmt.size() * sizeof (wchar_t) + sizeof (wchar_t); ++ sizeof (wchar_t)); +time_out_.d_fmt_off[1] = UINT (time_out_.d_t_fmt_off[1] ++ time_st_.wd_t_fmt.size() * sizeof (wchar_t) + sizeof (wchar_t)); +time_out_.t_fmt_off[1] = UINT (time_out_.d_fmt_off[1] ++ time_st_.wd_fmt.size() * sizeof (wchar_t) + sizeof (wchar_t)); +time_out_.t_fmt_ampm_off[1] = UINT (time_out_.t_fmt_off[1] ++ time_st_.wt_fmt.size() * sizeof (wchar_t) + sizeof (wchar_t)); -time_out_.era_d_t_fmt_off[1] = time_out_.t_fmt_ampm_off[1] +time_out_.era_d_t_fmt_off[1] = UINT (time_out_.t_fmt_ampm_off[1] + time_st_.wt_fmt_ampm.size() * sizeof (wchar_t) -+ sizeof (wchar_t); -time_out_.era_d_fmt_off[1] = time_out_.era_d_t_fmt_off[1] ++ sizeof
svn propchange: r664271 - svn:log
Author: vitek Revision: 664271 Modified property: svn:log Modified: svn:log at Wed Jun 25 11:05:38 2008 -- --- svn:log (original) +++ svn:log Wed Jun 25 11:05:38 2008 @@ -1,136 +1,5 @@ 2008-06-06 Travis Vitek [EMAIL PROTECTED] - Merge revision 659253 from 4.2.x + Merge part of r659253 from branches/4.3.x - 2008-05-22 Eric Lemings [EMAIL PROTECTED] - - STDCXX-550 - * src/num_put.cpp (__rw_itoa): Silence 64-bit conversion warning - with explicit cast to `unsigned' type. - - * tests/src/locale.cpp (rw_locales, _rw_all_locales), - util/runall.cpp (main), util/aliases.cpp (get_installed_locales): - Silence 64-bit conversion warnings by explicitly casting `size_t' - result from `sizeof' operator to `int' type expected by second - size parameter in fgets() function. - * tests/src/thread.cpp (rw_thread_pool): First parameter in - rw_alarm() is `unsigned'. Explicit cast `size_t' timeout value - to silence warning. - * tests/src/value.cpp (_rw_fmtxarrayv): Explicitly cast `long' - return value from strtol() function to `int' to silence warning. - * tests/src/char.cpp (_rw_fmtstringv): Likewise. - * tests/src/rand.cpp (rw_seed32): Explicitly cast `clock_t' - return value from clock() function to `unsigned' value. - * tests/src/cmdopt.cpp (_rw_getbounds, _rw_getarg): Explicitly - cast `long' value to `int' type of minval_, maxval_, and pcntr_ - members. - * tests/src/23.containers.cpp (_rw_sigcat, _rw_argno): Explicitly - cast `which' value from `size_t' type to `int' type used by - `argmap' variable. - * tests/src/opt_lines.cpp (_rw_enable_lines): Explicitly cast - `first' value from `long' type to `int' type used by first - parameter of _rw_enable_lines() function. - * tests/src/process.cpp (rw_waitpid): Explicitly cast PID from - `rw_pid_t' type to system `pid_t' type used by first parameter - of waitpid() function. Also cast `time_t' expression to `int' - type of local variable `delta'. - (rw_process_kill): Cast `size_t' expression to `unsigned' type - of `sigcount' variable. Cast `rw_pid_t' value to system's - `pid_t' type used by first parameter of kill() function. - * tests/src/opt_trace.cpp (_rw_setopt_trace_mask): Changed type - of loop index from `int' to `long'. - - * tests/algorithms/25.generate.cpp (test_generate_n): Explicitly - convert `size_t' value to `int' type to silence 64-bit conversion - warnings. - * tests/algorithms/25.fill.cpp (test_fill_n): First parameter in - `Size' constructor should be an `int'. - * tests/algorithms/25.random.shuffle.cpp (test_random_shuffle): - Change line parameter from `size_t' type to `int' type. - - * tests/containers/23.deque.modifiers.cpp: Explicitly cast - expressions involving `UserClass::n_total_copy_ctor_' and - `UserClass::n_total_op_assign_' members to `int' type of lhs of - assignment. - (test_erase): Cast `size_t' argument used as 7th parameter in - exception_loop() function to `int' type. - * tests/containers/23.bitset.cons.cpp (test_string_ctor): Cast - result of pointer arithmetic expression to `int' type of rhs of - assignment operator. - * tests/containers/23.vector.cons.cpp (test_ctors): Assign to - `val' using temporary `T' value constructed from `i' rather than - directly from `i'. - - * tests/localization/22.locale.synopsis.cpp (test_locale): Change - loop index type from `unsigned' to `size_t' resulting from - pointer arithmetic in initializer. - * tests/localization/22.locale.codecvt.length.cpp - (test_wcodecvt_byname_libc_based) [TEST]: Next to last parameter - type in test_length() function is an `int', not `size_t'. - * tests/localization/22.locale.num.get.cpp (test_errno) - [TEST_ERRNO]: Fourth from last parameter type in do_test() - function is an `int'. Cast `size_t' result of sizeof operator. - (test_long): Cast `size_t' result from sizeof operator to - `int' type of local `NC' variable. Define INTSIZE() macro to - cast `size_t' result from sizeof operator to `int' type in test - cases. (This parameter defaults to negative value or its type - would be changed to `size_t' type.) - (test_pvoid) [PVOIDSTR], (test_ldbl): Use INSTIZE() macro. - - * tests/numerics/26.c.math.cpp (check_bits): Changed `unsigned' - parameter type to `size_t' parameter type. - (test_behavior): Remove SIZE() macro and replaced with sizeof - operator. - - * tests/regress/24.operations.stdcxx-234.cpp (main): Cast - iterator `difference_type' to return type of main() function. - - * tests/strings/21.string.io.cpp
svn commit: r671285 - in /stdcxx/branches/4.3.x/include/rw: _meta_arr.h _meta_cat.h _meta_comp.h _meta_cv.h _meta_prop.h _meta_ptr.h _meta_ref.h _meta_rel.h _meta_sign.h
Author: vitek Date: Tue Jun 24 11:23:32 2008 New Revision: 671285 URL: http://svn.apache.org/viewvc?rev=671285view=rev Log: 2008-06-24 Travis Vitek [EMAIL PROTECTED] STDCXX-916 * include/rw/_meta_arr.h (_RWSTD_REMOVE_EXTENT) (_RWSTD_REMOVE_ALL_EXTENTS): Add macros for type traits. * include/rw/_meta_cat.h (_RWSTD_IS_VOID, _RWSTD_IS_INTEGRAL) (_RWSTD_IS_FLOATING_POINT, _RWSTD_IS_ARRAY, _RWSTD_IS_UNION) (_RWSTD_IS_LVALUE_REFERENCE, _RWSTD_IS_RVALUE_REFERENCE) (_RWSTD_IS_CLASS, _RWSTD_IS_FUNCTION, _RWSTD_IS_MEMBER_OBJECT_PTR) (_RWSTD_IS_MEMBER_OBJECT_PTR): Ditto. * include/rw/_meta_comp.h (_RWSTD_IS_REFERENCE, _RWSTD_IS_OBJECT) (_RWSTD_IS_ARITHMETIC, _RWSTD_IS_FUNDAMENTAL, _RWSTD_IS_SCALAR) (_RWSTD_IS_MEMBER_POINTER, _RWSTD_IS_COMPOUND): Ditto. * include/rw/_meta_cv.h (_RWSTD_REMOVE_CONST, _RWSTD_REMOVE_CV) (_RWSTD_REMOVE_VOLATILE, _RWSTD_ADD_CONST, _RWSTD_ADD_VOLATILE) (_RWSTD_ADD_CV): Ditto. * include/rw/_meta_prop.h (_RWSTD_IS_CONST, _RWSTD_IS_VOLATILE) (_RWSTD_IS_STANDARD_LAYOUT, _RWSTD_IS_POD, _RWSTD_IS_ABSTRACT) (_RWSTD_IS_POLYMORPHIC, _RWSTD_IS_EMPTY, _RWSTD_HAS_TRIVIAL_CTOR) (_RWSTD_HAS_TRIVIAL_COPY, _RWSTD_HAS_TRIVIAL_ASSIGN) (_RWSTD_HAS_TRIVIAL_DTOR, _RWSTD_IS_TRIVIAL, _RWSTD_RANK) (_RWSTD_HAS_NOTHROW_CTOR, _RWSTD_HAS_NOTHROW_COPY) (_RWSTD_HAS_NOTHROW_ASSIGN, _RWSTD_HAS_VIRTUAL_DTOR) (_RWSTD_IS_SIGNED, _RWSTD_IS_UNSIGNED, _RWSTD_EXTENT_1) (_RWSTD_EXTENT_2): Ditto. * include/rw/_meta_ptr.h (_RWSTD_REMOVE_POINTER) (_RWSTD_ADD_POINTER): Ditto. * include/rw/_meta_ref.h (_RWSTD_ADD_RVALUE_REFERENCE) (_RWSTD_ADD_LVALUE_REFERENCE, _RWSTD_REMOVE_REFERENCE): Ditto. * include/rw/_meta_rel.h (_RWSTD_IS_SAME, _RWSTD_IS_BASE_OF) (_RWSTD_IS_CONVERTIBLE): Ditto. * include/rw/_meta_sign.h (_RWSTD_MAKE_SIGNED) (_RWSTD_MAKE_UNSIGNED): Ditto. Modified: stdcxx/branches/4.3.x/include/rw/_meta_arr.h stdcxx/branches/4.3.x/include/rw/_meta_cat.h stdcxx/branches/4.3.x/include/rw/_meta_comp.h stdcxx/branches/4.3.x/include/rw/_meta_cv.h stdcxx/branches/4.3.x/include/rw/_meta_prop.h stdcxx/branches/4.3.x/include/rw/_meta_ptr.h stdcxx/branches/4.3.x/include/rw/_meta_ref.h stdcxx/branches/4.3.x/include/rw/_meta_rel.h stdcxx/branches/4.3.x/include/rw/_meta_sign.h Modified: stdcxx/branches/4.3.x/include/rw/_meta_arr.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_arr.h?rev=671285r1=671284r2=671285view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_arr.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_arr.h Tue Jun 24 11:23:32 2008 @@ -66,7 +66,7 @@ typedef _TypeT type; }; -//#define _RWSTD_REMOVE_EXTENT(T) _RW::__rw_remove_extentT::type +#define _RWSTD_REMOVE_EXTENT(T) _RW::__rw_remove_extentT::type /** * TransformationTrait strips one dimension from an array type, leaving @@ -101,7 +101,7 @@ typedef typename __rw_remove_all_extents_TypeT::type type; }; -//#define _RWSTD_REMOVE_ALL_EXTENTS(T) _RW::__rw_remove_all_extentsT::type +#define _RWSTD_REMOVE_ALL_EXTENTS(T) _RW::__rw_remove_all_extentsT::type } // namespace __rw Modified: stdcxx/branches/4.3.x/include/rw/_meta_cat.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_cat.h?rev=671285r1=671284r2=671285view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_cat.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_cat.h Tue Jun 24 11:23:32 2008 @@ -77,8 +77,7 @@ _RWSTD_TRAIT_SPEC_0_CV(__rw_is_void, void, true); -#define _RWSTD_IS_VOID(T) \ -_RW::__rw_is_voidT::value +#define _RWSTD_IS_VOID(T) _RW::__rw_is_voidT::value /** @@ -117,8 +116,7 @@ _RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral, unsigned long long, true); #endif // _RWSTD_NO_LONG_LONG -#define _RWSTD_IS_INTEGRAL(T) \ -_RW::__rw_is_integralT::value +#define _RWSTD_IS_INTEGRAL(T) _RW::__rw_is_integralT::value /** * UnaryTypeTrait to determine if _TypeT is a (potentially cv-qualified) @@ -137,8 +135,7 @@ _RWSTD_TRAIT_SPEC_0_CV(__rw_is_floating_point, long double, true); #endif// _RWSTD_NO_LONG_DOUBLE -#define _RWSTD_IS_FLOATING_POINT(T) \ -_RW::__rw_is_floating_pointT::value +#define _RWSTD_IS_FLOATING_POINT(T) _RW::__rw_is_floating_pointT::value /** @@ -159,8 +156,7 @@ { }; -#define _RWSTD_IS_ARRAY(T)\ -_RW::__rw_is_arrayT::value +#define _RWSTD_IS_ARRAY(T) _RW::__rw_is_arrayT::value /** * UnaryTypeTrait to determine if _TypeT is a (potentially cv-qualified) @@ -190,8 +186,9
svn commit: r671344 - in /stdcxx/trunk: bin/ etc/config/src/ include/ include/ansi/ src/ tests/utilities/ util/
Author: vitek Date: Tue Jun 24 14:08:08 2008 New Revision: 671344 URL: http://svn.apache.org/viewvc?rev=671344view=rev Log: 2008-06-24 Travis Vitek [EMAIL PROTECTED] Merge r662707, r662716, r663757, r664036, r664141, r664184 from branches/4.3.x: 2008-06-03 Farid Zaripov [EMAIL PROTECTED] Merged r662706 from 4.2.x branch. * tests/src/driver.cpp (_rw_invalid_parameter) [_MSC_VER = 1400]: New function - invalid parameter handler. (_rw_opt_no_popups) [_MSC_VER = 1400]: Set _rw_invalid_parameter() as invalid parameter handler to disable invalid parameter CRT popups. 2008-06-03 Farid Zaripov [EMAIL PROTECTED] Merged r662715 from 4.2.x branch. * tests/src/file.cpp (rw_nextfd) [_MSC_VER]: Disable expected Invalid file descriptor CRT assertions from _commit(). 2008-06-05 Travis Vitek [EMAIL PROTECTED] * etc/config/src/RVALUE_REFERENCES.cpp: Add new config test to check for rvalue-reference support. * etc/config/src/VARIADIC_TEMPLATES.cpp: Add new config test to check for variadic template support. 2008-06-06 Travis Vitek [EMAIL PROTECTED] * etc/config/RVALUE_REFERENCES.cpp: Fix copyright date. * etc/config/VARIADIC_TEMPLATES.cpp: Ditto. 2008-06-06 Travis Vitek [EMAIL PROTECTED] STDCXX-917 * include/type_traits: Add type_traits header that includes integral_contstant implementation. * tests/utilities/20.meta.help.cpp: Add new test. 2008-06-06 Travis Vitek [EMAIL PROTECTED] Merged revisions 660486, 660489, 660492, 661050, 661053, 661075, and 661152 from branches/4.2.x 2008-05-27 Farid Zaripov [EMAIL PROTECTED] * etc/config/src/INFINITY.cpp (flt_qnan): Clear sign bit to obtain value of positive qnan. (dbl_qnan): Ditto. (ldbl_qnan): Ditto. 2008-05-27 Farid Zaripov [EMAIL PROTECTED] * include/ansi/cwchar (wcsrchr): Removed const modifier since function returns non-const wchar_t*. 2008-05-27 Farid Zaripov [EMAIL PROTECTED] STDCXX-51 * src/num_put.cpp (__rw_fmat_infinite): Enabled processing the sign of the NaN's. Put 'q' or 's' prefix at the beginning of the {q|s}nan word. 2008-05-28 Martin Sebor [EMAIL PROTECTED] STDCXX-946 * util/exec.cpp (rw_charcasecmp): Folded into... (rw_strcasecmp): ...here. Rewrote a for loop as a do/while loop to silence HP aCC 6 remark #4315-D: for loop without body, did you insert an extra ';'? (get_signo): Corrected the interpretation of exit status of 126 and 127 used to indicate a cannot execute and executable does not exist errors, respectively. (exec_file): Exit with status of 126 on execv() failure. * util/exec.cpp (calculate_usage, exec_file): Cast literal to the correct type to silence HP aCC 6 warning #2068-D: integer conversion resulted in a change of sign. 2008-05-28 Martin Sebor [EMAIL PROTECTED] * util/exec.cpp (ENOENT): Defined macro if not defined in errno.h. (exec_file): Exited with status of 127 on ENOENT and 126 otherwise, as per POISIX. Removed unnecessary diagnostic output (handled by the parent instance of the same program). 2008-05-28 Martin Sebor [EMAIL PROTECTED] * bin/genxviews (tmpout): New name of a temporary file to replace the final output file with at the end of execution. (output): Used tmpout instead of outfile. Replaced the final output file only at the end of execution of the script. 2008-05-28 Martin Sebor [EMAIL PROTECTED] * bin/genxviews (date): Defined at the top of the script to make it accessible throughout. (process_results): Computed and formatted the age of each batch of log files in addition to the timestamp of the oldest one. * bin/xbuildgen (myrev, myurl, myname): Computed constants from the $HeadURL$ Subversion keyword same as in genxviews. (print_help): Added -V option. (resultstyle.css): Added EXEC entry. Passed the version argument to xcomp.awk. * bin/duration (convert_windows_date): New function to convert date in Windows Day MM/DD/ format to the POSIX %c format. (convert_ls_date): New function to convert ls-style timestamps to the POSIX %c format. (seconds_from_epoch): Called convert_windows_date or convert_ls_date to convert Windows or ls-style timestamps to the expected POSIX %c format. * bin/xcomp.awk (version): Added a new variable to make it possible to select branches in addition to trunk. Added: stdcxx/trunk/etc/config/src/RVALUE_REFERENCES.cpp - copied, changed from r663757, stdcxx/branches
svn commit: r671364 - in /stdcxx/trunk: tests/algorithms/ tests/containers/ tests/include/ tests/regress/ tests/self/ tests/src/ tests/support/ util/
Author: vitek Date: Tue Jun 24 15:09:44 2008 New Revision: 671364 URL: http://svn.apache.org/viewvc?rev=671364view=rev Log: 2008-06-24 Travis Vitek [EMAIL PROTECTED] Merged revisions 661873, 661898, 661910, 662096, 662468, 662491, 662493, 662518, 662525, 662596 and 662614 from branches/4.2.x. 2008-05-30 Travis Vitek [EMAIL PROTECTED] STDCXX-833 * tests/regress/18.limits.traps.stdcxx-624.cpp: Add special handling for divide by zero on windows. 2008-05-30 Eric Lemings [EMAIL PROTECTED] STDCXX-550 * tests/containers/23.deque.modifiers.cpp: Use same `size_t' type of data sources rather than `int' type and resulting type casts for `n_copy' and `n_asgn' parameters and variables. 2008-05-30 Travis Vitek [EMAIL PROTECTED] STDCXX-898 * tests/support/18.numeric.special.int.cpp: Remove failing trap assertions as they are throughly and correctly tested in 18.limits.traps.cpp. 2008-05-31 Martin Sebor [EMAIL PROTECTED] * tests/support/18.numeric.special.int.cpp (run_test): Removed informational output (the same detail can be obtained by running the test with the --trace option). Replaced numeric references to clauses in the standard with their names that don't change from one version of the spec to the next. Documented why numeric_limits::traps is being exercised elsewhere (see rev 661910). (run_test): Replaced the use of _RWSTD_LONG_LONG with long long in diagnostic messages. 2008-06-02 Travis Vitek [EMAIL PROTECTED] * tests/regress/18.limits.traps.stdcxx-624.cpp: Update comments to reflect expected test behavior. 2008-06-02 Eric Lemings [EMAIL PROTECTED] STDCXX-550 * tests/include/alg_test.h (Size): Add `IntegralType' typedef for casting values to same type used by template parameter. * tests/algorithms/25.fill.cpp (test_fill_n): Use `IntegralType' to cast integer value to exact integer type of Size constructor. * tests/algorithms/25.generate.cpp (test_generate_n): Likewise. * tests/src/23.containers.cpp (_rw_sigcat, _rw_argno): Cast entire expression to `int' type rather than just `which' enum. 2008-06-02 Eric Lemings [EMAIL PROTECTED] STDCXX-550 * util/cmdopt.cpp (get_long_val, eval_options): Change `offset' parameter type from `unsigned' to `size_t' type. (Better fix for conversion warning than casting.) 2008-06-02 Eric Lemings [EMAIL PROTECTED] STDCXX-550 * tests/self/0.printf.cpp (user_fun_va): Cast `long' return type from `strtol' function to `int' return type. * tests/containers/23.bitset.cpp (compare): Cast result of pointer arithmetic to `int' return type. * tests/containers/23.vector.cons.cpp (test_ctors): Construct temporary reference variable with correct integer type from `size_type' of loop index. * tests/support/18.exception.cpp (test_rw_throw): Use `size_t' rather than `unsigned' type to store result of `sizeof' expression. * util/scanner.cpp (Scanner::next_token): Cast result of pointer arithmetic to `int' type of `column' member. * util/collate.cpp (Def::process_order_stmt): Cast return value of `std::listT::size()' function to `unsigned' type used by `num_weights' in LHS of assignment. (Def::preprocess_collation_definitions): Change `max_orders' type from `unsigned' to `std::listT::size_type' returned by `size()' function. 2008-06-02 Eric Lemings [EMAIL PROTECTED] STDCXX-550 * util/collate.cpp (Def::preprocess_collation_definitions): Remove `typename' keyword. Some compilers don't like it outside of templates. 2008-06-02 Martin Sebor [EMAIL PROTECTED] * tests/support/18.exception.cpp [!_RWSTD_NO_PURE_C_HEADERS _RWSTD_OS_LINUX](siglongjmp, sigsetjmp): Declared POSIX functions that aren't otherwise required or expected to be declared by strictly conforming standard C/C++ headers (such as those used when compiling with EDG eccp). (test_uncaught_exception): Silenced (bogus) EDG eccp remark 550 about unused variable. 2008-06-02 Martin Sebor [EMAIL PROTECTED] * tests/regress/21.c.strings.stdcxx-843.cpp: Added a regression test for STDCXX-843. Added: stdcxx/trunk/tests/regress/21.c.strings.stdcxx-843.cpp - copied unchanged from r664229, stdcxx/branches/4.3.x/tests/regress/21.c.strings.stdcxx-843.cpp Modified: stdcxx/trunk/tests/algorithms/25.fill.cpp stdcxx/trunk/tests/algorithms/25.generate.cpp stdcxx/trunk/tests/containers/23.bitset.cpp stdcxx/trunk/tests/containers/23.deque.modifiers.cpp stdcxx/trunk/tests
svn propchange: r667365 - svn:log
Author: vitek Revision: 667365 Modified property: svn:log Modified: svn:log at Mon Jun 23 10:40:07 2008 -- --- svn:log (original) +++ svn:log Mon Jun 23 10:40:07 2008 @@ -2,35 +2,35 @@ STDCXX-916 * include/type_traits: New file defines C++0x type traits. - * include/rw/_config-gcc.h [_RWSTD_TT_IS_ENUM, _RWSTD_TT_IS_UNION, - _RWSTD_TT_IS_CLASS, _RWSTD_TT_IS_POD, _RWSTD_TT_IS_EMPTY, - _RWSTD_TT_IS_POLYMORPHIC, _RWSTD_TT_IS_ABSTRACT, _RWSTD_TT_IS_BASE_OF, - _RWSTD_TT_HAS_TRIVIAL_CTOR, _RWSTD_TT_HAS_TRIVIAL_COPY, - _RWSTD_TT_HAS_TRIVIAL_ASSIGN, _RWSTD_TT_HAS_TRIVIAL_DTOR, - _RWSTD_TT_HAS_NOTHROW_CTOR, _RWSTD_TT_HAS_NOTHROW_COPY, - _RWSTD_TT_HAS_TRIVIAL_ASSIGN, _RWSTD_TT_HAS_VIRTUAL_DTOR, - _RWSTD_TT_ALIGN_OF, _RWSTD_ALIGNED_POD, _RWSTD_MAX_ALIGNMENT]: Add + * include/rw/_config-gcc.h (_RWSTD_TT_IS_ENUM, _RWSTD_TT_IS_UNION) + (_RWSTD_TT_IS_CLASS, _RWSTD_TT_IS_POD, _RWSTD_TT_IS_EMPTY) + (_RWSTD_TT_IS_POLYMORPHIC, _RWSTD_TT_IS_ABSTRACT, _RWSTD_TT_IS_BASE_OF) + (_RWSTD_TT_HAS_TRIVIAL_CTOR, _RWSTD_TT_HAS_TRIVIAL_COPY) + (_RWSTD_TT_HAS_TRIVIAL_ASSIGN, _RWSTD_TT_HAS_TRIVIAL_DTOR) + (_RWSTD_TT_HAS_NOTHROW_CTOR, _RWSTD_TT_HAS_NOTHROW_COPY) + (_RWSTD_TT_HAS_TRIVIAL_ASSIGN, _RWSTD_TT_HAS_VIRTUAL_DTOR) + (_RWSTD_TT_ALIGN_OF, _RWSTD_ALIGNED_POD, _RWSTD_MAX_ALIGNMENT): Add macros for compiler support. - * include/rw/_config-msvc.h [_RWSTD_TT_IS_ENUM, _RWSTD_TT_IS_UNION, - _RWSTD_TT_IS_CLASS, _RWSTD_TT_IS_POD, _RWSTD_TT_IS_EMPTY, - _RWSTD_TT_IS_POLYMORPHIC, _RWSTD_TT_IS_ABSTRACT, _RWSTD_TT_IS_BASE_OF, - _RWSTD_TT_IS_CONVERTIBLE, _RWSTD_TT_HAS_VIRTUAL_DTOR, - _RWSTD_TT_HAS_TRIVIAL_CTOR, _RWSTD_TT_HAS_TRIVIAL_ASSIGN, - _RWSTD_TT_HAS_TRIVIAL_COPY, _RWSTD_TT_HAS_TRIVIAL_DTOR, - _RWSTD_TT_HAS_NOTHROW_CTOR, _RWSTD_TT_HAS_NOTHROW_ASSIGN, - _RWSTD_TT_HAS_NOTHROW_COPY, _RWSTD_TT_ALIGN_OF, _RWSTD_TT_ALIGNED_POD, - _RWSTD_TT_MAX_ALIGNMENT]: Ditto. + * include/rw/_config-msvc.h [_RWSTD_TT_IS_ENUM, _RWSTD_TT_IS_UNION) + (_RWSTD_TT_IS_CLASS, _RWSTD_TT_IS_POD, _RWSTD_TT_IS_EMPTY) + (_RWSTD_TT_IS_POLYMORPHIC, _RWSTD_TT_IS_ABSTRACT, _RWSTD_TT_IS_BASE_OF) + (_RWSTD_TT_IS_CONVERTIBLE, _RWSTD_TT_HAS_VIRTUAL_DTOR) + (_RWSTD_TT_HAS_TRIVIAL_CTOR, _RWSTD_TT_HAS_TRIVIAL_ASSIGN) + (_RWSTD_TT_HAS_TRIVIAL_COPY, _RWSTD_TT_HAS_TRIVIAL_DTOR) + (_RWSTD_TT_HAS_NOTHROW_CTOR, _RWSTD_TT_HAS_NOTHROW_ASSIGN) + (_RWSTD_TT_HAS_NOTHROW_COPY, _RWSTD_TT_ALIGN_OF, _RWSTD_TT_ALIGNED_POD) + (_RWSTD_TT_MAX_ALIGNMENT): Ditto. * include/rw/_config.h [_RWSTD_EXT_CXX_OX]: Disable C++0x extensions unless defined. - * include/rw/_defs.h [_RWSTD_SWCHAR_INT_T]: Add new macro that + * include/rw/_defs.h (_RWSTD_SWCHAR_INT_T): Add new macro that defines a type that has same size and layout a the fictional signed wchar_t. - [_RWSTD_UWCHAR_INT_T]: Modify definition to handle case where + (_RWSTD_UWCHAR_INT_T): Modify definition to handle case where unsigned long is not the same size as unsigned int. Add case for unsigned long long. * etc/config/src/STATIC_ASSERT.cpp: Add configuration test to check for C++0x static_assert. - * include/rw/_static_assert.h [_RWSTD_STATIC_ASSERT]: Add a + * include/rw/_static_assert.h (_RWSTD_STATIC_ASSERT): Add a helper macro and fallback implementation for static_assert. STDCXX-917
svn commit: r670084 - in /stdcxx/branches/4.2.x/include: deque deque_spec.h list list_spec.h vector vector_spec.h
Author: vitek Date: Fri Jun 20 15:23:32 2008 New Revision: 670084 URL: http://svn.apache.org/viewvc?rev=670084view=rev Log: 2008-06-20 Travis Vitek [EMAIL PROTECTED] STDCXX-688 * include/deque_spec.h: Remove unused header. * include/list_spec.h: Ditto. * include/vector_spec.h: Ditto. * include/deque: Remove reference to removed header. * include/list: Ditto. * include/vector: Ditto. Removed: stdcxx/branches/4.2.x/include/deque_spec.h stdcxx/branches/4.2.x/include/list_spec.h stdcxx/branches/4.2.x/include/vector_spec.h Modified: stdcxx/branches/4.2.x/include/deque stdcxx/branches/4.2.x/include/list stdcxx/branches/4.2.x/include/vector Modified: stdcxx/branches/4.2.x/include/deque URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/deque?rev=670084r1=670083r2=670084view=diff == --- stdcxx/branches/4.2.x/include/deque (original) +++ stdcxx/branches/4.2.x/include/deque Fri Jun 20 15:23:32 2008 @@ -941,9 +941,4 @@ #endif -#ifndef _RWSTD_NO_STL_SPECIALIZATION -# include deque_spec.h -#endif // _RWSTD_NO_STL_SPECIALIZATION - - #endif // _RWSTD_DEQUE_INCLUDED Modified: stdcxx/branches/4.2.x/include/list URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/list?rev=670084r1=670083r2=670084view=diff == --- stdcxx/branches/4.2.x/include/list (original) +++ stdcxx/branches/4.2.x/include/list Fri Jun 20 15:23:32 2008 @@ -842,9 +842,4 @@ #endif -#ifndef _RWSTD_NO_STL_SPECIALIZATION -# include list_spec.h -#endif // _RWSTD_NO_STL_SPECIALIZATION - - #endif //_RWSTD_LIST_INCLUDED Modified: stdcxx/branches/4.2.x/include/vector URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/vector?rev=670084r1=670083r2=670084view=diff == --- stdcxx/branches/4.2.x/include/vector (original) +++ stdcxx/branches/4.2.x/include/vector Fri Jun 20 15:23:32 2008 @@ -1361,9 +1361,4 @@ #endif -#ifndef _RWSTD_NO_STL_SPECIALIZATION -#include vector_spec.h -#endif // _RWSTD_NO_STL_SPECIALIZATION - - #endif // _RWSTD_VECTOR_INCLUDED
svn commit: r669664 - /stdcxx/branches/4.3.x/include/rw/_meta_other.h
Author: vitek Date: Thu Jun 19 12:52:54 2008 New Revision: 669664 URL: http://svn.apache.org/viewvc?rev=669664view=rev Log: 2008-06-19 Travis Vitek [EMAIL PROTECTED] STDCXX-926 * include/rw/_meta_other.h: Make __rw_aligned_union compile on gcc-4.3 again by forward declaring template and using using correct template parameter name. Modified: stdcxx/branches/4.3.x/include/rw/_meta_other.h Modified: stdcxx/branches/4.3.x/include/rw/_meta_other.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_other.h?rev=669664r1=669663r2=669664view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_other.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_other.h Thu Jun 19 12:52:54 2008 @@ -49,13 +49,16 @@ #ifndef _RWSTD_NO_VARIADIC_TEMPLATES +template _RWSTD_SIZE_T _Len, class... _Types +struct __rw_aligned_union_impl; + template _RWSTD_SIZE_T _Len, class _TypeT, class... _Types struct __rw_aligned_union_impl_Len, _TypeT, _Types... { typedef union { unsigned char __pad [_Len ? _Len : 1]; _TypeT __type1; -typename __rw_aligned_union_impl_Len, Types...::_C_type __align; +typename __rw_aligned_union_impl_Len, _Types...::_C_type __align; } _C_type; };
svn commit: r669735 - in /stdcxx/branches/4.3.x: include/rw/_meta_other.h include/type_traits tests/utilities/20.meta.trans.other.cpp
Author: vitek Date: Thu Jun 19 15:52:34 2008 New Revision: 669735 URL: http://svn.apache.org/viewvc?rev=669735view=rev Log: 2008-06-19 Travis Vitek [EMAIL PROTECTED] STDCXX-926 * include/type_traits: Update comments describing each trait. Use correct type for the underlying integral_constant used by traits alignment_of, rank, extent, is_base_of and is_convertible. Enable aligned_union. Add defaulted alignment for aligned_storage. * include/rw/_meta_other.h: Implement __rw_aligned_storage. Add support for defaulted alignment. Update __rw_aligned_union to use __rw_aligned_storage to get an aligned block. * tests/utilities/20.meta.trans.other.cpp (test_trait): Correct assertion message to display correct string. (test_aligned_storage): Add testing for aligned_storage. (test_aligned_union): Add testing for aligned_union. Modified: stdcxx/branches/4.3.x/include/rw/_meta_other.h stdcxx/branches/4.3.x/include/type_traits stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.other.cpp Modified: stdcxx/branches/4.3.x/include/rw/_meta_other.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_other.h?rev=669735r1=669734r2=669735view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_other.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_other.h Thu Jun 19 15:52:34 2008 @@ -37,50 +37,318 @@ _RWSTD_NAMESPACE (__rw) { -template _RWSTD_SIZE_T _Len, _RWSTD_SIZE_T _Align = 4 +/** + * Metaprogramming conditional primitive that provides a member typedef + * _C_type that is _TypeT if _Select is true, otherwise is _TypeU. + * + * The primary template is used when _Select is true. + */ +template bool _Select, class _TypeT, class _TypeU +struct __rw_conditional +{ +typedef _TypeT type; +}; + +/** + * Metaprogramming conditional primitive that provides a member typedef + * type is _TypeT if _Select is true, otherwise is _TypeU. + * + * This specialization if used when _Select is false. + */ +template class _TypeT, class _TypeU +struct __rw_conditionalfalse, _TypeT, _TypeU +{ +typedef _TypeU type; +}; + +#define _RWSTD_CONDITIONAL(C,T,U) _RW::__rw_conditionalC,T,U::type + + +/** + * Helper for __rw_aligned_storage. Specializations define a member type + * that is aligned on power of two boundaries. + */ +template size_t _Align +struct __rw_aligned_storage_impl; + +#define _RWSTD_ALIGNED_STORAGE_SPEC(N) \ + template struct __rw_aligned_storage_implN { \ + typedef _RWSTD_TT_ALIGNED_POD(N) _C_type; \ +} + +_RWSTD_ALIGNED_STORAGE_SPEC(1); +_RWSTD_ALIGNED_STORAGE_SPEC(2); +_RWSTD_ALIGNED_STORAGE_SPEC(4); +_RWSTD_ALIGNED_STORAGE_SPEC(8); +_RWSTD_ALIGNED_STORAGE_SPEC(16); +_RWSTD_ALIGNED_STORAGE_SPEC(32); +_RWSTD_ALIGNED_STORAGE_SPEC(64); +_RWSTD_ALIGNED_STORAGE_SPEC(128); +_RWSTD_ALIGNED_STORAGE_SPEC(256); +_RWSTD_ALIGNED_STORAGE_SPEC(512); +_RWSTD_ALIGNED_STORAGE_SPEC(1024); +_RWSTD_ALIGNED_STORAGE_SPEC(2048); +_RWSTD_ALIGNED_STORAGE_SPEC(4096); +_RWSTD_ALIGNED_STORAGE_SPEC(8192); + +/** + * Helper for __rw_default_alignment. The member value will evaluate + * to the nearest power of two that is a valid alignment value that + * is less than or equal to _Size. + * + * @tparam _Size The size of the object to align. + * @tparam _NThe power of two value being tested. + * @tparam _Done Termination condition for recursion. Do not use. + */ +template size_t _Size, size_t _N, + bool _Done =(_RWSTD_TT_MAX_ALIGNMENT = _N * 2) + || (_Size _N * 2) +struct __rw_default_alignment_impl +{ +enum { value = __rw_default_alignment_impl_Size, _N * 2::value }; +}; + +/** + * Helper for __rw_default_alignment. The member value will evaluate + * to the nearest power of two that is less than or equal to _Size. + * This specialization is used to terminate recursion. It is only used + * when when _Done in the primary template evaluates is true. + * + * @tparam _Size The size of the object to align. + * @tparam _NThe power of two value being tested. + */ +template size_t _Size, size_t _N +struct __rw_default_alignment_impl_Size, _N, true +{ +enum { value = _N }; +}; + +/** + * Helper for __rw_aligned_storage. The value member shall be the most + * most stringent alignment requirement for any C++ object whose size + * is no greater than _Size. This implementation will set value to be + * the nearest power of two value that is less than or equal to _Size. + * + * @tparam _Size Size of the object to calculate the alignment for. + */ +template size_t _Size +struct __rw_default_alignment +{ +enum { value = __rw_default_alignment_impl_Size, 1::value }; +}; + + +/** + * + */ +template size_t _Size, size_t _Align = __rw_default_alignment_Size::value struct __rw_aligned_storage { +_RWSTD_STATIC_ASSERT (_Size != 0, + Unsupported size
svn commit: r668727 - /stdcxx/branches/4.3.x/include/rw/_static_assert.h
Author: vitek Date: Tue Jun 17 09:12:54 2008 New Revision: 668727 URL: http://svn.apache.org/viewvc?rev=668727view=rev Log: 2008-06-17 Travis Vitek [EMAIL PROTECTED] STDCXX-916 * include/rw/_static_assert.h: Qualify __rw_assert_failed with _RW to avoid compile errors when using _RWSTD_STATIC_ASSERT(). Modified: stdcxx/branches/4.3.x/include/rw/_static_assert.h Modified: stdcxx/branches/4.3.x/include/rw/_static_assert.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_static_assert.h?rev=668727r1=668726r2=668727view=diff == --- stdcxx/branches/4.3.x/include/rw/_static_assert.h (original) +++ stdcxx/branches/4.3.x/include/rw/_static_assert.h Tue Jun 17 09:12:54 2008 @@ -56,9 +56,9 @@ # define _RWSTD_STATIC_ASSERT(Cond,Mesg) static_assert(Cond, Mesg) #else # define _RWSTD_STATIC_ASSERT(Cond,Mesg) \ - typedef \ - _RW::__rw_static_assertsizeof (__rw_assert_failed(Cond)) != 0 \ - _RWSTD_PASTE(__static_assert,__LINE__) + typedef \ + _RW::__rw_static_assertsizeof (_RW::__rw_assert_failed(Cond)) != 0 \ + _RWSTD_PASTE(__static_assert,__LINE__) #endif // _RWSTD_NO_STATIC_ASSERT #endif // _RWSTD_RW_STATIC_ASSERT_H_INCLUDED
svn commit: r668819 - in /stdcxx/branches/4.2.x/doc: stdlibref/frames-banner.html stdlibref/index.html stdlibug/frames-banner.html stdlibug/index.html
Author: vitek Date: Tue Jun 17 13:31:41 2008 New Revision: 668819 URL: http://svn.apache.org/viewvc?rev=668819view=rev Log: 2008-06-17 Travis Vitek [EMAIL PROTECTED] Merge rev 668772 from trunk 2008-06-17 Travis Vitek [EMAIL PROTECTED] * docs/stdlibref/frames-banner.html: Replace background image with a regular image in a table cell to avoid ugliness when scaling page. * docs/stdlibug/frames-banner.html: Ditto. * docs/stdlibref/index.html: Increase height of top frame to accomodate moving image into table. * docs/stdlibug/index.html: Ditto. Modified: stdcxx/branches/4.2.x/doc/stdlibref/frames-banner.html stdcxx/branches/4.2.x/doc/stdlibref/index.html stdcxx/branches/4.2.x/doc/stdlibug/frames-banner.html stdcxx/branches/4.2.x/doc/stdlibug/index.html Modified: stdcxx/branches/4.2.x/doc/stdlibref/frames-banner.html URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/doc/stdlibref/frames-banner.html?rev=668819r1=668818r2=668819view=diff == --- stdcxx/branches/4.2.x/doc/stdlibref/frames-banner.html (original) +++ stdcxx/branches/4.2.x/doc/stdlibref/frames-banner.html Tue Jun 17 13:31:41 2008 @@ -27,19 +27,16 @@ title=Apache stdcxx Stylesheet/ base target=toc/ -style type=text/css -body { -background: url(http://apache.org/images/asf_logo.gif;); -background-repeat: no-repeat -} -/style /head body table border=0 cellpadding=4 cellspacing=0 width=100% tr -td align=center +td +img src=http://apache.org/images/asf_logo.gif; +/td +td align=center valign=center h2 -a href=http://incubator.apache.org/stdcxx; +a href=http://stdcxx.apache.org; target=_top Apache C++ Standard Library/a Reference Guide /h2 @@ -61,6 +58,7 @@ a href=frames-classes-func.htmlFunctional Groups/a /h5 /td +td width=30%nbsp;/td /tr /table Modified: stdcxx/branches/4.2.x/doc/stdlibref/index.html URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/doc/stdlibref/index.html?rev=668819r1=668818r2=668819view=diff == --- stdcxx/branches/4.2.x/doc/stdlibref/index.html (original) +++ stdcxx/branches/4.2.x/doc/stdlibref/index.html Tue Jun 17 13:31:41 2008 @@ -27,7 +27,7 @@ title=Apache stdcxx Stylesheet /head -frameset rows=110,* +frameset rows=140,* frame border=1 name=top src=frames-banner.html frame border=1 name=display src=frames-displayarea.html /frameset Modified: stdcxx/branches/4.2.x/doc/stdlibug/frames-banner.html URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/doc/stdlibug/frames-banner.html?rev=668819r1=668818r2=668819view=diff == --- stdcxx/branches/4.2.x/doc/stdlibug/frames-banner.html (original) +++ stdcxx/branches/4.2.x/doc/stdlibug/frames-banner.html Tue Jun 17 13:31:41 2008 @@ -27,19 +27,17 @@ title=Apache stdcxx Stylesheet/ base target=toc/ -style type=text/css -body { -background: url(http://apache.org/images/asf_logo.gif;); -background-repeat: no-repeat -} -/style /head body table border=0 cellpadding=4 cellspacing=0 width=100% tr +td +img src=http://apache.org/images/asf_logo.gif; +/td td align=center +td align=center valign=center h2 -a href=http://incubator.apache.org/stdcxx; +a href=http://stdcxx.apache.org; target=_top Apache C++ Standard Library/a User's Guide /h2 @@ -64,6 +62,7 @@ /a /h5 /td +td width=30%nbsp;/td /tr /table Modified: stdcxx/branches/4.2.x/doc/stdlibug/index.html URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/doc/stdlibug/index.html?rev=668819r1=668818r2=668819view=diff == --- stdcxx/branches/4.2.x/doc/stdlibug/index.html (original) +++ stdcxx/branches/4.2.x/doc/stdlibug/index.html Tue Jun 17 13:31:41 2008 @@ -27,7 +27,7 @@ title=Apache stdcxx Stylesheet /head -frameset rows=110,* +frameset rows
svn commit: r668208 - in /stdcxx/branches/4.3.x/include/rw: _config-gcc.h _config-msvc.h _defs.h
Author: vitek Date: Mon Jun 16 08:52:54 2008 New Revision: 668208 URL: http://svn.apache.org/viewvc?rev=668208view=rev Log: 2008-06-16 Travis Vitek [EMAIL PROTECTED] * include/rw/_defs.h: Remove block defining macros for trait compiler support. * include/rw/_config-gcc.h: Add newline to end of file. * include/rw/_config.msvc.h: Ditto. Modified: stdcxx/branches/4.3.x/include/rw/_config-gcc.h stdcxx/branches/4.3.x/include/rw/_config-msvc.h stdcxx/branches/4.3.x/include/rw/_defs.h Modified: stdcxx/branches/4.3.x/include/rw/_config-gcc.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config-gcc.h?rev=668208r1=668207r2=668208view=diff == --- stdcxx/branches/4.3.x/include/rw/_config-gcc.h (original) +++ stdcxx/branches/4.3.x/include/rw/_config-gcc.h Mon Jun 16 08:52:54 2008 @@ -202,3 +202,4 @@ # define _RWSTD_TT_ALIGNED_POD(N)struct { char __fill __attribute__ ((aligned (N))); } # define _RWSTD_TT_MAX_ALIGNMENT 16 #endif // __GNUC__ = 4.3 + Modified: stdcxx/branches/4.3.x/include/rw/_config-msvc.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config-msvc.h?rev=668208r1=668207r2=668208view=diff == --- stdcxx/branches/4.3.x/include/rw/_config-msvc.h (original) +++ stdcxx/branches/4.3.x/include/rw/_config-msvc.h Mon Jun 16 08:52:54 2008 @@ -116,4 +116,5 @@ // that by using our fallback. # define _RWSTD_TT_IS_POD(T) __is_pod(T) -#endif // _MSC_VER \ No newline at end of file +#endif // _MSC_FULL_VER = 140050215 + Modified: stdcxx/branches/4.3.x/include/rw/_defs.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_defs.h?rev=668208r1=668207r2=668208view=diff == --- stdcxx/branches/4.3.x/include/rw/_defs.h (original) +++ stdcxx/branches/4.3.x/include/rw/_defs.h Mon Jun 16 08:52:54 2008 @@ -1631,39 +1631,4 @@ memcpy (va_dst, va_src, sizeof (va_list)) #endif // _RWSTD_NO_VA_LIST_ARRAY -#if 0 -// -// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2518.html -// -# define _RWSTD_TT_IS_MEMBER_OBJECT_POINTER(T) __is_member_object_pointer(T) -# define _RWSTD_TT_IS_MEMBER_FUNCTION_POINTER(T) __is_member_function_pointer(T) -# define _RWSTD_TT_IS_ENUM(T)__is_enum(T) -# define _RWSTD_TT_IS_UNION(T) __is_union(T) -# define _RWSTD_TT_IS_CLASS(T) __is_class(T) -# define _RWSTD_TT_IS_FUNCTION(T)__is_function(T) -# define _RWSTD_TT_IS_STANDARD_LAYOUT(T) __is_standard_layout(T) -# define _RWSTD_TT_IS_POD(T) __is_pod(T) -# define _RWSTD_TT_IS_EMPTY(T) __is_empty(T) -# define _RWSTD_TT_IS_POLYMORPHIC(T) __is_polymorphic(T) -# define _RWSTD_TT_IS_ABSTRACT(T)__is_abstract(T) - -# define _RWSTD_TT_HAS_TRIVIAL_CTOR(T) __has_trivial_default_ctor(T) -# define _RWSTD_TT_HAS_TRIVIAL_COPY(T) __has_trivial_copy_ctor(T) -# define _RWSTD_TT_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T) -# define _RWSTD_TT_HAS_TRIVIAL_DTOR(T) __has_trivial_dtor(T) - -# define _RWSTD_TT_HAS_NOTHROW_CTOR(T) __has_nothrow_default_ctor(T) -# define _RWSTD_TT_HAS_NOTHROW_COPY(T) __has_nothrow_copy_ctor(T) -# define _RWSTD_TT_HAS_NOTHROW_ASSIGN(T) __has_nothrow_assign(T) - -# define _RWSTD_TT_HAS_VIRTUAL_DTOR(T) __has_virtual_destructor(T) - -# define _RWSTD_TT_IS_BASE_OF(T) __is_base_of(T,U) -# define _RWSTD_TT_IS_CONVERTIBLE(T) __is_convertible(T,U) - -# define _RWSTD_TT_ALIGN_OF(T) __alignof(T) -# define _RWSTD_TT_ALIGNED_POD(N)__aligned_pod(N) -# define _RWSTD_TT_MAX_ALIGNMENT __max_alignment() -#endif // 0 - #endif // _RWSTD_RW_DEFS_H_INCLUDED
svn commit: r668223 - in /stdcxx/branches/4.3.x/include/rw: _meta_arr.h _meta_cat.h _meta_comp.h _meta_cv.h _meta_help.h _meta_other.h _meta_prop.h _meta_ptr.h _meta_ref.h _meta_rel.h _meta_sign.h
Author: vitek Date: Mon Jun 16 09:25:35 2008 New Revision: 668223 URL: http://svn.apache.org/viewvc?rev=668223view=rev Log: 2008-06-16 Travis Vitek [EMAIL PROTECTED] STDCXX-916 * rw/_meta_help.h: Update header guard to reflect the name of the header it is used in. * rw/_meta_sign.h: Ditto. * rw/_meta_ptr.h: Ditto. * rw/_meta_cv.h: Ditto. * rw/_meta_prop.h: Ditto. * rw/_meta_other.h: Ditto. * rw/_meta_arr.h: Ditto. * rw/_meta_comp.h: Ditto. * rw/_meta_cat.h: Ditto. * rw/_meta_ref.h: Ditto. * rw/_meta_rel.h: Ditto. Modified: stdcxx/branches/4.3.x/include/rw/_meta_arr.h stdcxx/branches/4.3.x/include/rw/_meta_cat.h stdcxx/branches/4.3.x/include/rw/_meta_comp.h stdcxx/branches/4.3.x/include/rw/_meta_cv.h stdcxx/branches/4.3.x/include/rw/_meta_help.h stdcxx/branches/4.3.x/include/rw/_meta_other.h stdcxx/branches/4.3.x/include/rw/_meta_prop.h stdcxx/branches/4.3.x/include/rw/_meta_ptr.h stdcxx/branches/4.3.x/include/rw/_meta_ref.h stdcxx/branches/4.3.x/include/rw/_meta_rel.h stdcxx/branches/4.3.x/include/rw/_meta_sign.h Modified: stdcxx/branches/4.3.x/include/rw/_meta_arr.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_arr.h?rev=668223r1=668222r2=668223view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_arr.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_arr.h Mon Jun 16 09:25:35 2008 @@ -27,8 +27,8 @@ * **/ -#ifndef _RWSTD_META_TRANS_ARR_H_INCLUDED -#define _RWSTD_META_TRANS_ARR_H_INCLUDED +#ifndef _RWSTD_RW_META_ARR_H_INCLUDED +#define _RWSTD_RW_META_ARR_H_INCLUDED #include rw/_defs.h @@ -106,4 +106,5 @@ } // namespace __rw -#endif // _RWSTD_META_TRANS_ARR_H_INCLUDED +#endif // _RWSTD_RW_META_ARR_H_INCLUDED + Modified: stdcxx/branches/4.3.x/include/rw/_meta_cat.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_cat.h?rev=668223r1=668222r2=668223view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_cat.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_cat.h Mon Jun 16 09:25:35 2008 @@ -27,8 +27,8 @@ * **/ -#ifndef _RWSTD_META_UNARY_CAT_H_INCLUDED -#define _RWSTD_META_UNARY_CAT_H_INCLUDED +#ifndef _RWSTD_RW_META_CAT_H_INCLUDED +#define _RWSTD_RW_META_CAT_H_INCLUDED #include rw/_defs.h #include rw/_meta_help.h @@ -349,4 +349,5 @@ } // namespace __rw -#endif // _RWSTD_META_UNARY_CAT_H_INCLUDED +#endif // _RWSTD_RW_META_CAT_H_INCLUDED + Modified: stdcxx/branches/4.3.x/include/rw/_meta_comp.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_comp.h?rev=668223r1=668222r2=668223view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_comp.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_comp.h Mon Jun 16 09:25:35 2008 @@ -27,8 +27,8 @@ * **/ -#ifndef _RWSTD_META_UNARY_COMP_H_INCLUDED -#define _RWSTD_META_UNARY_COMP_H_INCLUDED +#ifndef _RWSTD_RW_META_COMP_H_INCLUDED +#define _RWSTD_RW_META_COMP_H_INCLUDED #include rw/_defs.h #include rw/_meta_cat.h @@ -144,4 +144,5 @@ } // namespace __rw -#endif // _RWSTD_META_UNARY_COMP_H_INCLUDED +#endif // _RWSTD_RW_META_COMP_H_INCLUDED + Modified: stdcxx/branches/4.3.x/include/rw/_meta_cv.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_cv.h?rev=668223r1=668222r2=668223view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_cv.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_cv.h Mon Jun 16 09:25:35 2008 @@ -27,8 +27,8 @@ * **/ -#ifndef _RWSTD_META_TRANS_CV_H_INCLUDED -#define _RWSTD_META_TRANS_CV_H_INCLUDED +#ifndef _RWSTD_RW_META_CV_H_INCLUDED +#define _RWSTD_RW_META_CV_H_INCLUDED #include rw/_defs.h #include rw/_meta_cat.h @@ -159,4 +159,5 @@ } // namespace __rw -#endif // _RWSTD_META_TRANS_CV_H_INCLUDED +#endif // _RWSTD_RW_META_CV_H_INCLUDED + Modified: stdcxx/branches/4.3.x/include/rw/_meta_help.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_help.h?rev=668223r1=668222r2=668223view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_help.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_help.h Mon Jun 16 09:25:35 2008 @@ -27,8 +27,8
svn commit: r668277 - /stdcxx/branches/4.3.x/include/rw/_meta_other.h
Author: vitek Date: Mon Jun 16 12:50:29 2008 New Revision: 668277 URL: http://svn.apache.org/viewvc?rev=668277view=rev Log: 2008-06-16 Travis Vitek [EMAIL PROTECTED] STDCXX-926 * include/rw/_meta_other.h [!_RWSTD_NO_VARIADIC_TEMPLATES]: Fix __rw_aligned_union implementation. Modified: stdcxx/branches/4.3.x/include/rw/_meta_other.h Modified: stdcxx/branches/4.3.x/include/rw/_meta_other.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_other.h?rev=668277r1=668276r2=668277view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_other.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_other.h Mon Jun 16 12:50:29 2008 @@ -91,7 +91,7 @@ { union { unsigned char __pad [_Len]; -typename __rw_aligned_union_Len, Types...::_C_type __align; +typename __rw_aligned_union_impl_Len, Types...::_C_type __align; } _C_type; };
svn commit: r668340 - /stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp
Author: vitek Date: Mon Jun 16 16:07:26 2008 New Revision: 668340 URL: http://svn.apache.org/viewvc?rev=668340view=rev Log: 2008-06-16 Travis Vitek [EMAIL PROTECTED] STDCXX-920 * tests/utilities/20.meta.unary.prop.cpp: Use size_t instead of _RWSTD_SIZE_T. Update test to correctly reflect behaviors required by standard. Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp?rev=668340r1=668339r2=668340view=diff == --- stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp (original) +++ stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp Mon Jun 16 16:07:26 2008 @@ -27,6 +27,8 @@ * **/ +#include stddef.h + #include rw_driver.h // compile out all test code if extensions disabled @@ -208,15 +210,15 @@ void test_trait (int line, const char* trait, const char* type, - _RWSTD_SIZE_T value, _RWSTD_SIZE_T expect) + size_t value, size_t expect) { rw_assert (value == expect, 0, line, %s%s::value is %zu, expected %zu, trait, type, value, expect); } -void test_trait (int line, _RWSTD_SIZE_T depth, - _RWSTD_SIZE_T value, _RWSTD_SIZE_T expect, +void test_trait (int line, size_t depth, + size_t value, size_t expect, const char* trait, const char* type) { rw_assert (value == expect, 0, line, @@ -374,9 +376,9 @@ static void test_is_trivial () { TEST (std::is_trivial, long, true); -TEST (std::is_trivial, C long, false); +TEST (std::is_trivial, C long, true); TEST (std::is_trivial, V long, true); -TEST (std::is_trivial, CV long, false); +TEST (std::is_trivial, CV long, true); TEST (std::is_trivial, long, false); TEST (std::is_trivial, C long, false); @@ -418,6 +420,7 @@ static void test_is_standard_layout () { TEST (std::is_standard_layout, long, true); +TEST (std::is_standard_layout, non_empty_t, true); // no non-static data members of non-standard-layout type TEST (std::is_standard_layout, member_taccess_controlled_t, false);
svn commit: r668347 - /stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp
Author: vitek Date: Mon Jun 16 16:35:21 2008 New Revision: 668347 URL: http://svn.apache.org/viewvc?rev=668347view=rev Log: 2008-06-16 Travis Vitek [EMAIL PROTECTED] STDCXX-921 * tests/utilities/20.meta.rel.cpp: Update test to correctly reflect behaviors required by the standard. Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp?rev=668347r1=668346r2=668347view=diff == --- stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp (original) +++ stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp Mon Jun 16 16:35:21 2008 @@ -184,21 +184,17 @@ TEST (std::is_base_of, derived_class_B, derived_class_B, true); -TEST (std::is_base_of, union_C, union_C, true); +TEST (std::is_base_of, union_C, union_C, false); // public inheritance TEST (std::is_base_of, struct_A, derived_struct_A, true); TEST (std::is_base_of, class_B, derived_class_B, true); // protected inheritance -TEST (std::is_convertible, derived_protected_struct_A , struct_A , true); // slice -TEST (std::is_convertible, derived_protected_struct_A*, struct_A*, true); -TEST (std::is_convertible, derived_protected_struct_A, struct_A, true); +TEST (std::is_base_of, derived_protected_struct_A , struct_A , true); // private inheritance -TEST (std::is_convertible, derived_private_struct_A , struct_A , true); // slice -TEST (std::is_convertible, derived_private_struct_A*, struct_A*, true); -TEST (std::is_convertible, derived_private_struct_A, struct_A, true); +TEST (std::is_base_of, derived_private_struct_A , struct_A , true); // other combinations should fail TEST (std::is_base_of, signed char, char, false); @@ -235,16 +231,6 @@ TEST (std::is_convertible, derived_struct_A*, struct_A*, true); TEST (std::is_convertible, derived_struct_A, struct_A, true); -// protected inheritance -TEST (std::is_convertible, derived_protected_struct_A , struct_A , false); // slice -TEST (std::is_convertible, derived_protected_struct_A*, struct_A*, false); -TEST (std::is_convertible, derived_protected_struct_A, struct_A, false); - -// private inheritance -TEST (std::is_convertible, derived_private_struct_A , struct_A , false); // slice -TEST (std::is_convertible, derived_private_struct_A*, struct_A*, false); -TEST (std::is_convertible, derived_private_struct_A, struct_A, false); - TEST (std::is_convertible, derived_class_B , class_B , true); // slice TEST (std::is_convertible, derived_class_B*, class_B*, true); TEST (std::is_convertible, derived_class_B, class_B, true); @@ -346,7 +332,7 @@ TEST (std::is_convertible, int (), int ()(char), false); TEST (std::is_convertible, int*, void*, true); -TEST (std::is_convertible, int (*)(), void*, true); +TEST (std::is_convertible, int (*)(), void*, false); //TEST (std::is_convertible, int (*)(derived_struct_A::*), int (*)(struct_A::*), true);
svn commit: r668350 - in /stdcxx/branches/4.3.x: include/rw/_defs.h include/rw/_meta_sign.h tests/utilities/20.meta.trans.sign.cpp
Author: vitek Date: Mon Jun 16 17:03:39 2008 New Revision: 668350 URL: http://svn.apache.org/viewvc?rev=668350view=rev Log: 2008-06-16 Travis Vitek [EMAIL PROTECTED] STDCXX-947 * include/rw/_defs.h [_RWSTD_UWCHAR_INT_T,_RWSTD_SWCHAR_INT_T]: Revert changes from r667365. * include/rw/_meta_sign.h: Define make_signed and make_unsigned to properly handle char and wchar_t according to current standard. * tests/utilities/20.meta.trans.sign.cpp: Use size_t as appropriate. Update test to correctly reflect behaviors required by the standard. Modified: stdcxx/branches/4.3.x/include/rw/_defs.h stdcxx/branches/4.3.x/include/rw/_meta_sign.h stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp Modified: stdcxx/branches/4.3.x/include/rw/_defs.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_defs.h?rev=668350r1=668349r2=668350view=diff == --- stdcxx/branches/4.3.x/include/rw/_defs.h (original) +++ stdcxx/branches/4.3.x/include/rw/_defs.h Mon Jun 16 17:03:39 2008 @@ -1274,21 +1274,6 @@ # endif #endif // _RWSTD_SSIZE_T -// _RWSTD_SWCHAR_INT_T is signed wchar_t -#ifndef _RWSTD_SWCHAR_INT_T -# if _RWSTD_CHAR_SIZE == _RWSTD_WCHAR_SIZE -#define _RWSTD_SWCHAR_INT_T signed char -# elif _RWSTD_SHRT_SIZE == _RWSTD_WCHAR_SIZE -#define _RWSTD_SWCHAR_INT_T signed short -# elif _RWSTD_INT_SIZE == _RWSTD_WCHAR_SIZE -#define _RWSTD_SWCHAR_INT_T signed int -# elif _RWSTD_LONG_SIZE == _RWSTD_WCHAR_SIZE -#define _RWSTD_SWCHAR_INT_T signed long -# else -#define _RWSTD_SWCHAR_INT_T signed long long -# endif -#endif // _RWSTD_SWCHAR_INT_T - // _RWSTD_UWCHAR_INT_T is unsigned wchar_t #ifndef _RWSTD_UWCHAR_INT_T # if _RWSTD_CHAR_SIZE == _RWSTD_WCHAR_SIZE @@ -1297,10 +1282,8 @@ #define _RWSTD_UWCHAR_INT_T unsigned short # elif _RWSTD_INT_SIZE == _RWSTD_WCHAR_SIZE #define _RWSTD_UWCHAR_INT_T unsigned int -# elif _RWSTD_LONG_SIZE == _RWSTD_WCHAR_SIZE -#define _RWSTD_UWCHAR_INT_T unsigned long # else -#define _RWSTD_UWCHAR_INT_T unsigned long long +#define _RWSTD_UWCHAR_INT_T _RWSTD_SIZE_T # endif #endif // _RWSTD_UWCHAR_INT_T Modified: stdcxx/branches/4.3.x/include/rw/_meta_sign.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_sign.h?rev=668350r1=668349r2=668350view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_sign.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_sign.h Mon Jun 16 17:03:39 2008 @@ -52,17 +52,55 @@ template struct __rw_sign_helperchar { -typedef signed char _C_Sint; +#if (_RWSTD_CHAR_MIN 0) +typedef char _C_Sint; typedef unsigned char _C_Uint; +#else +typedef signed char _C_Sint; +typedef char _C_Uint; +#endif }; +#ifndef _RWSTD_NO_NATIVE_WCHAR_T + template struct __rw_sign_helperwchar_t { -typedef _RWSTD_SWCHAR_INT_T _C_Sint; -typedef _RWSTD_UWCHAR_INT_T _C_Uint; +#if (_RWSTD_WCHAR_MIN 0) +typedef wchar_t _C_Sint; + +# if (_RWSTD_WCHAR_SIZE == _RWSTD_CHAR_SIZE) +typedef unsigned char _C_Uint; +# elif (_RWSTD_WCHAR_SIZE == _RWSTD_SHORT_SIZE) +typedef unsigned short _C_Uint; +# elif (_RWSTD_WCHAR_SIZE == _RWSTD_INT_SIZE) +typedef unsigned int _C_Uint; +# elif (_RWSTD_WCHAR_SIZE == _RWSTD_LONG_SIZE) +typedef unsigned long _C_Uint; +# elif (_RWSTD_WCHAR_SIZE == _RWSTD_LLONG_SIZE) +typedef unsigned long long _C_Uint; +# endif + +# else // 0 = _RWSTD_WCHAR_MIN + +# if (_RWSTD_WCHAR_SIZE == _RWSTD_CHAR_SIZE) +typedef signed char _C_Sint; +# elif (_RWSTD_WCHAR_SIZE == _RWSTD_SHORT_SIZE) +typedef signed short _C_Sint; +# elif (_RWSTD_WCHAR_SIZE == _RWSTD_INT_SIZE) +typedef signed int _C_Sint; +# elif (_RWSTD_WCHAR_SIZE == _RWSTD_LONG_SIZE) +typedef signed long _C_Sint; +# elif (_RWSTD_WCHAR_SIZE == _RWSTD_LLONG_SIZE) +typedef signed long long _C_Sint; +# endif + +typedef wchar_t _C_Uint; +# endif // 0 = _RWSTD_WCHAR_MIN }; +#endif // _RWSTD_NO_NATIVE_WCHAR_T + template struct __rw_sign_helpersigned char { @@ -186,7 +224,7 @@ # if (_RWSTD_LONG_SIZE != _RWSTD_LLONG_SIZE) template -struct __rw_enum_helpersizeof (long long) //_RWSTD_LLONG_SIZE +struct __rw_enum_helper_RWSTD_LLONG_SIZE { typedef signed long long _C_Sint; typedef unsigned long long _C_Uint; Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp?rev=668350r1=668349r2=668350view=diff == --- stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp (original) +++ stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp Mon Jun 16 17:03
svn commit: r668353 - /stdcxx/branches/4.3.x/include/rw/_meta_prop.h
Author: vitek Date: Mon Jun 16 17:07:34 2008 New Revision: 668353 URL: http://svn.apache.org/viewvc?rev=668353view=rev Log: 2008-06-16 Travis Vitek [EMAIL PROTECTED] STDCXX-920 * include/rw/_meta_prop.h: Add is_signed support for floating point types accidentally removed in r667396. Fix is_trivial to behave correctly for cv-qualified types. Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h Modified: stdcxx/branches/4.3.x/include/rw/_meta_prop.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_prop.h?rev=668353r1=668352r2=668353view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_prop.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_prop.h Mon Jun 16 17:07:34 2008 @@ -257,14 +257,15 @@ template class _TypeT struct __rw_is_trivial_impl { -typedef typename __rw_remove_all_extents_TypeT::type _TypeU; +typedef typename __rw_remove_cv_TypeT::type _TypeU; +typedef typename __rw_remove_all_extents_TypeU::type _TypeV; -enum { _C_value =__rw_is_scalar_TypeU::value - || __rw_has_trivial_ctor_TypeU::value - __rw_has_trivial_copy_TypeU::value - __rw_has_trivial_dtor_TypeU::value - __rw_has_trivial_assign_TypeU::value - (__rw_is_class_TypeU::value || __rw_is_union_TypeU::value) }; +enum { _C_value =__rw_is_scalar_TypeV::value + || __rw_has_trivial_ctor_TypeV::value + __rw_has_trivial_copy_TypeV::value + __rw_has_trivial_dtor_TypeV::value + __rw_has_trivial_assign_TypeV::value + (__rw_is_class_TypeV::value || __rw_is_union_TypeV::value) }; }; /** @@ -393,6 +394,13 @@ _RWSTD_TRAIT_SPEC_0_CV(__rw_is_unsigned, unsigned long long); #endif // _RWSTD_NO_LONG_LONG +_RWSTD_TRAIT_SPEC_0_CV(__rw_is_signed, float); +_RWSTD_TRAIT_SPEC_0_CV(__rw_is_signed, double); + +#ifndef _RWSTD_NO_LONG_DOUBLE +_RWSTD_TRAIT_SPEC_0_CV(__rw_is_signed, long double); +#endif // _RWSTD_NO_LONG_DOUBLE + /** * UnaryTypeTrait that gets the alignment of _TypeT. */
svn commit: r667396 - in /stdcxx/branches/4.3.x: include/ include/rw/ tests/utilities/
Author: vitek Date: Fri Jun 13 00:34:29 2008 New Revision: 667396 URL: http://svn.apache.org/viewvc?rev=667396view=rev Log: 2008-06-13 Travis Vitek [EMAIL PROTECTED] =|=|=|=|=|=|=| * include/type_traits: integral_constant no longer inherits from __rw_integral_constant. * include/rw/_config-gcc.h: Disable __is_convertible on gcc as it doesn't seem to exist. * include/rw/_meta_cat.h: Expose helper macros. * include/rw/_meta_rel.h: Ditto. Enable is_convertible fallback. * include/_rw/_meta_prop.h: Use explicit specialization to identify signed and unsigned types to avoid warnings on gnu. Use fallback for __rw_is_standard_layout. Use _RWSTD_SIZE_T instead of size_t. * tests/utilities/20.meta.unary.prop.cpp: Use _RWSTD_SIZE_T instead of size_t. Add a few tests, fix several others. (test_make_unsigned): Fix search-n-replace error. Modified: stdcxx/branches/4.3.x/include/rw/_config-gcc.h stdcxx/branches/4.3.x/include/rw/_meta_arr.h stdcxx/branches/4.3.x/include/rw/_meta_cat.h stdcxx/branches/4.3.x/include/rw/_meta_prop.h stdcxx/branches/4.3.x/include/rw/_meta_ref.h stdcxx/branches/4.3.x/include/rw/_meta_rel.h stdcxx/branches/4.3.x/include/type_traits stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp Modified: stdcxx/branches/4.3.x/include/rw/_config-gcc.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config-gcc.h?rev=667396r1=667395r2=667396view=diff == --- stdcxx/branches/4.3.x/include/rw/_config-gcc.h (original) +++ stdcxx/branches/4.3.x/include/rw/_config-gcc.h Fri Jun 13 00:34:29 2008 @@ -185,7 +185,7 @@ # define _RWSTD_TT_IS_POLYMORPHIC(T) __is_polymorphic(T) # define _RWSTD_TT_IS_ABSTRACT(T)__is_abstract(T) # define _RWSTD_TT_IS_BASE_OF(T,U) __is_base_of(T,U) -# define _RWSTD_TT_IS_CONVERTIBLE(T,U) __is_convertible(T,U) +//# define _RWSTD_TT_IS_CONVERTIBLE(T,U) __is_convertible(T,U) # define _RWSTD_TT_HAS_TRIVIAL_CTOR(T) __has_trivial_constructor(T) # define _RWSTD_TT_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T) @@ -201,4 +201,4 @@ # define _RWSTD_TT_ALIGN_OF(T) __alignof__(T) # define _RWSTD_TT_ALIGNED_POD(N)struct { char __fill __attribute__ ((aligned (N))); } # define _RWSTD_TT_MAX_ALIGNMENT 16 -#endif // __GNUC__ = 4.3 \ No newline at end of file +#endif // __GNUC__ = 4.3 Modified: stdcxx/branches/4.3.x/include/rw/_meta_arr.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_arr.h?rev=667396r1=667395r2=667396view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_arr.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_arr.h Fri Jun 13 00:34:29 2008 @@ -49,7 +49,7 @@ * other types as-is. This specialization is for array types of bounded * size. */ -template class _TypeT, size_t _Size +template class _TypeT, _RWSTD_SIZE_T _Size struct __rw_remove_extent_TypeT [_Size] { typedef _TypeT type; @@ -84,7 +84,7 @@ * other types as-is. This specialization is for array types of bounded * size. */ -template class _TypeT, size_t _Size +template class _TypeT, _RWSTD_SIZE_T _Size struct __rw_remove_all_extents_TypeT [_Size] { typedef typename __rw_remove_all_extents_TypeT::type type; Modified: stdcxx/branches/4.3.x/include/rw/_meta_cat.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_cat.h?rev=667396r1=667395r2=667396view=diff == --- stdcxx/branches/4.3.x/include/rw/_meta_cat.h (original) +++ stdcxx/branches/4.3.x/include/rw/_meta_cat.h Fri Jun 13 00:34:29 2008 @@ -76,8 +76,8 @@ _RWSTD_TRAIT_SPEC_0_CV(__rw_is_void, void, true); -//#define _RWSTD_IS_VOID(T) \ -//_RW::__rw_is_voidT::value +#define _RWSTD_IS_VOID(T) \ +_RW::__rw_is_voidT::value /** @@ -116,8 +116,8 @@ _RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral, unsigned long long, true); #endif // _RWSTD_NO_LONG_LONG -//#define _RWSTD_IS_INTEGRAL(T) \ -//_RW::__rw_is_integralT::value +#define _RWSTD_IS_INTEGRAL(T) \ +_RW::__rw_is_integralT::value /** * UnaryTypeTrait to determine if _TypeT is a (potentially cv-qualified) @@ -129,8 +129,6 @@ { }; -//#define _RWSTD_IS_FLOATING_POINT(T) _RW::__rw_is_floating_pointT::value - _RWSTD_TRAIT_SPEC_0_CV(__rw_is_floating_point, float, true); _RWSTD_TRAIT_SPEC_0_CV
svn commit: r664141 - in /stdcxx/branches/4.3.x: include/type_traits tests/utilities/20.meta.help.cpp
Author: vitek Date: Fri Jun 6 14:44:17 2008 New Revision: 664141 URL: http://svn.apache.org/viewvc?rev=664141view=rev Log: 2008-06-06 Travis Vitek [EMAIL PROTECTED] STDCXX-917 * include/type_traits: Add type_traits header that includes integral_contstant implementation. * tests/utilities/20.meta.help.cpp: Add new test. Added: stdcxx/branches/4.3.x/include/type_traits (with props) stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp (with props) Added: stdcxx/branches/4.3.x/include/type_traits URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/type_traits?rev=664141view=auto == --- stdcxx/branches/4.3.x/include/type_traits (added) +++ stdcxx/branches/4.3.x/include/type_traits Fri Jun 6 14:44:17 2008 @@ -0,0 +1,86 @@ + // -*- C++ -*- +/*** + * + * type_traits - definition of type_traits types + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 2008 Rogue Wave Software, Inc. + * + **/ + +#ifndef _RWSTD_TYPE_TRAITS_INCLUDED +#define _RWSTD_TYPE_TRAITS_INCLUDED + +#include rw/_defs.h + +#ifndef _RWSTD_NO_EXT_CXX_0X + +_RWSTD_NAMESPACE (std) { + +/** + * The class template integral_constant and its associated typedefs + * true_type and false_type are used as base classes to define the + * interface for various type traits. + */ +template class _TypeT, _TypeT _Value +struct integral_constant +{ +/** + * Describes the type of this integral_constant. + */ +typedef integral_constant_TypeT,_Value type; + +/** + * Describes the type of the value defined by this integral_constant. + */ +typedef _TypeT value_type; + +/** + * The actual integral constant value. + */ +static const _TypeT value = _Value; +}; + +#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION + +templateclass _TypeT, _TypeT _Value +const _TypeT integral_constant_TypeT, _Value::value; + +#endif// _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION + +/** + * Convenience typedef that is intended to be used as a base class + * for boolean type traits that are true. + */ +typedef integral_constantbool, true true_type; + +/** + * Convenience typedef that is intended to be used as a base class + * for boolean type traits that are false. + */ +typedef integral_constantbool, false false_type; + +} // namespace std + +#endif // _RWSTD_NO_EXT_CXX_0X + +#endif // _RWSTD_TYPE_TRAITS_INCLUDED Propchange: stdcxx/branches/4.3.x/include/type_traits -- svn:eol-style = native Propchange: stdcxx/branches/4.3.x/include/type_traits -- svn:keywords = Id Added: stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp?rev=664141view=auto == --- stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp (added) +++ stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp Fri Jun 6 14:44:17 2008 @@ -0,0 +1,256 @@ +// -*- C++ -*- +/*** + * + * 20.meta.help.cpp - test exercising tr.meta.help + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org
svn commit: r664236 - /stdcxx/branches/4.2.x/tests/numerics/26.gslice.array.cassign.cpp
Author: vitek Date: Fri Jun 6 18:41:26 2008 New Revision: 664236 URL: http://svn.apache.org/viewvc?rev=664236view=rev Log: 2008-06-06 Travis Vitek [EMAIL PROTECTED] * tests/numerics/26.gslice.array.cassign.cpp: Fix unfortunate compilation error. Modified: stdcxx/branches/4.2.x/tests/numerics/26.gslice.array.cassign.cpp Modified: stdcxx/branches/4.2.x/tests/numerics/26.gslice.array.cassign.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/numerics/26.gslice.array.cassign.cpp?rev=664236r1=664235r2=664236view=diff == --- stdcxx/branches/4.2.x/tests/numerics/26.gslice.array.cassign.cpp (original) +++ stdcxx/branches/4.2.x/tests/numerics/26.gslice.array.cassign.cpp Fri Jun 6 18:41:26 2008 @@ -117,7 +117,7 @@ RW_ASSERT (lhs_va.size () == res_va.size ()); // take a gslice of lhs_va, this is the lhs of the assignment -std::gslice_arraystd::size_t lhs_ga = lhs_va [gsl]; +std::gslice_arraystd::size_t lhs_ga = lhs_va [gsl]; char* fname = 0; std::size_t size = 0;
svn commit: r664274 - /stdcxx/branches/4.3.x/tests/localization/22.locale.synopsis.cpp
Author: vitek Date: Fri Jun 6 20:49:30 2008 New Revision: 664274 URL: http://svn.apache.org/viewvc?rev=664274view=rev Log: 2008-06-06 Travis Vitek [EMAIL PROTECTED] * tests/localization/22.locale.synopsis.cpp: Update include directive for renamed test driver header. Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.synopsis.cpp Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.synopsis.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.synopsis.cpp?rev=664274r1=664273r2=664274view=diff == --- stdcxx/branches/4.3.x/tests/localization/22.locale.synopsis.cpp (original) +++ stdcxx/branches/4.3.x/tests/localization/22.locale.synopsis.cpp Fri Jun 6 20:49:30 2008 @@ -42,7 +42,7 @@ #include iterator #include locale -#include driver.h +#include rw_driver.h static void test_lc_defs ()
svn commit: r663757 - in /stdcxx/branches/4.3.x/etc/config/src: RVALUE_REFERENCES.cpp VARIADIC_TEMPLATES.cpp
Author: vitek Date: Thu Jun 5 15:02:15 2008 New Revision: 663757 URL: http://svn.apache.org/viewvc?rev=663757view=rev Log: 2008-06-05 Travis Vitek [EMAIL PROTECTED] * etc/config/src/RVALUE_REFERENCES.cpp: Add new config test to check for rvalue-reference support. * etc/config/src/VARIADIC_TEMPLATES.cpp: Add new config test to check for variadic template support. Added: stdcxx/branches/4.3.x/etc/config/src/RVALUE_REFERENCES.cpp (with props) stdcxx/branches/4.3.x/etc/config/src/VARIADIC_TEMPLATES.cpp (with props) Added: stdcxx/branches/4.3.x/etc/config/src/RVALUE_REFERENCES.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/src/RVALUE_REFERENCES.cpp?rev=663757view=auto == --- stdcxx/branches/4.3.x/etc/config/src/RVALUE_REFERENCES.cpp (added) +++ stdcxx/branches/4.3.x/etc/config/src/RVALUE_REFERENCES.cpp Thu Jun 5 15:02:15 2008 @@ -0,0 +1,25 @@ +// checking for rvalue reference support + +/*** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 1999-2008 Rogue Wave Software, Inc. + * + **/ + +void foo (int i) { } Propchange: stdcxx/branches/4.3.x/etc/config/src/RVALUE_REFERENCES.cpp -- svn:eol-style = native Propchange: stdcxx/branches/4.3.x/etc/config/src/RVALUE_REFERENCES.cpp -- svn:keywords = Id Added: stdcxx/branches/4.3.x/etc/config/src/VARIADIC_TEMPLATES.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/src/VARIADIC_TEMPLATES.cpp?rev=663757view=auto == --- stdcxx/branches/4.3.x/etc/config/src/VARIADIC_TEMPLATES.cpp (added) +++ stdcxx/branches/4.3.x/etc/config/src/VARIADIC_TEMPLATES.cpp Thu Jun 5 15:02:15 2008 @@ -0,0 +1,29 @@ +// checking for variadic templates + +/*** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 1999-2008 Rogue Wave Software, Inc. + * + **/ + +template class... Types class foo { }; + +foo t0; +fooint t1; +fooint, float t2; Propchange: stdcxx/branches/4.3.x/etc/config/src/VARIADIC_TEMPLATES.cpp -- svn:eol-style = native Propchange: stdcxx/branches/4.3.x/etc/config/src/VARIADIC_TEMPLATES.cpp -- svn:keywords = Id
svn commit: r663377 - in /stdcxx/branches/4.2.x: include/valarray src/valarray.cpp tests/numerics/26.class.gslice.cpp tests/regress/26.valarray.sub.stdcxx-955.cpp
Author: vitek Date: Wed Jun 4 14:48:36 2008 New Revision: 663377 URL: http://svn.apache.org/viewvc?rev=663377view=rev Log: 2008-06-04 Travis Vitek [EMAIL PROTECTED] STDCXX-955 * include/valarray: Correctly calculate indices when the length array contains a zero. * src/valarray.cpp: Ditto. * tests/numerics/26.class.gslice.cpp (make_array): Update to handle empty strings or other poorly formatted input. (get_array_size, next_index): Correctly calculate indices when the slice length array contains a zero. (test_gslice): Remove unnecessary line feed from assertion. (run_test): Update degenerate testcase to match comment. * tests/regress/26.valarray.sub.stdcxx-995.cpp: Add new regression test. Added: stdcxx/branches/4.2.x/tests/regress/26.valarray.sub.stdcxx-955.cpp (with props) Modified: stdcxx/branches/4.2.x/include/valarray stdcxx/branches/4.2.x/src/valarray.cpp stdcxx/branches/4.2.x/tests/numerics/26.class.gslice.cpp Modified: stdcxx/branches/4.2.x/include/valarray URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/valarray?rev=663377r1=663376r2=663377view=diff == --- stdcxx/branches/4.2.x/include/valarray (original) +++ stdcxx/branches/4.2.x/include/valarray Wed Jun 4 14:48:36 2008 @@ -2039,10 +2039,12 @@ if (_C_length.size () == 0) return 0; -_RWSTD_SIZE_T __inx = 1; +_RWSTD_SIZE_T __inx = _C_length [0] != 0; -for(_RWSTD_SIZE_T __i = 0; __i _C_length.size (); ++__i) -__inx *= _C_length [__i]; +for(_RWSTD_SIZE_T __i = 0; __i _C_length.size (); ++__i) { +if (_C_length [__i]) +__inx *= _C_length [__i]; +} return __inx; } Modified: stdcxx/branches/4.2.x/src/valarray.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/valarray.cpp?rev=663377r1=663376r2=663377view=diff == --- stdcxx/branches/4.2.x/src/valarray.cpp (original) +++ stdcxx/branches/4.2.x/src/valarray.cpp Wed Jun 4 14:48:36 2008 @@ -41,8 +41,12 @@ { _RWSTD_SIZE_T __n = _C_length.size (); -while (__n _C_r_length [__n - 1] == _C_length [__n - 1] - 1) ---__n; +for (/**/; __n; --__n) +{ +if ( _C_length [__n - 1] + _C_r_length [__n - 1] != _C_length [__n - 1] - 1) +break; +} if (0 == __n) { _C_reset= true; Modified: stdcxx/branches/4.2.x/tests/numerics/26.class.gslice.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/numerics/26.class.gslice.cpp?rev=663377r1=663376r2=663377view=diff == --- stdcxx/branches/4.2.x/tests/numerics/26.class.gslice.cpp (original) +++ stdcxx/branches/4.2.x/tests/numerics/26.class.gslice.cpp Wed Jun 4 14:48:36 2008 @@ -35,25 +35,28 @@ static std::valarraystd::size_t make_array (const char *s) { -if (0 == s) -return std::valarraystd::size_t(); - std::size_t buf [256]; -for (std::size_t i = 0; ; ++i) { +std::size_t i = 0; +while (s *s) { char *end; unsigned long val = std::strtoul (s, end, 10); RW_ASSERT ('\0' == *end || ',' == *end); -buf [i] = std::size_t (val); +if (s == end) +break; + +buf [i++] = std::size_t (val); if ('\0' == *end) -return std::valarraystd::size_t(buf, i + 1); +break; s = end + 1; } + +return std::valarraystd::size_t(buf, i); } /**/ @@ -67,7 +70,8 @@ std::size_t asize = sizes.size () ? 1 : 0; for (std::size_t i = 0; i != sizes.size (); ++i) { -asize *= sizes [i]; +if (sizes [i]) +asize *= sizes [i]; } return asize; @@ -92,8 +96,11 @@ return start; } -while (inx factors [inx - 1] == asizes [inx - 1] - 1) ---inx; +for (/**/; inx; --inx) { +if ( asizes [inx - 1] + factors [inx - 1] != asizes [inx - 1] - 1) +break; +} if (0 == inx) { factors = 0; @@ -156,12 +163,12 @@ if (maxinx indices [i]) maxinx = indices [i]; -std::valarraystd::size_t va (maxinx + 1); +std::valarraystd::size_t va (indices.size () ? maxinx + 1 : 0); for (std::size_t i = 0; i != va.size (); ++i) va [i] = i; for (int i = 0; i != 3; ++i) { -// repeat each test three to verify that operator[](gslice) +// repeat each test thrice to verify that operator[](gslice) // doesn't change the observable state of its argument and // that the same result is obtained for a copy of gslice @@ -171,7 +178,7 @@ bool equal = array_slice.size
svn commit: r663410 - /stdcxx/branches/4.2.x/tests/support/18.support.rtti.cpp
Author: vitek Date: Wed Jun 4 16:15:07 2008 New Revision: 663410 URL: http://svn.apache.org/viewvc?rev=663410view=rev Log: 2008-06-04 Travis Vitek [EMAIL PROTECTED] STDCXX-872 * tests/support/18.support.rtti.cpp [__IBMCPP__]: Avoid testing typeid() if rtti support is disabled. Modified: stdcxx/branches/4.2.x/tests/support/18.support.rtti.cpp Modified: stdcxx/branches/4.2.x/tests/support/18.support.rtti.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/support/18.support.rtti.cpp?rev=663410r1=663409r2=663410view=diff == --- stdcxx/branches/4.2.x/tests/support/18.support.rtti.cpp (original) +++ stdcxx/branches/4.2.x/tests/support/18.support.rtti.cpp Wed Jun 4 16:15:07 2008 @@ -97,6 +97,13 @@ _RWSTD_UNUSED (p_name); } +#if defined (__IBMCPP__) !defined (__RTTI_TYPE_INFO__) + +rw_warn (0, 0, __LINE__, + not testing type_info; rtti is disabled); + +#else // !__IBMCPP__ || __RTTI_TYPE_INFO__ + if (1) { // exercise 18.5.1, class type_info functionality D1 d1; @@ -179,6 +186,8 @@ d1_name, d2_name); } +#endif // !__IBMCPP__ || __RTTI_TYPE_INFO__ + if (1) { // exercise 18.5.2, class bad_cast interface
svn commit: r662468 - /stdcxx/branches/4.2.x/tests/regress/18.limits.traps.stdcxx-624.cpp
Author: vitek Date: Mon Jun 2 08:55:50 2008 New Revision: 662468 URL: http://svn.apache.org/viewvc?rev=662468view=rev Log: 2008-06-02 Travis Vitek [EMAIL PROTECTED] * tests/regress/18.limits.traps.stdcxx-624.cpp: Update comments to reflect expected test behavior. Modified: stdcxx/branches/4.2.x/tests/regress/18.limits.traps.stdcxx-624.cpp Modified: stdcxx/branches/4.2.x/tests/regress/18.limits.traps.stdcxx-624.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/regress/18.limits.traps.stdcxx-624.cpp?rev=662468r1=662467r2=662468view=diff == --- stdcxx/branches/4.2.x/tests/regress/18.limits.traps.stdcxx-624.cpp (original) +++ stdcxx/branches/4.2.x/tests/regress/18.limits.traps.stdcxx-624.cpp Mon Jun 2 08:55:50 2008 @@ -79,17 +79,19 @@ bool trapped = false; // if this traps (generates SIGFPE), verify (in the signal handler) -// that integer arithmetic is expected to trap +// that integer arithmetic is expected to trap. if this doesn't trap +// then we are either on windows, or traps are disabled. TRY { result = non_zero / zero; result += non_zero % zero; } EXCEPT (1) { +// windows structured exception caught trapped = true; } -// if we get this far, verify that integer arithmetic is known not -// to trap +// if we get this far, verify that we have caught a structured +// exception or integer arithmetic is known not to trap assert (trapped == std::numeric_limitsint::traps); (void)result;
svn commit: r661842 - in /stdcxx/trunk: etc/config/src/ include/ include/ansi/ include/rw/ include/tr1/ tests/support/ tests/tr1.c99/ tests/tr1.util/ tests/utilities/
Author: vitek Date: Fri May 30 13:43:11 2008 New Revision: 661842 URL: http://svn.apache.org/viewvc?rev=661842view=rev Log: 2008-05-30 Travis Vitek [EMAIL PROTECTED] Merged rev 661467 from 4.3.x to trunk 2008-05-29 Travis Vitek [EMAIL PROTECTED] * etc/config/src/headers.inc: Add checks for more C99 headers. * include/tr1/_smartptr.h: Moved to include/rw/_smartptr.h * include/tr1/cstdint: Moved to include/ansi/_cstdint.h * include/tr1/stdint.h: Moved to include/ansi/stdint.h * include/tr1/array: Moved to include/array * tests/tr1.util/2.smartptr.shared.cpp: Moved to tests/utilities/20.smartptr.shared.cpp * tests/tr1.util/2.smartptr.weak.cpp: Moved to tests/utilities/20.smartptr.weak.cpp * include/ansi/cstdint: Add new file. * tests/tr1/c99/8.cstdint.cpp: Moved to tests/support/18.cstdint.cpp * include/rw/_smartptr.h: Removed all mention of TR1, updated section numbers to section names as appropriate. * include/array: Ditto. * include/ansi/stdint.h: Ditto. * include/ansi/_cstdint.h: Ditto. * tests/utilities/20.smartptr.shared.cpp: Ditto. [_RWSTD_NO_EXT_CXX_0X]: Reduce test to a warning if c++0x extensions are disabled. * tests/utilities/20.smartptr.weak.cpp: Ditto. * tests/support/18.cstdint.cpp: Ditto. Added: stdcxx/trunk/include/ansi/_cstdint.h - copied unchanged from r661478, stdcxx/branches/4.3.x/include/ansi/_cstdint.h stdcxx/trunk/include/ansi/cstdint - copied unchanged from r661478, stdcxx/branches/4.3.x/include/ansi/cstdint stdcxx/trunk/include/ansi/stdint.h - copied unchanged from r661478, stdcxx/branches/4.3.x/include/ansi/stdint.h stdcxx/trunk/include/array - copied unchanged from r661478, stdcxx/branches/4.3.x/include/array stdcxx/trunk/include/rw/_smartptr.h - copied unchanged from r661478, stdcxx/branches/4.3.x/include/rw/_smartptr.h stdcxx/trunk/tests/support/18.cstdint.cpp - copied unchanged from r661478, stdcxx/branches/4.3.x/tests/support/18.cstdint.cpp stdcxx/trunk/tests/utilities/20.smartptr.shared.cpp - copied unchanged from r661478, stdcxx/branches/4.3.x/tests/utilities/20.smartptr.shared.cpp stdcxx/trunk/tests/utilities/20.smartptr.weak.cpp - copied unchanged from r661478, stdcxx/branches/4.3.x/tests/utilities/20.smartptr.weak.cpp Removed: stdcxx/trunk/include/tr1/_smartptr.h stdcxx/trunk/include/tr1/array stdcxx/trunk/include/tr1/cstdint stdcxx/trunk/include/tr1/stdint.h stdcxx/trunk/tests/tr1.c99/8.cstdint.cpp stdcxx/trunk/tests/tr1.util/2.smartptr.shared.cpp stdcxx/trunk/tests/tr1.util/2.smartptr.weak.cpp Modified: stdcxx/trunk/etc/config/src/headers.inc Modified: stdcxx/trunk/etc/config/src/headers.inc URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/headers.inc?rev=661842r1=661841r2=661842view=diff == --- stdcxx/trunk/etc/config/src/headers.inc (original) +++ stdcxx/trunk/etc/config/src/headers.inc Fri May 30 13:43:11 2008 @@ -21,8 +21,10 @@ ## # list of headers -hdrs=assert ctype errno float iso646 limits locale math setjmp signal \ - stdarg stddef stdio stdlib string time wchar wctype new typeinfo +hdrs=assert complex ctype errno fenv float inttypes iso646 limits locale\ + math setjmp signal stdarg stdbool stddef stdio stdint stdlib string\ + tgmath time uchar wchar wctype new typeinfo + hdrs=$hdrs ieeefp.h pthread.h
svn commit: r660776 [2/2] - in /stdcxx/trunk: bin/ etc/config/ etc/config/src/ examples/manual/ examples/manual/in/ examples/manual/out/ include/loc/ include/rw/ src/ tests/include/ tests/iostream/ te
Modified: stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp?rev=660776r1=660775r2=660776view=diff == --- stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp Tue May 27 18:48:19 2008 @@ -43,14 +43,17 @@ // default number of threads (will be adjusted to the number // of processors/cores later) -int rw_opt_nthreads = 1; +int opt_nthreads = 1; // the default number of times for each thread to iterate #define DFLT_LOOPS 1 // the number of times each thread should iterate (will be set to // DFLT_LOOPS unless explicitly specified on the command line) -int rw_opt_nloops = -1; +int opt_nloops = -1; + +// default timeout used by each threaded section of this test +int opt_timeout = 60; /**/ @@ -240,7 +243,10 @@ static void* thread_func (void*) { -for (int i = 0; i != rw_opt_nloops; ++i) { +for (int i = 0; i != opt_nloops; ++i) { + +if (rw_thread_pool_timeout_expired ()) +break; thread_loop_body (std::size_t (i)); } @@ -388,13 +394,13 @@ // unless the number of iterations was explicitly specified // on the command line, decrease the number to equal the number // of excericsed locales when only one thread is being tested -if (1 == rw_opt_nthreads rw_opt_nloops 0) -rw_opt_nloops = int (nlocales); +if (1 == opt_nthreads opt_nloops 0) +opt_nloops = int (nlocales); // when the number of iterations wasn't explicitly specified // on the command line set it to the default value -if (rw_opt_nloops 0) -rw_opt_nloops = DFLT_LOOPS; +if (opt_nloops 0) +opt_nloops = DFLT_LOOPS; rw_fatal (0 nlocales, 0, __LINE__, must have at least one valid locale to test); @@ -402,8 +408,8 @@ rw_info (0, 0, 0, testing std::moneypunctcharT with %d thread%{?}s%{;}, %d iteration%{?}s%{;} each, in %zu locales { %{ [EMAIL PROTECTED] }, - rw_opt_nthreads, 1 != rw_opt_nthreads, - rw_opt_nloops, 1 != rw_opt_nloops, + opt_nthreads, 1 != opt_nthreads, + opt_nloops, 1 != opt_nloops, nlocales, int (nlocales), %#s, locales); rw_info (0, 0, 0, exercising std::moneypunctchar); @@ -413,11 +419,12 @@ // create and start a pool of threads and wait for them to finish int result = -rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); +rw_thread_pool (0, std::size_t (opt_nthreads), 0, +thread_func, 0, std::size_t (opt_timeout)); rw_error (result == 0, 0, __LINE__, rw_thread_pool(0, %d, 0, %{#f}, 0) failed, - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #ifndef _RWSTD_NO_WCHAR_T @@ -429,11 +436,12 @@ // start a pool of threads to exercise the thread safety // of the wchar_t specialization result = -rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); +rw_thread_pool (0, std::size_t (opt_nthreads), 0, +thread_func, 0, std::size_t (opt_timeout)); rw_error (result == 0, 0, __LINE__, rw_thread_pool(0, %d, 0, %{#f}, 0) failed, - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); // exercise both the char and the wchar_t specializations // at the same time @@ -447,11 +455,12 @@ // start a pool of threads to exercise wstring thread safety result = -rw_thread_pool (0, std::size_t (rw_opt_nthreads), 0, thread_func, 0); +rw_thread_pool (0, std::size_t (opt_nthreads), 0, +thread_func, 0, std::size_t (opt_timeout)); rw_error (result == 0, 0, __LINE__, rw_thread_pool(0, %d, 0, %{#f}, 0) failed, - rw_opt_nthreads, thread_func); + opt_nthreads, thread_func); #endif // _RWSTD_NO_WCHAR_T @@ -466,20 +475,22 @@ // set nthreads to the greater of the number of processors // and 2 (for uniprocessor systems) by default -rw_opt_nthreads = rw_get_cpus (); -if (rw_opt_nthreads 2) -rw_opt_nthreads = 2; +opt_nthreads = rw_get_cpus (); +if (opt_nthreads 2) +opt_nthreads = 2; #endif // _RWSTD_REENTRANT return rw_test (argc, argv, __FILE__, lib.locale.moneypunct, thread safety, run_test, +|-soft-timeout#0 // must be non-negative |-nloops#0// must be non-negative |-nthreads#0-*// must be in [0, MAX_THREADS] |-locales=,
svn commit: r657220 - /stdcxx/branches/4.2.x/tests/src/alarm.cpp
Author: vitek Date: Fri May 16 14:24:41 2008 New Revision: 657220 URL: http://svn.apache.org/viewvc?rev=657220view=rev Log: 2008-05-16 Travis Vitek [EMAIL PROTECTED] STDCXX-938 * tests/src/alarm.cpp [SIG_DFL]: Fix apparent typo in definition of SIG_DFL which would have resulted in macro redefinition warnings if both SIG_DFL and SIG_IGN were not defined in signal.h (rw_sig_dfl): Change pointer constant to avoid crash when using rw_alarm(). (rw_sig_ign): Ditto. (rw_sig_hold): Ditto. (rw_sig_restore): Ditto. Modified: stdcxx/branches/4.2.x/tests/src/alarm.cpp Modified: stdcxx/branches/4.2.x/tests/src/alarm.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/src/alarm.cpp?rev=657220r1=657219r2=657220view=diff == --- stdcxx/branches/4.2.x/tests/src/alarm.cpp (original) +++ stdcxx/branches/4.2.x/tests/src/alarm.cpp Fri May 16 14:24:41 2008 @@ -44,16 +44,16 @@ // exported/imported /* extern _TEST_EXPORT */ rw_signal_handler_t* const -rw_sig_dfl = (rw_signal_handler_t*)-1; +rw_sig_dfl = (rw_signal_handler_t*)0; /* extern _TEST_EXPORT */ rw_signal_handler_t* const -rw_sig_ign = (rw_signal_handler_t*)-2; +rw_sig_ign = (rw_signal_handler_t*)1; /* extern _TEST_EXPORT */ rw_signal_handler_t* const -rw_sig_hold = (rw_signal_handler_t*)-3; +rw_sig_hold = (rw_signal_handler_t*)2; /* extern _TEST_EXPORT */ rw_signal_handler_t* const -rw_sig_restore = (rw_signal_handler_t*)-4; +rw_sig_restore = (rw_signal_handler_t*)3; // may point to a user-defined handler for the alarm @@ -133,7 +133,7 @@ # endif # ifndef SIG_DFL -#define SIG_IGN (rw_signal_handler_t*)0 +#define SIG_DFL (rw_signal_handler_t*)0 # endif // SIG_DFL # ifndef SIG_IGN
svn commit: r655995 - /stdcxx/branches/4.2.x/tests/localization/
Author: vitek Date: Tue May 13 13:25:51 2008 New Revision: 655995 URL: http://svn.apache.org/viewvc?rev=655995view=rev Log: 2008-05-13 Travis Vitek [EMAIL PROTECTED] STDCXX-536 * tests/localization/22.locale.codecvt.mt.cpp: Pass opt_timeout to rw_thread_pool() to enable timeouts. * tests/localization/22.locale.cons.mt.cpp: Ditto. * tests/localization/22.locale.ctype.mt.cpp: Ditto. * tests/localization/22.locale.globals.mt.cpp: Ditto. * tests/localization/22.locale.messages.mt.cpp: Ditto. * tests/localization/22.locale.money.get.mt.cpp: Ditto. * tests/localization/22.locale.money.put.mt.cpp: Ditto. * tests/localization/22.locale.moneypunct.mt.cpp: Ditto. * tests/localization/22.locale.num.get.mt.cpp: Ditto. * tests/localization/22.locale.num.put.mt.cpp: Ditto. * tests/localization/22.locale.numpunct.mt.cpp: Ditto. * tests/localization/22.locale.statics.mt.cpp: Ditto. * tests/localization/22.locale.time.get.mt.cpp: Ditto. * tests/localization/22.locale.time.put.mt.cpp: Ditto. Modified: stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.cons.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.ctype.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.globals.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.messages.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.money.get.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.money.put.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.moneypunct.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.num.get.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.num.put.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.numpunct.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.statics.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.time.get.mt.cpp stdcxx/branches/4.2.x/tests/localization/22.locale.time.put.mt.cpp Modified: stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.mt.cpp?rev=655995r1=655994r2=655995view=diff == --- stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.mt.cpp (original) +++ stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.mt.cpp Tue May 13 13:25:51 2008 @@ -501,7 +501,8 @@ // create and start a pool of threads and wait for them to finish int result = -rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); +rw_thread_pool (0, std::size_t (opt_nthreads), 0, +thread_func, 0, opt_timeout); rw_error (result == 0, 0, __LINE__, rw_thread_pool(0, %d, 0, %{#f}, 0) failed, @@ -515,7 +516,8 @@ test_wchar = true; result = -rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); +rw_thread_pool (0, std::size_t (opt_nthreads), 0, +thread_func, 0, opt_timeout); rw_error (result == 0, 0, __LINE__, rw_thread_pool(0, %d, 0, %{#f}, 0) failed, @@ -530,7 +532,8 @@ test_wchar = true; result = -rw_thread_pool (0, std::size_t (opt_nthreads), 0, thread_func, 0); +rw_thread_pool (0, std::size_t (opt_nthreads), 0, +thread_func, 0, opt_timeout); rw_error (result == 0, 0, __LINE__, rw_thread_pool(0, %d, 0, %{#f}, 0) failed, Modified: stdcxx/branches/4.2.x/tests/localization/22.locale.cons.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/localization/22.locale.cons.mt.cpp?rev=655995r1=655994r2=655995view=diff == --- stdcxx/branches/4.2.x/tests/localization/22.locale.cons.mt.cpp (original) +++ stdcxx/branches/4.2.x/tests/localization/22.locale.cons.mt.cpp Tue May 13 13:25:51 2008 @@ -189,7 +189,7 @@ // create and start a pool of threads and wait for them to finish result = rw_thread_pool (0, std::size_t (opt_nthreads), 0, - test_ctors, 0); + test_ctors, 0, opt_timeout); rw_error (result == 0, 0, __LINE__, rw_thread_pool(0, %d, 0, %{#f}, 0) failed, Modified: stdcxx/branches/4.2.x/tests/localization/22.locale.ctype.mt.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/localization/22.locale.ctype.mt.cpp?rev=655995r1=655994r2=655995view=diff == --- stdcxx/branches/4.2.x/tests/localization/22.locale.ctype.mt.cpp (original) +++ stdcxx/branches/4.2.x/tests/localization/22.locale.ctype.mt.cpp Tue May 13 13:25:51 2008 @@ -266,7
svn propchange: r655960 - svn:log
Author: vitek Revision: 655960 Modified property: svn:log Modified: svn:log at Tue May 13 13:40:36 2008 -- --- svn:log (original) +++ svn:log Tue May 13 13:40:36 2008 @@ -10,9 +10,8 @@ timeout status. (rw_thread_pool): Set alarm based on timeout value provided. * tests/localization/22.locale.codecvt.mt.cpp: Add timeout - option with default value. Pass timeout to rw_thread_pool(). - Poll rw_thread_pool_time_expired() in thread function and - respond. Removed rw_ prefix used by test driver symbols. + option with default value. Poll rw_thread_pool_time_expired() + in thread function and respond. * tests/localization/22.locale.cons.mt.cpp: Ditto. * tests/localization/22.locale.ctype.mt.cpp: Ditto. * tests/localization/22.locale.globals.mt.cpp: Ditto.
svn commit: r653966 - /stdcxx/branches/4.2.x/tests/algorithms/25.random.shuffle.cpp
Author: vitek Date: Tue May 6 19:00:43 2008 New Revision: 653966 URL: http://svn.apache.org/viewvc?rev=653966view=rev Log: 2008-05-06 Travis Vitek [EMAIL PROTECTED] Merged rev 653964 from trunk. 2008-05-06 Travis Vitek [EMAIL PROTECTED] * tests/algorithms/25.random.shuffle.cpp (test_random_shuffle): Break from loop on first assertion failure. Modified: stdcxx/branches/4.2.x/tests/algorithms/25.random.shuffle.cpp Modified: stdcxx/branches/4.2.x/tests/algorithms/25.random.shuffle.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/algorithms/25.random.shuffle.cpp?rev=653966r1=653965r2=653966view=diff == --- stdcxx/branches/4.2.x/tests/algorithms/25.random.shuffle.cpp (original) +++ stdcxx/branches/4.2.x/tests/algorithms/25.random.shuffle.cpp Tue May 6 19:00:43 2008 @@ -307,14 +307,12 @@ }; for (std::size_t i = 0; i != sizeof array / sizeof *array; ++i) { -const bool success = array [i] == result [i]; -if (!success) { -rw_assert (0, 0, line, - randomly shuffled sequence failed to match - the expected result (data portability failure) - %d != %d at %zu, - array [i], result [i], i + 1); -} +if (!rw_assert (array [i] == result [i], 0, line, +randomly shuffled sequence failed to match +the expected result (data portability failure) +%d != %d at %zu, +array [i], result [i], i + 1)) +break; } #else
svn commit: r652585 - /stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.out.cpp
Author: vitek Date: Thu May 1 10:28:02 2008 New Revision: 652585 URL: http://svn.apache.org/viewvc?rev=652585view=rev Log: 2008-05-01 Travis Vitek [EMAIL PROTECTED] STDCXX-842 * tests/localization/22.locale.codecvt.out.cpp: Reserve space for null terminator. Modified: stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.out.cpp Modified: stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.out.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.out.cpp?rev=652585r1=652584r2=652585view=diff == --- stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.out.cpp (original) +++ stdcxx/branches/4.2.x/tests/localization/22.locale.codecvt.out.cpp Thu May 1 10:28:02 2008 @@ -197,7 +197,7 @@ struct WideCode { wchar_t wchar; -charmbchar [MB_LEN_MAX]; +charmbchar [MB_LEN_MAX + 1]; }; typedef WideCode mb_char_array_t [MB_LEN_MAX];
svn commit: r652707 - in /stdcxx/branches/4.2.x: README include/rw/_config.h
Author: vitek Date: Thu May 1 16:25:11 2008 New Revision: 652707 URL: http://svn.apache.org/viewvc?rev=652707view=rev Log: 2008-05-01 Travis Vitek [EMAIL PROTECTED] * include/rw/_config.h (_RWSTD_VER, _RWSTD_VER_STR): Bumped up version to 4.2.2. * README: Ditto. Modified: stdcxx/branches/4.2.x/README stdcxx/branches/4.2.x/include/rw/_config.h Modified: stdcxx/branches/4.2.x/README URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/README?rev=652707r1=652706r2=652707view=diff == --- stdcxx/branches/4.2.x/README (original) +++ stdcxx/branches/4.2.x/README Thu May 1 16:25:11 2008 @@ -1,7 +1,7 @@ $Id$ - Apache C++ Standard Library (STDCXX) 4.2.1 + Apache C++ Standard Library (STDCXX) 4.2.2 -- 0 Index @@ -65,7 +65,7 @@ 1 Contents --- - This file is part of version 4.2.1 of the Apache C++ Standard + This file is part of version 4.2.2 of the Apache C++ Standard Library (STDCXX), an Open Source implementation of the C++ Standard Library conforming to INCITS/ISO/IEC 14882-2003 Programming Languages -- C++. @@ -691,7 +691,7 @@ +- include/*{,.cc}library headers | /config.h generated configuration header +- lib/libstd*.[a|so] archive or .so symbolic link - | libstd*.so.4.2.1 versioned shared library + | libstd*.so.4.2.2 versioned shared library +- nls/*/*codeset and locale databases To specify a subset of locales to install instead of the full set, Modified: stdcxx/branches/4.2.x/include/rw/_config.h URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_config.h?rev=652707r1=652706r2=652707view=diff == --- stdcxx/branches/4.2.x/include/rw/_config.h (original) +++ stdcxx/branches/4.2.x/include/rw/_config.h Thu May 1 16:25:11 2008 @@ -37,7 +37,7 @@ /*** library version numbers and ids **/ -#define _RWSTD_VER 0x04020100 +#define _RWSTD_VER 0x04020200 //| | | | // MMmmuupp //| | | | @@ -47,7 +47,7 @@ //+- MM = major version number // library version string (patch number included only if non-zero) -#define _RWSTD_VER_STR 4.2.1 +#define _RWSTD_VER_STR 4.2.2 // library version numbers #define _RWSTD_VER_MAJOR ((_RWSTD_VER 24) 0xff)
svn commit: r647908 - in /stdcxx/trunk/tests: self/0.printf.cpp src/fmt_defs.h src/printf.cpp
Author: vitek Date: Mon Apr 14 10:15:49 2008 New Revision: 647908 URL: http://svn.apache.org/viewvc?rev=647908view=rev Log: 2008-04-14 Travis Vitek [EMAIL PROTECTED] STDCXX-857 * tests/src/fmt_defs.h: Add flag to struct Buffer to indicate who owns the allocated buffer. * tests/src/printf.cpp (_rw_bufcat): Simplify logic to get new buffer size. Avoid checking guard bytes and deallocating buffer that we do not own. (rw_vasnprintf): Set flag indicating that the caller owns the supplied buffer. (_rw_fmtarray): Ditto. (_rw_fmt_expr): Ditto. * tests/self/0.printf.cpp (test_reallocate): Add new test to verify buffer reallocation works as expected. Modified: stdcxx/trunk/tests/self/0.printf.cpp stdcxx/trunk/tests/src/fmt_defs.h stdcxx/trunk/tests/src/printf.cpp Modified: stdcxx/trunk/tests/self/0.printf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/self/0.printf.cpp?rev=647908r1=647907r2=647908view=diff == --- stdcxx/trunk/tests/self/0.printf.cpp (original) +++ stdcxx/trunk/tests/self/0.printf.cpp Mon Apr 14 10:15:49 2008 @@ -3279,6 +3279,38 @@ /***/ +static void +test_reallocate () +{ +static const char abc[] = ABCDEFGHIJKLMNOPQRSTUVWXYZ; + +char buffer [4] = { 0 }; +char *buf = buffer; + +size_t bufsize = sizeof buffer; + +const int n = rw_asnprintf (buf, bufsize, %s, abc); + +if (n != 26 || strcmp (abc, buf)) { +++nfailures; + +fprintf (stderr, # Assertion failed on line %d: + rw_asnprintf(...) == \%s\, got \%s\\n, + __LINE__, abc, buf); +} + +if (buf != buffer) +free (buf); +else { +++nfailures; + +fprintf (stderr, # Assertion failed on line %d: + rw_asnprintf(...) failed to reallocate buffer\n, + __LINE__); +} +} + + int main () { test_percent (); @@ -3326,6 +3358,8 @@ test_nested_format (); test_malformed_directives (); + +test_reallocate (); // if (nfailures) { Modified: stdcxx/trunk/tests/src/fmt_defs.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/fmt_defs.h?rev=647908r1=647907r2=647908view=diff == --- stdcxx/trunk/tests/src/fmt_defs.h (original) +++ stdcxx/trunk/tests/src/fmt_defs.h Mon Apr 14 10:15:49 2008 @@ -59,6 +59,7 @@ size_t *pbufsize; // pointer to the size of the buffer size_t maxsize;// maximum not-to-exceed size size_t endoff; // offset of the last character +size_t owned; // buffer is owned by caller, don't free it }; // Modified: stdcxx/trunk/tests/src/printf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/printf.cpp?rev=647908r1=647907r2=647908view=diff == --- stdcxx/trunk/tests/src/printf.cpp (original) +++ stdcxx/trunk/tests/src/printf.cpp Mon Apr 14 10:15:49 2008 @@ -450,26 +450,24 @@ size_t guardsize = sizeof guard - 1; -size_t newbufsize = *buf.pbufsize * 2 + guardsize; +size_t newbufsize = *buf.pbufsize * 2; -if (newbufsize = buflen + len + guardsize) -newbufsize = 2 * (buflen + len + 1) + guardsize; +const size_t required = buflen + len; +if (newbufsize required) +newbufsize = required * 2; // prevent buffer size from exceeding the maximum if (buf.maxsize newbufsize) newbufsize = buf.maxsize; -if (newbufsize buflen + len + guardsize) -guardsize = 0; - -if (newbufsize buflen + len + guardsize) { +if (newbufsize required) { #ifdef ENOMEM errno = ENOMEM; #endif // ENOMEM return 0; } -char* const newbuf = (char*)malloc (newbufsize); +char* const newbuf = (char*)malloc (newbufsize + guardsize); // return 0 on failure to allocate, let caller deal with it if (0 == newbuf) @@ -478,17 +476,21 @@ memcpy (newbuf, *buf.pbuf, buflen); // append a guard block to the end of the buffer -memcpy (newbuf + newbufsize - guardsize, guard, guardsize); +memcpy (newbuf + newbufsize, guard, guardsize); -if (*buf.pbuf) { +if (*buf.pbuf !buf.owned) { // verify that we didn't write past the end of the buffer RW_ASSERT (0 == memcmp (*buf.pbuf + *buf.pbufsize, guard, guardsize)); + free (*buf.pbuf
svn commit: r648064 - in /stdcxx/trunk/tests/src: fmt_defs.h printf.cpp
Author: vitek Date: Mon Apr 14 16:49:11 2008 New Revision: 648064 URL: http://svn.apache.org/viewvc?rev=648064view=rev Log: 2008-04-14 Travis Vitek [EMAIL PROTECTED] STDCXX-857 * tests/src/printf.cpp: Revert r647908 which indirectly caused memory leaks in the test driver and several tests. * tests/src/fmt_defs.h: Ditto. Modified: stdcxx/trunk/tests/src/fmt_defs.h stdcxx/trunk/tests/src/printf.cpp Modified: stdcxx/trunk/tests/src/fmt_defs.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/fmt_defs.h?rev=648064r1=648063r2=648064view=diff == --- stdcxx/trunk/tests/src/fmt_defs.h (original) +++ stdcxx/trunk/tests/src/fmt_defs.h Mon Apr 14 16:49:11 2008 @@ -59,7 +59,6 @@ size_t *pbufsize; // pointer to the size of the buffer size_t maxsize;// maximum not-to-exceed size size_t endoff; // offset of the last character -size_t owned; // buffer is owned by caller, don't free it }; // Modified: stdcxx/trunk/tests/src/printf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/printf.cpp?rev=648064r1=648063r2=648064view=diff == --- stdcxx/trunk/tests/src/printf.cpp (original) +++ stdcxx/trunk/tests/src/printf.cpp Mon Apr 14 16:49:11 2008 @@ -450,24 +450,26 @@ size_t guardsize = sizeof guard - 1; -size_t newbufsize = *buf.pbufsize * 2; +size_t newbufsize = *buf.pbufsize * 2 + guardsize; -const size_t required = buflen + len; -if (newbufsize required) -newbufsize = required * 2; +if (newbufsize = buflen + len + guardsize) +newbufsize = 2 * (buflen + len + 1) + guardsize; // prevent buffer size from exceeding the maximum if (buf.maxsize newbufsize) newbufsize = buf.maxsize; -if (newbufsize required) { +if (newbufsize buflen + len + guardsize) +guardsize = 0; + +if (newbufsize buflen + len + guardsize) { #ifdef ENOMEM errno = ENOMEM; #endif // ENOMEM return 0; } -char* const newbuf = (char*)malloc (newbufsize + guardsize); +char* const newbuf = (char*)malloc (newbufsize); // return 0 on failure to allocate, let caller deal with it if (0 == newbuf) @@ -476,21 +478,17 @@ memcpy (newbuf, *buf.pbuf, buflen); // append a guard block to the end of the buffer -memcpy (newbuf + newbufsize, guard, guardsize); +memcpy (newbuf + newbufsize - guardsize, guard, guardsize); -if (*buf.pbuf !buf.owned) { +if (*buf.pbuf) { // verify that we didn't write past the end of the buffer RW_ASSERT (0 == memcmp (*buf.pbuf + *buf.pbufsize, guard, guardsize)); - free (*buf.pbuf); } *buf.pbuf = newbuf; -*buf.pbufsize = newbufsize; - -// we allocated the buffer, so we can free it -buf.owned = 0; +*buf.pbufsize = newbufsize - guardsize; } if (0 != str) { @@ -960,7 +958,7 @@ if (0 == pbufsize) pbufsize = default_bufsize; -Buffer buf = { pbuf, pbufsize, _RWSTD_SIZE_MAX, 0, 1 }; +Buffer buf = { pbuf, pbufsize, _RWSTD_SIZE_MAX, 0 }; // save the initial value of `pbuf' char* const pbuf_save = *buf.pbuf; @@ -1997,7 +1995,7 @@ size_t localbufsize = sizeof elemstr; Buffer bufspec = { -localbuf, localbufsize, sizeof elemstr, 0, 1 +localbuf, localbufsize, sizeof elemstr, 0 }; *localbuf = '\0'; @@ -2055,7 +2053,7 @@ size_t localbufsize = sizeof elemstr; Buffer bufspec = { -localbuf, localbufsize, sizeof elemstr, 0, 1 +localbuf, localbufsize, sizeof elemstr, 0 }; *localbuf = '\0'; @@ -2985,7 +2983,7 @@ const char* const fmt = VA_ARG (*pva, char*); size_t dummy_size = 0; // unused -Buffer tmpbuf = { fmtword, dummy_size, _RWSTD_SIZE_MAX, 0, 1 }; +Buffer tmpbuf = { fmtword, dummy_size, _RWSTD_SIZE_MAX, 0 }; const int len = _rw_pvasnprintf (tmpbuf, fmt, pva); if (len 0) return -1;
svn commit: r648090 - /stdcxx/trunk/tests/self/0.printf.cpp
Author: vitek Date: Mon Apr 14 18:42:48 2008 New Revision: 648090 URL: http://svn.apache.org/viewvc?rev=648090view=rev Log: 2008-04-14 Travis Vitek [EMAIL PROTECTED] STDCXX-857 * tests/self/0.printf.cpp (test_reallocate): Revert test for changes added in r647908. Modified: stdcxx/trunk/tests/self/0.printf.cpp Modified: stdcxx/trunk/tests/self/0.printf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/self/0.printf.cpp?rev=648090r1=648089r2=648090view=diff == --- stdcxx/trunk/tests/self/0.printf.cpp (original) +++ stdcxx/trunk/tests/self/0.printf.cpp Mon Apr 14 18:42:48 2008 @@ -3279,38 +3279,6 @@ /***/ -static void -test_reallocate () -{ -static const char abc[] = ABCDEFGHIJKLMNOPQRSTUVWXYZ; - -char buffer [4] = { 0 }; -char *buf = buffer; - -size_t bufsize = sizeof buffer; - -const int n = rw_asnprintf (buf, bufsize, %s, abc); - -if (n != 26 || strcmp (abc, buf)) { -++nfailures; - -fprintf (stderr, # Assertion failed on line %d: - rw_asnprintf(...) == \%s\, got \%s\\n, - __LINE__, abc, buf); -} - -if (buf != buffer) -free (buf); -else { -++nfailures; - -fprintf (stderr, # Assertion failed on line %d: - rw_asnprintf(...) failed to reallocate buffer\n, - __LINE__); -} -} - - int main () { test_percent (); @@ -3358,8 +3326,6 @@ test_nested_format (); test_malformed_directives (); - -test_reallocate (); // if (nfailures) {
svn commit: r647223 - /stdcxx/trunk/util/locale_stub.cpp
Author: vitek Date: Fri Apr 11 09:50:14 2008 New Revision: 647223 URL: http://svn.apache.org/viewvc?rev=647223view=rev Log: 2008-04-11 Travis Vitek [EMAIL PROTECTED] STDCXX-751 * util/locale_stub.cpp (main): Check pointer validity outside of strcpy argument list to avoid bogus cadvise warning. Modified: stdcxx/trunk/util/locale_stub.cpp Modified: stdcxx/trunk/util/locale_stub.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/locale_stub.cpp?rev=647223r1=647222r2=647223view=diff == --- stdcxx/trunk/util/locale_stub.cpp (original) +++ stdcxx/trunk/util/locale_stub.cpp Fri Apr 11 09:50:14 2008 @@ -59,7 +59,10 @@ slash = std::strrchr (cmdline, '\\'); } -std::strcpy (slash ? slash + 1 : cmdline, localedef); +if (slash) +std::strcpy (slash + 1, localedef); +else +std::strcpy (cmdline, localedef); std::strcat (cmdline, ); std::strcat (cmdline, argv_1);
svn commit: r646567 - /stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp
Author: vitek Date: Wed Apr 9 15:23:18 2008 New Revision: 646567 URL: http://svn.apache.org/viewvc?rev=646567view=rev Log: 2008-04-09 Travis Vitek [EMAIL PROTECTED] STDCXX-783 * tests/algorithms/25.random.shuffle.cpp (test_random_shuffle): Avoid indexing past the end of arrays when evaluating rw_assert() arguments by checking for failure first. Modified: stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp Modified: stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp?rev=646567r1=646566r2=646567view=diff == --- stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp (original) +++ stdcxx/trunk/tests/algorithms/25.random.shuffle.cpp Wed Apr 9 15:23:18 2008 @@ -314,11 +314,14 @@ break; } -rw_assert (success, 0, line, - randomly shuffled sequence failed to match - the expected result (data portability failure) - %d != %d at %zu, - array [i], result [i], i + 1); +if (!success) { +rw_assert (0, 0, line, + randomly shuffled sequence failed to match + the expected result (data portability failure) + %d != %d at %zu, + array [i], result [i], i + 1); +} + #else rw_note (0, 0, 0,
svn commit: r645445 - /stdcxx/trunk/util/output.cpp
Author: vitek Date: Mon Apr 7 03:30:03 2008 New Revision: 645445 URL: http://svn.apache.org/viewvc?rev=645445view=rev Log: 2008-04-07 Travis Vitek [EMAIL PROTECTED] * util/output.cpp (parse_output): Open file in binary mode to avoid problems with line end translation in rbinit() and rbgetc() on windows. (check_test): Remove line end sequence from scan because file opened in binary mode will not have translated line ends. (check_example): Open example output file in binary mode to be consistent with other file that is used for diff. Modified: stdcxx/trunk/util/output.cpp Modified: stdcxx/trunk/util/output.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/output.cpp?rev=645445r1=645444r2=645445view=diff == --- stdcxx/trunk/util/output.cpp (original) +++ stdcxx/trunk/util/output.cpp Mon Apr 7 03:30:03 2008 @@ -318,7 +318,7 @@ return; } -if (!rbscanf (buf, | INACTIVE |\n# +)) { +if (!rbscanf (buf, | INACTIVE |)) { status-status = ST_FORMAT; return; } @@ -483,7 +483,7 @@ } } -fref = fopen (ref_name, r); +fref = fopen (ref_name, rb); if (0 == fref) { int cache = errno; /* caching errno, as puts could alter it */ @@ -548,7 +548,7 @@ assert (0 != options-argv [0]); out_name = output_name (options-argv [0]); -data = fopen (out_name, r); +data = fopen (out_name, rb); if (0 == data) { if (ENOENT != errno)
svn commit: r645659 - in /stdcxx/trunk/tests/localization: 22.locale.ctype.cpp 22.locale.ctype.is.cpp 22.locale.ctype.narrow.cpp 22.locale.ctype.scan.cpp 22.locale.ctype.tolower.cpp 22.locale.ctype.to
Author: vitek Date: Mon Apr 7 12:40:18 2008 New Revision: 645659 URL: http://svn.apache.org/viewvc?rev=645659view=rev Log: 2008-04-07 Travis Vitek [EMAIL PROTECTED] * tests/localization/22.locale.ctype.cpp: Cache result of call to rw_locale_query() reduce time needed to run test. * tests/localization/22.locale.ctype.is.cpp: Ditto. * tests/localization/22.locale.ctype.narrow.cpp: Ditto. * tests/localization/22.locale.ctype.scan.cpp: Ditto. * tests/localization/22.locale.ctype.toupper.cpp: Ditto. * tests/localization/22.locale.ctype.tolower.cpp: Ditto. Modified: stdcxx/trunk/tests/localization/22.locale.ctype.cpp stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp Modified: stdcxx/trunk/tests/localization/22.locale.ctype.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.cpp?rev=645659r1=645658r2=645659view=diff == --- stdcxx/trunk/tests/localization/22.locale.ctype.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.cpp Mon Apr 7 12:40:18 2008 @@ -83,8 +83,11 @@ {zh-CN-*-{GB*,UTF-8,CP125?}}, \ {ru-RU-*-{KOI*,UTF-8,CP125?}}} +const char* locale_list = 0; + #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)\ - for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES); \ + if (!locale_list) locale_list = rw_locale_query (LC_CTYPE, LOCALES);\ + for (const char* locname = locale_list; \ locname *locname; locname += std::strlen (locname) + 1) { \ _TRY { \ const std::locale loc (locname);\ Modified: stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp?rev=645659r1=645658r2=645659view=diff == --- stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp Mon Apr 7 12:40:18 2008 @@ -83,8 +83,11 @@ {zh-CN-*-{GB*,UTF-8,CP125?}}, \ {ru-RU-*-{KOI*,UTF-8,CP125?}}} +const char* locale_list = 0; + #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)\ - for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES); \ + if (!locale_list) locale_list = rw_locale_query (LC_CTYPE, LOCALES);\ + for (const char* locname = locale_list; \ locname *locname; locname += std::strlen (locname) + 1) { \ _TRY { \ const std::locale loc (locname);\ Modified: stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp?rev=645659r1=645658r2=645659view=diff == --- stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp Mon Apr 7 12:40:18 2008 @@ -83,8 +83,11 @@ {zh-CN-*-{GB*,UTF-8,CP125?}}, \ {ru-RU-*-{KOI*,UTF-8,CP125?}}} +const char* locale_list = 0; + #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)\ - for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES); \ + if (!locale_list) locale_list = rw_locale_query (LC_CTYPE, LOCALES);\ + for (const char* locname = locale_list; \ locname *locname; locname += std::strlen (locname) + 1) { \ _TRY { \ const std::locale loc (locname);\ Modified: stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp?rev=645659r1=645658r2=645659view=diff == --- stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp Mon Apr 7 12:40:18 2008 @@ -83,8 +83,11 @@ {zh-CN-*-{GB*,UTF-8,CP125
svn commit: r645750 - in /stdcxx/trunk/tests: diagnostics/19.std.exceptions.cpp support/18.support.dynamic.cpp support/18.support.rtti.cpp
Author: vitek Date: Mon Apr 7 18:05:14 2008 New Revision: 645750 URL: http://svn.apache.org/viewvc?rev=645750view=rev Log: 2008-04-07 Travis Vitek [EMAIL PROTECTED] * tests/support/18.support.dynamic.cpp: New test exercising functions and types for dynamic storage management. * tests/support/18.support.rtti.cpp: New test exercising types for dynamic type information support. * tests/diagnostics/19.std.exceptions.cpp: New test exercising standard exception types. Added: stdcxx/trunk/tests/diagnostics/19.std.exceptions.cpp (with props) stdcxx/trunk/tests/support/18.support.dynamic.cpp (with props) stdcxx/trunk/tests/support/18.support.rtti.cpp (with props) Added: stdcxx/trunk/tests/diagnostics/19.std.exceptions.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/diagnostics/19.std.exceptions.cpp?rev=645750view=auto == --- stdcxx/trunk/tests/diagnostics/19.std.exceptions.cpp (added) +++ stdcxx/trunk/tests/diagnostics/19.std.exceptions.cpp Mon Apr 7 18:05:14 2008 @@ -0,0 +1,458 @@ +/*** + * + * 19.std.exceptions.cpp - test exercising [lib.std.exceptions] + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 2001-2008 Rogue Wave Software. + * + **/ + +#include stdexcept + +/**/ + + +template class Exception +int test_ex_spec (Exception*, const char *str) +{ +#ifndef _RWSTD_NO_EXCEPTIONS + +try { +// also tests that exception objects can be constructed +// from a const char* argument w/o string having been +// explicitly #included first +Exception e (str); +(void)e; +} +catch (...) { +return 1; +} + +#else // if defined (_RWSTD_NO_EXCEPTIONS); + +_RWSTD_UNUSED (str); + +#endif // _RWSTD_NO_EXCEPTIONS + +return 0; +} + +/**/ + +#include string + +/**/ + + +// helpers to verify that each exception's ctor is explicit +// not defined since they must not be referenced if test is successful +void is_explicit (const std::logic_error); +void is_explicit (const std::domain_error); +void is_explicit (const std::invalid_argument); +void is_explicit (const std::length_error); +void is_explicit (const std::out_of_range); +void is_explicit (const std::runtime_error); +void is_explicit (const std::range_error); +void is_explicit (const std::overflow_error); +void is_explicit (const std::underflow_error); + +struct bogus_exception +{ +// also verifies that std::string is declared +bogus_exception (const std::string) { } +bogus_exception (const char*) { } +}; + +// calls to the overoaded is_explicit (std::string ()) must resolve +// to this function since there must be no implicit conversion from +// std::string to any of the exception classes +void is_explicit (const bogus_exception) { } + +// exercise the ability to construct exception objects w/o +// explicitly #including string first; std::string must still +// be declared (but not necessarily defined) + +#if !defined (_RWSTD_NO_NAMESPACE) !defined (_RWSTD_NO_HONOR_STD) + // declare a global function with the same name as exception +# define TEST_NAMESPACE_DEF(T) void T () +#else +# define TEST_NAMESPACE_DEF(ignore) (void)0 +#endif // !_RWSTD_NO_NAMESPACE !_RWSTD_NO_HONOR_STD + + +#ifndef _RWSTD_NO_PTR_EXCEPTION_SPEC +# define _PTR_THROWS(spec) _THROWS (spec) +#else // if defined (_RWSTD_NO_PTR_EXCEPTION_SPEC) + // throw specs on pointers to functions not implemented... +# define _PTR_THROWS(ignore) +#endif // _RWSTD_NO_PTR_EXCEPTION_SPEC + + +// verify that each name is declared in namespace std +// w/o polluting the global namespace +#define TEST_DEF(T
svn commit: r644821 - /stdcxx/trunk/tests/src/locale.cpp
Author: vitek Date: Fri Apr 4 11:52:32 2008 New Revision: 644821 URL: http://svn.apache.org/viewvc?rev=644821view=rev Log: 2008-04-04 Travis Vitek [EMAIL PROTECTED] STDCXX-755 * tests/src/locale.cpp (rw_locales): Check return from malloc() (_rw_all_locales): Ditto. Modified: stdcxx/trunk/tests/src/locale.cpp Modified: stdcxx/trunk/tests/src/locale.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/locale.cpp?rev=644821r1=644820r2=644821view=diff == --- stdcxx/trunk/tests/src/locale.cpp (original) +++ stdcxx/trunk/tests/src/locale.cpp Fri Apr 4 11:52:32 2008 @@ -373,6 +373,10 @@ // allocate first time through if (!slocname) { slocname = _RWSTD_STATIC_CAST (char*, _QUIET_MALLOC (total_size)); + +if (!slocname) +return deflocname; + *slocname = '\0'; } @@ -468,6 +472,8 @@ char* tmp = _RWSTD_STATIC_CAST (char*, _QUIET_MALLOC (total_size)); +if (!tmp) +break; memcpy (tmp, slocname, total_size - grow_size); @@ -1124,7 +1130,7 @@ _RWSTD_STATIC_CAST(_rw_locale_entry*, _QUIET_MALLOC (entry_size * capacity)); if (!new_entries) { -return result; // allocation failed +break; } memcpy (new_entries, entries, entry_size * size); @@ -1639,3 +1645,5 @@ return true; } + +
svn commit: r645002 - /stdcxx/trunk/util/output.cpp
Author: vitek Date: Fri Apr 4 17:25:08 2008 New Revision: 645002 URL: http://svn.apache.org/viewvc?rev=645002view=rev Log: 2008-04-04 Travis Vitek [EMAIL PROTECTED] * util/output.cpp (parse_output): Revert recent change to open file in binary mode. Modified: stdcxx/trunk/util/output.cpp Modified: stdcxx/trunk/util/output.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/output.cpp?rev=645002r1=645001r2=645002view=diff == --- stdcxx/trunk/util/output.cpp (original) +++ stdcxx/trunk/util/output.cpp Fri Apr 4 17:25:08 2008 @@ -548,7 +548,7 @@ assert (0 != options-argv [0]); out_name = output_name (options-argv [0]); -data = fopen (out_name, rb); +data = fopen (out_name, r); if (0 == data) { if (ENOENT != errno)
svn commit: r643573 - /stdcxx/trunk/tests/localization/22.locale.messages.cpp
Author: vitek Date: Tue Apr 1 14:10:14 2008 New Revision: 643573 URL: http://svn.apache.org/viewvc?rev=643573view=rev Log: 2008-04-01 Travis Vitek [EMAIL PROTECTED] STDCXX-742 * tests/localization/22.locale.messages.cpp (run_test): Avoid use_facet() and has_facet() when _RWSTD_NO_DYNAMIC_CAST is defined. Modified: stdcxx/trunk/tests/localization/22.locale.messages.cpp Modified: stdcxx/trunk/tests/localization/22.locale.messages.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.messages.cpp?rev=643573r1=643572r2=643573view=diff == --- stdcxx/trunk/tests/localization/22.locale.messages.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.messages.cpp Tue Apr 1 14:10:14 2008 @@ -827,6 +827,18 @@ #endif// _RWSTD_OS_AIX +#ifdef _RWSTD_NO_DYNAMIC_CAST + +// if dynamic_cast isn't supported then has_facet() can't +// reliably detect if a facet is installed or not. +rw_warn (0 != opt_has_facet, 0, __LINE__, + dynamic_cast not supported, disabling has_facet tests); + +opt_has_facet = -1; + +#endif// _RWSTD_NO_DYNAMIC_CAST + + for (int i = 0; i MAX_SETS; ++i) { for (int j = 0; j MAX_MESSAGES; ++j) catalog.append (messages [i][j], std::strlen (messages [i][j]) + 1);
svn commit: r643199 - in /stdcxx/trunk/etc/nls: countries languages
Author: vitek Date: Mon Mar 31 16:01:31 2008 New Revision: 643199 URL: http://svn.apache.org/viewvc?rev=643199view=rev Log: 2008-03-31 Travis Vitek [EMAIL PROTECTED] STDCXX-715 * etc/nls/countries: Fix error in countries list. * etc/nls/languages: Ditto. Modified: stdcxx/trunk/etc/nls/countries stdcxx/trunk/etc/nls/languages Modified: stdcxx/trunk/etc/nls/countries URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/nls/countries?rev=643199r1=643198r2=643199view=diff == --- stdcxx/trunk/etc/nls/countries (original) +++ stdcxx/trunk/etc/nls/countries Mon Mar 31 16:01:31 2008 @@ -163,7 +163,7 @@ LVLatvia LYLibyan Arab Jamahiriya MAMorocco -MCMonaco Principality of Monaco +MCMonaco, Principality of Monaco MDRepublic of Moldova MEMontenegro MFSaint Martin Modified: stdcxx/trunk/etc/nls/languages URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/nls/languages?rev=643199r1=643198r2=643199view=diff == --- stdcxx/trunk/etc/nls/languages (original) +++ stdcxx/trunk/etc/nls/languages Mon Mar 31 16:01:31 2008 @@ -214,6 +214,8 @@ # this is just so we have a mapping. it is not accurate without an ISO-639-2 mapping -stNorthern, Sotho +stNorthern Sotho seSami (Inari), Sami (Lule), Sami (Northern), Sami (Skolt), Sami (Southern) srSerbian (Cyrillic), Serbian (Latin) +uzUzbek (Latin), Uzbek (Cyrillic) +azAzeri (Latin), Azeri (Cyrillic) \ No newline at end of file
svn commit: r643214 - in /stdcxx/trunk/tests: localization/ src/
Author: vitek Date: Mon Mar 31 16:56:14 2008 New Revision: 643214 URL: http://svn.apache.org/viewvc?rev=643214view=rev Log: 2008-03-31 Travis Vitek [EMAIL PROTECTED] STDCXX-716 * tests/src/locale.cpp: Add functions _rw_isspace(), _rw_toupper() and _rw_tolower() to avoid problems when sign extending character to int. (_rw_all_locales): Avoid using uninitialized struct member in calls to rw_note(). Use _rw_isspace(), _rw_toupper() and _rw_tolower(). Remove duplicate locales using canonical locale name matching. (rw_locale_query): Use larger buffer for cached locale name to avoid buffer overflow. Remember to close file on error condition. Use _rw_isspace(), _rw_toupper() and _rw_tolower(). * tests/localization/22.locale.ctype.tolower.cpp: Use rw_locale_query() to select a subset of installed locales. (run_test): Call test_libc() before test_libstd() to avoid problem with our locale utility on windows that causes only C locale to be returned. * tests/localization/22.locale.ctype.toupper.cpp: Ditto. * tests/localization/22.locale.ctype.scan.cpp: Ditto. * tests/localization/22.locale.ctype.cpp: Ditto. * tests/localization/22.locale.ctype.narrow.cpp: Ditto. * tests/localization/22.locale.ctype.is.cpp: Ditto. * tests/localization/22.locale.time.get.cpp: Ditto. Modified: stdcxx/trunk/tests/localization/22.locale.ctype.cpp stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp stdcxx/trunk/tests/localization/22.locale.time.get.cpp stdcxx/trunk/tests/src/locale.cpp Modified: stdcxx/trunk/tests/localization/22.locale.ctype.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.cpp?rev=643214r1=643213r2=643214view=diff == --- stdcxx/trunk/tests/localization/22.locale.ctype.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.cpp Mon Mar 31 16:56:14 2008 @@ -67,7 +67,7 @@ #include driver.h #include file.h// for SLASH -#include rw_locale.h // for rw_locales() +#include rw_locale.h // for rw_locale_query() /**/ @@ -78,8 +78,13 @@ #define NLOOPS 25 #define MAX_STR_SIZE 16 +#define LOCALES {{en-US,de-DE,fr-FR,es-ES}-*-{ISO-8859-*,UTF-8,CP125?}, \ + {ja-JP-*-{EUC-JP,SHIFT_JIS,UTF-8,CP125?}}, \ + {zh-CN-*-{GB*,UTF-8,CP125?}}, \ + {ru-RU-*-{KOI*,UTF-8,CP125?}}} + #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)\ - for (const char* locname = rw_locales (LC_CTYPE, 0);\ + for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES); \ locname *locname; locname += std::strlen (locname) + 1) { \ _TRY { \ const std::locale loc (locname);\ Modified: stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp?rev=643214r1=643213r2=643214view=diff == --- stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp Mon Mar 31 16:56:14 2008 @@ -67,7 +67,7 @@ #include driver.h #include file.h// for SLASH -#include rw_locale.h // for rw_locales() +#include rw_locale.h // for rw_locale_query() /**/ @@ -78,8 +78,13 @@ #define NLOOPS 25 #define MAX_STR_SIZE 16 +#define LOCALES {{en-US,de-DE,fr-FR,es-ES}-*-{ISO-8859-*,UTF-8,CP125?}, \ + {ja-JP-*-{EUC-JP,SHIFT_JIS,UTF-8,CP125?}}, \ + {zh-CN-*-{GB*,UTF-8,CP125?}}, \ + {ru-RU-*-{KOI*,UTF-8,CP125?}}} + #define BEGIN_LOCALE_LOOP(num, locname, loop_cntrl)\ - for (const char* locname = rw_locales (LC_CTYPE, 0);\ + for (const char* locname = rw_locale_query (LC_CTYPE, LOCALES); \ locname *locname; locname += std::strlen (locname) + 1) { \ _TRY { \ const std::locale loc (locname);\ Modified: stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp URL: http://svn.apache.org/viewvc
svn commit: r642006 - in /stdcxx/trunk/tests: include/rw_locale.h src/locale.cpp
Author: vitek Date: Thu Mar 27 15:25:50 2008 New Revision: 642006 URL: http://svn.apache.org/viewvc?rev=642006view=rev Log: 2008-03-27 Travis Vitek [EMAIL PROTECTED] STDCXX-716 * tests/include/rw_locale.h (rw_query_locales): Add declaration of new function. * tests/src/locale.cpp (atexit_rm_locale_root): Temporarily disable disgnostic messages to avoid warnings that occur because function is called after run_test() has returned. (rw_query_locales): Add new function to query installed locales by language, country, codeset or MB_CUR_LEN. Modified: stdcxx/trunk/tests/include/rw_locale.h stdcxx/trunk/tests/src/locale.cpp Modified: stdcxx/trunk/tests/include/rw_locale.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/include/rw_locale.h?rev=642006r1=642005r2=642006view=diff == --- stdcxx/trunk/tests/include/rw_locale.h (original) +++ stdcxx/trunk/tests/include/rw_locale.h Thu Mar 27 15:25:50 2008 @@ -36,6 +36,13 @@ #define _UNUSED_CAT 69 +// get a list of all native locales that match the cannonical +// locale name query strings +_TEST_EXPORT char* +rw_locale_query (int = _UNUSED_CAT, const char* = 0, _RWSTD_SIZE_T = 0); + + +// this function will likely be deprecated! _TEST_EXPORT char* rw_locales (int = _UNUSED_CAT, const char* = 0, bool = true); Modified: stdcxx/trunk/tests/src/locale.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/locale.cpp?rev=642006r1=642005r2=642006view=diff == --- stdcxx/trunk/tests/src/locale.cpp (original) +++ stdcxx/trunk/tests/src/locale.cpp Thu Mar 27 15:25:50 2008 @@ -36,6 +36,8 @@ #include file.h // for SHELL_RM_RF, rw_tmpnam #include rw_process.h // for rw_system() #include rw_printf.h// for rw_snprintf() +#include rw_fnmatch.h // for rw_fnmatch() +#include rw_braceexp.h // for rw_shell_expand() #include driver.h // for rw_error() #ifdef _RWSTD_OS_LINUX @@ -79,12 +81,15 @@ # ifndef LC_MESSAGES #define LC_MESSAGES _RWSTD_LC_MESSAGES # endif // LC_MESSAGES -# include langinfo.h # define EXE_SUFFIX #else // if MSVC +# define _RWSTD_NO_LANGINFO # define EXE_SUFFIX.exe #endif // _MSC_VER +#ifndef _RWSTD_NO_LANGINFO +# include langinfo.h +#endif #if !defined (PATH_MAX) || PATH_MAX 128 || 4096 PATH_MAX // deal with undefined, bogus, or excessive values @@ -288,8 +293,14 @@ static void atexit_rm_locale_root () { +const bool e = rw_enable (rw_error, false); +const bool n = rw_enable (rw_note , false); + // remove temporary locale databases created by the test rw_system (SHELL_RM_RF %s, rw_locale_root); + +rw_enable (rw_note , n); +rw_enable (rw_error, e); } } @@ -388,16 +399,16 @@ return deflocname; // error } -// make sure that grep_exp is = 80 +// make sure that grep_exp is = 80 if (grep_exp 80 strlen (grep_exp)) { abort (); } // execute a shell command and redirect its output into the file const int exit_status = - grep_exp *grep_exp -? rw_system (locale -a | grep \%s\ %s, grep_exp, fname) -: rw_system (locale -a %s, fname); +grep_exp *grep_exp + ? rw_system (locale -a | grep \%s\ %s, grep_exp, fname) + : rw_system (locale -a %s, fname); if (exit_status) { return deflocname; // error @@ -930,4 +941,701 @@ remove (catname); return ret; +} + + +// our locale database is a big array of these +struct _rw_locale_entry { +char locale_name[64]; // English_United States.1252 +char canonical_name [32]; // en-US-1-1252 +struct _rw_locale_entry* next; +}; + +static int +_rw_toupper (int chr) +{ +//if (chr 'a' || 'z' chr) +//return chr; +//return chr - 'a' + 'A'; +switch (chr) +{ +case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': +case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': +case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': +case 's': case 't': case 'u': case 'v': case 'w': case 'x': +case 'y': case 'z': +return chr - 'a' + 'A'; +} + +return chr; +} + +static int +_rw_tolower (int chr) +{ +//if (chr 'A' || 'Z' chr) +//return chr; +//return chr - 'A' + 'a'; +switch (chr) +{ +case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': +case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': +case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': +case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': +case 'Y': case 'Z': +return chr - 'A' + 'a'; +} + +return chr; +} + +static int +_rw_isspace (int chr) +{ +switch (chr) +{ +case '\r': +case '\n': +case '\t': +case
Re: svn commit: r640122 - /stdcxx/trunk/include/ansi/climits
sebor-2 wrote: Author: sebor Date: Sat Mar 22 16:45:59 2008 New Revision: 640122 URL: http://svn.apache.org/viewvc?rev=640122view=rev Log: 2008-03-22 Martin Sebor [EMAIL PROTECTED] STDCXX-768 * include/ansi/climits: Used gcc's #include_next to include the compiler's limits.h header and to prevent the gcc 4.3 error: no include path in which to search for limits.h. Modified: stdcxx/trunk/include/ansi/climits This change causes a new warning to appear when building tests/examples. We may want to suppress it... $ gcc --version gmake 22.locale.codecvt.out.o gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gcc -c -I/amd/devco/vitek/stdcxx/trunk/include/ansi -D_RWSTDDEBUG -I/amd/devco/vitek/stdcxx/trunk/include -I/build/vitek/11s/include -I/amd/devco/vitek/stdcxx/trunk/tests/include -pedantic -nostdinc++ -g -m32 -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /amd/devco/vitek/stdcxx/trunk/tests/localization/22.locale.codecvt.out.cpp In file included from /nfs/devco/vitek/stdcxx/trunk/tests/localization/22.locale.codecvt.out.cpp:36: /nfs/devco/vitek/stdcxx/trunk/include/ansi/climits:108:6: warning: #include_next is a GCC extension $ -- View this message in context: http://www.nabble.com/svn-commit%3A-r640122stdcxx-trunk-include-ansi-climits-tp16229170p16310492.html Sent from the stdcxx-commits mailing list archive at Nabble.com.
svn commit: r641598 - in /stdcxx/trunk/tests: include/driver.h src/driver.cpp
Author: vitek Date: Wed Mar 26 15:10:43 2008 New Revision: 641598 URL: http://svn.apache.org/viewvc?rev=641598view=rev Log: 2008-03-26 Travis Vitek [EMAIL PROTECTED] * tests/src/driver.cpp (rw_enable): Return previous state for the diagnostic so it can be safely disabled and restored. * tests/include/driver.h (rw_enable): Ditto. Update comments. Modified: stdcxx/trunk/tests/include/driver.h stdcxx/trunk/tests/src/driver.cpp Modified: stdcxx/trunk/tests/include/driver.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/include/driver.h?rev=641598r1=641597r2=641598view=diff == --- stdcxx/trunk/tests/include/driver.h (original) +++ stdcxx/trunk/tests/include/driver.h Wed Mar 26 15:10:43 2008 @@ -159,13 +159,21 @@ rw_info (int, const char*, int, const char*, ...); /** -* Enable/disable the specified diagnostics -* -* Example: -* rw_enable (rw_error, false); // disable all rw_error diagnostics -* rw_enable (rw_error);// enable all rw_error diagnostics -*/ -_TEST_EXPORT void -rw_enable (int (*) (int, const char*, int, const char*, ...), bool = true); + * Enable/disable the specified diagnostic. + * + * @param fun Diagnostic function to enable or disable. Must be one of + *rw_fatal, rw_error, rw_assert, rw_warn, rw_note or rw_info. + * @param enable Flag to indicate that the diagnostic function should + *be enabled or disabled. + * @return Returns the previous state of the diagnostic. If the first + *parameter is not an acceptable input, will return false. + * + * Example: + * rw_enable (rw_error, false); // disable all rw_error diagnostics + * rw_enable (rw_error);// enable all rw_error diagnostics + */ +_TEST_EXPORT bool +rw_enable (int (*fun) (int, const char*, int, const char*, ...), + bool enable = true); #endif // RW_DRIVER_H_INCLUDED Modified: stdcxx/trunk/tests/src/driver.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/driver.cpp?rev=641598r1=641597r2=641598view=diff == --- stdcxx/trunk/tests/src/driver.cpp (original) +++ stdcxx/trunk/tests/src/driver.cpp Wed Mar 26 15:10:43 2008 @@ -1540,7 +1540,7 @@ // -_TEST_EXPORT void +_TEST_EXPORT bool rw_enable (int (*fun) (int, const char*, int, const char*, ...), bool enable) { diag_t diag; @@ -1559,12 +1559,16 @@ diag = diag_info; else { RW_ASSERT (!Invalid function in rw_enable); -return; +return false; } +const bool enabled = 0 != (_rw_diag_ignore (1 diag)); + // if (enable) // _rw_diag_ignore = ~(1 diag); // else // _rw_diag_ignore |= 1 diag; _rw_diag_ignore ^= ((enable - 1) ^ _rw_diag_ignore) (1 diag); + +return enabled; }
svn commit: r640522 - in /stdcxx/branches/4.2.x: include/rw/_tree.cc tests/regress/23.set.stdcxx-216.cpp
Author: vitek Date: Mon Mar 24 12:00:16 2008 New Revision: 640522 URL: http://svn.apache.org/viewvc?rev=640522view=rev Log: 2008-03-24 Travis Vitek [EMAIL PROTECTED] Merged rev 639495 from trunk 2008-03-20 Travis Vitek [EMAIL PROTECTED] * tests/regress/23.set.stdcxx-216.cpp: Add regression test for issue caused by fix to STDCXX-216. * include/rw/_tree.cc: (insert): Ensure tree is not empty before comparing keys to avoid uninitialized memory read. Added: stdcxx/branches/4.2.x/tests/regress/23.set.stdcxx-216.cpp - copied unchanged from r639495, stdcxx/trunk/tests/regress/23.set.stdcxx-216.cpp Modified: stdcxx/branches/4.2.x/include/rw/_tree.cc Modified: stdcxx/branches/4.2.x/include/rw/_tree.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_tree.cc?rev=640522r1=640521r2=640522view=diff == --- stdcxx/branches/4.2.x/include/rw/_tree.cc (original) +++ stdcxx/branches/4.2.x/include/rw/_tree.cc Mon Mar 24 12:00:16 2008 @@ -350,11 +350,15 @@ const _C_link_t __hint = _ITER_NODE (__it); -// if __hint is the right most child and __key is greater, -// then insert on the right +// if __hint is the right most child, or tree is empty if (__hint == _C_end-_C_child [1]) { -if (_C_cmp (__hint-_C_key (), _KeyOf ()(__v))) + +// if tree is not empty and __key is greater +// then insert on the right +if (_C_size _C_cmp (__hint-_C_key (), _KeyOf ()(__v))) return _C_insert (0, __hint, __v); + +// otherwise just insert return insert (__v, __dup).first; } @@ -366,10 +370,10 @@ return insert (__v, __dup).first; } -// if __hint is the leftmost child and __key is less +// if __hint is the left most child and __key is less // then insert on the left if (__hint == _C_end-_C_child [0]) { -if (size () _C_cmp (_KeyOf ()(__v), __hint-_C_key ())) +if (_C_cmp (_KeyOf ()(__v), __hint-_C_key ())) return _C_insert (__hint, __hint, __v); return insert (__v, __dup).first; }
svn commit: r640567 - /stdcxx/trunk/tests/src/braceexp.cpp
Author: vitek Date: Mon Mar 24 13:46:18 2008 New Revision: 640567 URL: http://svn.apache.org/viewvc?rev=640567view=rev Log: 2008-03-24 Travis Vitek [EMAIL PROTECTED] STDCXX-784 * tests/src/braceexp.cpp: Work around SunPro bug that causes a compile failure when using private declarations in nested types. Modified: stdcxx/trunk/tests/src/braceexp.cpp Modified: stdcxx/trunk/tests/src/braceexp.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/braceexp.cpp?rev=640567r1=640566r2=640567view=diff == --- stdcxx/trunk/tests/src/braceexp.cpp (original) +++ stdcxx/trunk/tests/src/braceexp.cpp Mon Mar 24 13:46:18 2008 @@ -261,11 +261,12 @@ const char* end, char* buf, _RWSTD_SIZE_T len, char sep); -private: -// not implemented -_rw_brace_graph (const _rw_brace_graph); -_rw_brace_graph operator= (const _rw_brace_graph); +# if defined(__SUNPRO_CC) (__SUNPRO_CC 0x570) +public: +# else +private: +# endif // __SUNPRO_CC 0x560 __SUNPRO_CC // node for a directed-acyclic-graph that we build from the original // brace expression @@ -278,6 +279,15 @@ _rw_brace_node* child_; }; +// the number of nodes held by each brace buffer [see below] +enum { size = 64 }; + +private: + +// not implemented +_rw_brace_graph (const _rw_brace_graph); +_rw_brace_graph operator= (const _rw_brace_graph); + // retrieve a new node. nodes are allocated in large blocks. those // blocks are deallocated when this graph instance is destroyed. // and they are reused for every build_and_expand() call. @@ -305,9 +315,6 @@ // format is `{a,b[,c]}suffix', where `a', `b' and `c' are full // brace expansions that would be processed by build_anything. _rw_brace_node* build_list (const char* beg, const char* end); - -// the number of nodes held by each brace buffer [see below] -enum { size = 64 }; // this is essentially a rope with a fixed length payload of // brace nodes
svn commit: r639495 - in /stdcxx/trunk: include/rw/_tree.cc tests/regress/23.set.stdcxx-216.cpp
Author: vitek Date: Thu Mar 20 15:53:27 2008 New Revision: 639495 URL: http://svn.apache.org/viewvc?rev=639495view=rev Log: 2008-03-20 Travis Vitek [EMAIL PROTECTED] * tests/regress/23.set.stdcxx-216.cpp: Add regression test for issue caused by fix to STDCXX-216. * include/rw/_tree.cc: (insert): Ensure tree is not empty before comparing keys to avoid umr. Added: stdcxx/trunk/tests/regress/23.set.stdcxx-216.cpp (with props) Modified: stdcxx/trunk/include/rw/_tree.cc Modified: stdcxx/trunk/include/rw/_tree.cc URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_tree.cc?rev=639495r1=639494r2=639495view=diff == --- stdcxx/trunk/include/rw/_tree.cc (original) +++ stdcxx/trunk/include/rw/_tree.cc Thu Mar 20 15:53:27 2008 @@ -350,11 +350,15 @@ const _C_link_t __hint = _ITER_NODE (__it); -// if __hint is the right most child and __key is greater, -// then insert on the right +// if __hint is the right most child, or tree is empty if (__hint == _C_end-_C_child [1]) { -if (_C_cmp (__hint-_C_key (), _KeyOf ()(__v))) + +// if tree is not empty and __key is greater +// then insert on the right +if (_C_size _C_cmp (__hint-_C_key (), _KeyOf ()(__v))) return _C_insert (0, __hint, __v); + +// otherwise just insert return insert (__v, __dup).first; } @@ -366,10 +370,10 @@ return insert (__v, __dup).first; } -// if __hint is the leftmost child and __key is less +// if __hint is the left most child and __key is less // then insert on the left if (__hint == _C_end-_C_child [0]) { -if (size () _C_cmp (_KeyOf ()(__v), __hint-_C_key ())) +if (_C_cmp (_KeyOf ()(__v), __hint-_C_key ())) return _C_insert (__hint, __hint, __v); return insert (__v, __dup).first; } Added: stdcxx/trunk/tests/regress/23.set.stdcxx-216.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/regress/23.set.stdcxx-216.cpp?rev=639495view=auto == --- stdcxx/trunk/tests/regress/23.set.stdcxx-216.cpp (added) +++ stdcxx/trunk/tests/regress/23.set.stdcxx-216.cpp Thu Mar 20 15:53:27 2008 @@ -0,0 +1,135 @@ +/*** + * + * 23.set.stdcxx-216.cpp - regression test for STDCXX-216 + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 1994-2008 Rogue Wave Software. + * + **/ + +#include set +#include cassert + +struct Value +{ +static const unsigned magic = 0x12344321; + +Value (unsigned value = 0) +: value (value) +, valid (magic) +{ +} + +Value (const Value key) +: value (key.value) +, valid (key.magic) +{ +} + +Value operator= (const Value rhs) +{ +// assignment only valid from valid values +assert (rhs.is_valid ()); + +value = rhs.value; +valid = rhs.valid; +return *this; +} + +~Value () +{ +// destruction only allowed for valid values +assert (is_valid ()); + +valid = 0; +} + +bool is_valid () const +{ +return valid == magic; +} + +friend +bool operator (const Value lhs, const Value rhs) +{ +// comparing against an invalid value is forbidden +assert (lhs.is_valid ()); +assert (rhs.is_valid ()); + +const int lhs_is_odd = lhs.value 1; +const int rhs_is_odd = rhs.value 1; + +// sort all even numbers in ascending order +// followed by odd numbers in ascending order +return lhs_is_odd != rhs_is_odd + ? lhs_is_odd rhs_is_odd + : lhs.valuerhs.value; +} + +unsigned value; +unsigned valid; +}; + +//#include iostream +// +//void dump (const std::setValue s) +//{ +//std::setValue
svn commit: r631793 - /stdcxx/trunk/etc/config/xfail.txt
Author: vitek Date: Wed Feb 27 16:53:50 2008 New Revision: 631793 URL: http://svn.apache.org/viewvc?rev=631793view=rev Log: 2008-02-27 Travis Vitek [EMAIL PROTECTED] STDCXX-360 * etc/config/xfail.txt: Add expected compile failure for 2.smartptr.shared on VisualAge C++ 6 debug builds. Modified: stdcxx/trunk/etc/config/xfail.txt Modified: stdcxx/trunk/etc/config/xfail.txt URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/xfail.txt?rev=631793r1=631792r2=631793view=diff == --- stdcxx/trunk/etc/config/xfail.txt (original) +++ stdcxx/trunk/etc/config/xfail.txt Wed Feb 27 16:53:50 2008 @@ -40,5 +40,6 @@ # NAME PLATFORM AND BUILD TYPE STATUSNUMBER # -- -- 0.process aix-5.3-*-vacpp-9.0-* SEGV STDCXX-625 +2.smartptr.shared aix-*-*-vacpp-6.0-{11,15}? COMP STDCXX-360 2.smartptr.shared aix-*-*-vacpp-9.0-* COMP STDCXX-360 19.exceptions.mtaix-5.3-*-vacpp-9.0-{12,15}?HUP STDCXX-644
svn commit: r627678 - in /stdcxx/branches/4.2.x/include: istream.cc streambuf
Author: vitek Date: Thu Feb 14 00:08:11 2008 New Revision: 627678 URL: http://svn.apache.org/viewvc?rev=627678view=rev Log: 2008-02-14 Travis Vitek [EMAIL PROTECTED] Merged rev 619587 from trunk. 2008-02-07 Travis Vitek [EMAIL PROTECTED] STDCXX-249 * include/istream.cc (operator): Read stream data in blocks where possible for efficiency. * include/streambuf: Add operator as friend for access to protected member functions. Modified: stdcxx/branches/4.2.x/include/istream.cc stdcxx/branches/4.2.x/include/streambuf Modified: stdcxx/branches/4.2.x/include/istream.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/istream.cc?rev=627678r1=627677r2=627678view=diff == --- stdcxx/branches/4.2.x/include/istream.cc (original) +++ stdcxx/branches/4.2.x/include/istream.cc Thu Feb 14 00:08:11 2008 @@ -788,40 +788,136 @@ { _RWSTD_ASSERT (0 != __is.rdbuf ()); +const _TYPENAME basic_istream_CharT, _Traits::sentry +__ipfx (__is /* , noskipws = false */); + ios_base::iostate __err = ios_base::goodbit; -_RWSTD_SIZE_T __gcount = 0; +typedef _RWSTD_SIZE_T _SizeT; -_TRY { +// count of characters read from stream +_SizeT __gcount = 0; -const _TYPENAME basic_istream_CharT, _Traits::sentry -__ipfx (__is /* , noskipws = false */); +_TRY { if (__ipfx) { -basic_streambuf_CharT, _Traits* const __rdbuf = __is.rdbuf (); - -// FIXME: code commented out to work around an HP aCC 3.14.10 -// bug #JAGac86264 - -// typedef _TYPENAME -// basic_string_CharT, _Traits, _Allocator::size_type +__str.clear (); -const _RWSTD_SIZE_T __maxlen = +// maximum number of characters we can read +_RWSTD_SIZE_T __n = __is.width () ? __is.width () : __str.max_size (); -__str.clear (); +basic_streambuf_CharT, _Traits* const __rdbuf = __is.rdbuf (); const ctype_CharT __ctp = _USE_FACET (ctype_CharT, __is.getloc ()); -// increment gcount only _after_ sbumpc() but _before_ -// the subsequent call to sgetc() to correctly reflect -// the number of extracted characters in the presence -// of exceptions thrown from streambuf virtuals -for ( ; __maxlen != __gcount; __rdbuf-sbumpc (), ++__gcount) { +#ifndef _RWSTD_NO_FRIEND_TEMPLATE -const _TYPENAME _Traits::int_type __c (__rdbuf-sgetc ()); +while (__n != 0) { + +const _CharT* const __gptr = __rdbuf-gptr (); +const _CharT* const __egptr = __rdbuf-egptr (); + +// maximum number of characters would want to extract +_SizeT __navail = __egptr - __gptr; +if (__n __navail) +__navail = __n; + +if (__navail) { + +// find the delimeter in the squence if it exists, or +// get pointer to end of sequence +const _CharT* __pdel = __gptr; +for (/**/; __pdel != __egptr; ++__pdel) { + +const _TYPENAME _Traits::int_type +__c = _Traits::to_int_type(*__pdel); + +if (_Traits::eq_int_type (__c, _Traits::eof ())) { +__err = ios_base::eofbit; +break; +} + +if (__ctp.is (__ctp.space, *__pdel)) +break; +} + +// __pdel is either pointing to a delimiter or one past +// the end of the input stream get area. if it is past +// the end, then set it to null. +if (__pdel == __egptr) { +__pdel = 0; +} + +if (__pdel) { +__navail = __pdel - __gptr + 1; +__n -= __navail - 1; +} +else if (__n == __navail) +__n -= --__navail; +else +__n -= __navail; + +// store characters excluding the delimiter +__str.append (__gptr, __navail - !!__pdel); + +__gcount += __navail; + +// advance gptr() by the number of extracted +// characters, including the delimiter +__rdbuf-gbump (__navail); + +// we found a delimiter before the end of the get area, +// break out of outer loop +if (__pdel) { +break
svn commit: r617841 - /stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp
Author: vitek Date: Sat Feb 2 09:42:17 2008 New Revision: 617841 URL: http://svn.apache.org/viewvc?rev=617841view=rev Log: 2008-02-02 Travis Vitek [EMAIL PROTECTED] * tests/regress/21.string.stdcxx-231.cpp: Fix compile error. Modified: stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp Modified: stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp?rev=617841r1=617840r2=617841view=diff == --- stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp (original) +++ stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp Sat Feb 2 09:42:17 2008 @@ -32,8 +32,8 @@ { std::string s (100, 's'); -const size_t n = s.capacity (); -const char* p = s.c_str (); +const std::string::size_type n = s.capacity (); +const std::string::const_pointer p = s.c_str (); // verify getline(), clear(), erase() and replace() do not // unnecessarily resize or reallocate the data buffer
svn commit: r617276 - /stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp
Author: vitek Date: Thu Jan 31 14:46:37 2008 New Revision: 617276 URL: http://svn.apache.org/viewvc?rev=617276view=rev Log: 2008-01-31 Travis Vitek [EMAIL PROTECTED] STDCXX-231 * tests/regress/21.string.stdcxx-231.cpp: Add regression test. Added: stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp Added: stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp?rev=617276view=auto == --- stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp (added) +++ stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp Thu Jan 31 14:46:37 2008 @@ -0,0 +1,59 @@ +/ + * + * 21.string.stdcxx-231.cpp - test case from STDCXX-231 issue + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + **/ + +#include cassert +#include string +#include sstream + +int main () +{ +std::string s (100, 's'); + +const size_t n = s.capacity (); +const char* p = s.c_str (); + +// verify getline(), clear(), erase() and replace() do not +// unnecessarily resize or reallocate the data buffer +std::istringstream is (hello world); +std::getline (is, s); +assert (s.capacity () == n); +assert (s.c_str ()== p); + +s.clear (); +assert (s.capacity () == n); +assert (s.c_str ()== p); + +s.erase (); +assert (s.capacity () == n); +assert (s.c_str ()== p); + +s.replace (0, std::string::npos, 1, 0); +assert (s.capacity () == n); +assert (s.c_str ()== p); + +return 0; +} +
svn commit: r617280 - in /stdcxx/branches/4.2.x: include/istream.cc include/string include/string.cc tests/regress/21.string.stdcxx-231.cpp
Author: vitek Date: Thu Jan 31 14:58:07 2008 New Revision: 617280 URL: http://svn.apache.org/viewvc?rev=617280view=rev Log: 2008-01-31 Travis Vitek [EMAIL PROTECTED] Merged rev 617251 and 617276 from trunk. 2008-01-31 Travis Vitek [EMAIL PROTECTED] STDCXX-231 * include/string (clear): Avoid deallocating string body unless necessary. * include/string.cc (replace): Ditto. * include/istream.cc (getline): Call clear () instead of erase() to avoid unnecessary overhead. 2008-01-31 Travis Vitek [EMAIL PROTECTED] * tests/regress/21.string.stdcxx-231.cpp: Added regression test for STDCXX-231. Added: stdcxx/branches/4.2.x/tests/regress/21.string.stdcxx-231.cpp - copied unchanged from r617276, stdcxx/trunk/tests/regress/21.string.stdcxx-231.cpp Modified: stdcxx/branches/4.2.x/include/istream.cc stdcxx/branches/4.2.x/include/string stdcxx/branches/4.2.x/include/string.cc Modified: stdcxx/branches/4.2.x/include/istream.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/istream.cc?rev=617280r1=617279r2=617280view=diff == --- stdcxx/branches/4.2.x/include/istream.cc (original) +++ stdcxx/branches/4.2.x/include/istream.cc Thu Jan 31 14:58:07 2008 @@ -877,7 +877,7 @@ if (__ipfx) { -__str.erase (); +__str.clear (); // carefuly handle arithmetic overflow _SizeT __n = __str.max_size (); Modified: stdcxx/branches/4.2.x/include/string URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/string?rev=617280r1=617279r2=617280view=diff == --- stdcxx/branches/4.2.x/include/string (original) +++ stdcxx/branches/4.2.x/include/string Thu Jan 31 14:58:07 2008 @@ -266,7 +266,12 @@ void reserve (size_type = 0); void clear () { -_C_unlink (_C_nullref ()-data ()); +if (size_type (1) size_type (_C_pref ()-_C_get_ref ())) +_C_unlink (_C_nullref ()-data ()); +else { +traits_type::assign (_C_data [0], value_type ()); +_C_pref ()-_C_size._C_size = 0; +} } bool empty () const { Modified: stdcxx/branches/4.2.x/include/string.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/string.cc?rev=617280r1=617279r2=617280view=diff == --- stdcxx/branches/4.2.x/include/string.cc (original) +++ stdcxx/branches/4.2.x/include/string.cc Thu Jan 31 14:58:07 2008 @@ -379,7 +379,7 @@ } else { // special case a substitution that leaves the string empty. -_C_unlink (_C_nullref ()-data ()); +clear (); } return *this; @@ -452,8 +452,8 @@ } } else { -// construct the empty string -_C_unlink (_C_nullref ()-data ()); +// special case a substitution that leaves the string empty. +clear (); } return *this;
svn commit: r617300 - /stdcxx/trunk/include/istream.cc
Author: vitek Date: Thu Jan 31 15:49:42 2008 New Revision: 617300 URL: http://svn.apache.org/viewvc?rev=617300view=rev Log: 2008-01-31 Travis Vitek [EMAIL PROTECTED] * include/istream.cc: Call clear() instead of erase() to avoid unnecessary overhead and consistency. Modified: stdcxx/trunk/include/istream.cc Modified: stdcxx/trunk/include/istream.cc URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/istream.cc?rev=617300r1=617299r2=617300view=diff == --- stdcxx/trunk/include/istream.cc (original) +++ stdcxx/trunk/include/istream.cc Thu Jan 31 15:49:42 2008 @@ -810,7 +810,7 @@ const _RWSTD_SIZE_T __maxlen = __is.width () ? __is.width () : __str.max_size (); -__str.erase (); +__str.clear (); const ctype_CharT __ctp = _USE_FACET (ctype_CharT, __is.getloc ()); @@ -986,7 +986,7 @@ _TRY { -__str.erase (); +__str.clear (); const _RWSTD_SIZE_T __max_size = __str.max_size ();
svn commit: r616676 - /stdcxx/branches/4.2.x/include/rw/_tree.cc
Author: vitek Date: Wed Jan 30 00:03:53 2008 New Revision: 616676 URL: http://svn.apache.org/viewvc?rev=616676view=rev Log: 2008-01-30 Travis Vitek [EMAIL PROTECTED] Merged rev 616673 with a fix for STDCXX-216 fron trunk. * include/rw/_tree.cc (insert): Optimize insertion when hint iterator is not begin() or end(). Add some much needed documentation. Modified: stdcxx/branches/4.2.x/include/rw/_tree.cc Modified: stdcxx/branches/4.2.x/include/rw/_tree.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_tree.cc?rev=616676r1=616675r2=616676view=diff == --- stdcxx/branches/4.2.x/include/rw/_tree.cc (original) +++ stdcxx/branches/4.2.x/include/rw/_tree.cc Wed Jan 30 00:03:53 2008 @@ -348,28 +348,48 @@ #endif // _RWSTDDEBUG -if (__it == begin ()) { -if (size () _C_cmp (_KeyOf ()(__v), _ITER_NODE (__it)-_C_key ())) -return _C_insert (_ITER_NODE (__it), _ITER_NODE (__it), __v); +const _C_link_t __hint = _ITER_NODE (__it); + +// if __hint is the right most child and __key is greater, +// then insert on the right +if (__hint == _C_end-_C_child [1]) { +if (_C_cmp (__hint-_C_key (), _KeyOf ()(__v))) +return _C_insert (0, __hint, __v); return insert (__v, __dup).first; } -if (__it == end ()) { -if (_C_cmp (_C_end-_C_child [1]-_C_key(), _KeyOf ()(__v))) -return _C_insert (0, _C_end-_C_child [1], __v); +// if __hint is past the end and __key is greater, +// then insert on the right +if (__hint == _C_end) { +if (_C_cmp (__hint-_C_child [1]-_C_key(), _KeyOf ()(__v))) +return _C_insert (0, __hint-_C_child [1], __v); +return insert (__v, __dup).first; +} +// if __hint is the leftmost child and __key is less +// then insert on the left +if (__hint == _C_end-_C_child [0]) { +if (size () _C_cmp (_KeyOf ()(__v), __hint-_C_key ())) +return _C_insert (__hint, __hint, __v); return insert (__v, __dup).first; } -const iterator __prev = --__it; +const iterator __prev = __it++; +// if __v falls between __prev and __it, then insert it there if ( _C_cmp (_ITER_NODE (__prev)-_C_key (), _KeyOf ()(__v)) _C_cmp (_KeyOf ()(__v), _ITER_NODE (__it)-_C_key ())) { + +// if there is no right child of __prev, then __prev is the +// left child of __it and we insert to right of __prev if (_C_link_t () == _ITER_NODE (__prev)-_C_child [1]) return _C_insert (0, _ITER_NODE (__prev), __v); + +// otherwise we insert on the left of __it return _C_insert (_ITER_NODE (__it), _ITER_NODE (__it), __v); } +// otherwise, do a full traversal return insert (__v, __dup).first; }
svn commit: r616588 - in /stdcxx/branches/4.2.x: GNUmakefile etc/config/makefile.rules
Author: vitek Date: Tue Jan 29 18:10:55 2008 New Revision: 616588 URL: http://svn.apache.org/viewvc?rev=616588view=rev Log: 2008-01-29 Travis Vitek [EMAIL PROTECTED] Merged rev 615419 with a fix for STDCXX-573 from trunk. * etc/config/makefile.rules: Use WITH_PURIFY or WITH_CADVISE to enable or disable purify and cadvise tools. * GNUmakefile: Document new parameters and cache them in makefile.in. Modified: stdcxx/branches/4.2.x/GNUmakefile stdcxx/branches/4.2.x/etc/config/makefile.rules Modified: stdcxx/branches/4.2.x/GNUmakefile URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/GNUmakefile?rev=616588r1=616587r2=616588view=diff == --- stdcxx/branches/4.2.x/GNUmakefile (original) +++ stdcxx/branches/4.2.x/GNUmakefile Tue Jan 29 18:10:55 2008 @@ -151,6 +151,12 @@ # # WARNFLAGS - any compiler warning options # +# WITH_PURIFY - set to `true' to build with purify. additional flags +# can be specified in PURIFYFLAGS. +# +# WITH_CADVISE - set to `true' to build with cadvise. additional flags +# can be specified in CADVISEFLAGS. +# SHELL = /bin/sh @@ -642,6 +648,10 @@ echo BUILDTAG = $(BUILDTAG) $(MAKEFILE_IN) \ echo PLATFORM = $(PLATFORM) $(MAKEFILE_IN) \ echo DEFAULT_SHROBJ = $(DEFAULT_SHROBJ)$(MAKEFILE_IN) \ + echo WITH_CADVISE = $(WITH_CADVISE)$(MAKEFILE_IN) \ + echo CADVISEFLAGS = $(CADVISEFLAGS)$(MAKEFILE_IN) \ + echo WITH_PURIFY = $(WITH_PURIFY) $(MAKEFILE_IN) \ + echo PURIFYFLAGS = $(PURIFYFLAGS) $(MAKEFILE_IN) \ echo CXX_REPOSITORY = $(CXX_REPOSITORY) $(MAKEFILE_IN)); # creates the build directory tree and generates makefile.in Modified: stdcxx/branches/4.2.x/etc/config/makefile.rules URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/makefile.rules?rev=616588r1=616587r2=616588view=diff == --- stdcxx/branches/4.2.x/etc/config/makefile.rules (original) +++ stdcxx/branches/4.2.x/etc/config/makefile.rules Tue Jan 29 18:10:55 2008 @@ -70,6 +70,25 @@ -gencat $@ $^ +ifeq ($(WITH_PURIFY),true) + ifeq ($(PURIFYFLAGS),) +PURIFYFLAGS = -windows=no + PURIFYFLAGS += -log-file=stderr [EMAIL PROTECTED] + endif + + ifneq ($(OSNAME),AIX) + PURIFY = purify $(PURIFYFLAGS) + endif +endif + +ifeq ($(WITH_CADVISE),true) + ifeq ($(CADVISEFLAGS),) +CADVISEFLAGS = +w + endif + + CADVISE = cadvise $(CADVISEFLAGS) +endif + # COMMON RULES @@ -89,17 +108,17 @@ # make the rule match for sources matching *.out.cpp %.out.o: %.out.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$) $ + $(CADVISE) $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$) $ %.o: %.cpp - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$) $ + $(CADVISE) $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(call CXX.repo,$) $ # make the rule match for objects matching *.out.o %.out: %.out.o - $(LD) $ -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$) + $(PURIFY) $(LD) $ -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$) %: %.o - $(LD) $ -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$) + $(PURIFY) $(LD) $ -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$) # disable compilation and linking in the same step # %: %.cpp @@ -108,8 +127,8 @@ # compile and link in one step to eliminate the space overhead of .o files %: %.cpp - $(CXX) $ -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) \ - $(call CXX.repo,$) + $(CADVISE) $(PURIFY) $(CXX) $ -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) \ + $(LDLIBS) $(call CXX.repo,$) endif # eq ($(NO_DOT_O),)