[Stdcxx Wiki] Update of Cpp0x by EricLemings

2008-06-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Stdcxx Wiki for change 
notification.

The following page has been changed by EricLemings:
http://wiki.apache.org/stdcxx/Cpp0x

The comment on the change is:
Transcribing general notes from a draft development plan written in March 2008.

--
+ = Development Plan =
+ 
+ The following development plans apply to 4.3.x series of releases leading up 
to the 5.x major release tentatively scheduled sometime after the current C++ 
draft standard is ratified.
+ 
+ == Configuration ==
+ 
+ The release distribution(s) will provide a configuration option that allows 
users to explicitly enable or disable support for C++0x library specifications 
and extensions.  In 4.3.x releases, C++0x support is disabled by default if the 
option is not explicitly specified by the user.
+ 
+ If C++0x support is enabled, an additional configuration macro (or macros) 
will be defined within the library that specifically indicates whether C++0x 
specifications should be enabled.  (The exact name of this macro and how and 
where it is defined is unspecified for purposes of this document.)
+ 
+ == Affected Headers ==
+ 
+ New headers specified by the C++0x extensions will reside in the 
{{{$TOPDIR/include}}} directory (where {{{$TOPDIR}}} indicates the source 
distribution and/or installation directory) with the filenames specified by the 
standard.  (Note especially, there is no {{{std::tr1}}} namespace or associated 
{{{tr1}}} directory.)  Consequently, compiler search paths for header files are 
unchanged.
+ 
+ The new headers specified by the C++0x draft standard are shown in the 
following list:
+ 
+  ||tablestyle=width: 50%'''New C++0x Headers'''||
+  ||{{{type_traits}}}||{{{random}}}||{{{tuple}}}||
+  ||{{{array}}}||{{{unordered_set}}}||{{{unordered_map}}}||
+  ||{{{regex}}}||{{{ccomplex}}}||{{{complex.h}}}||
+  ||{{{cfenv}}}||{{{fenv.h}}}||{{{cinttypes}}}||
+  ||{{{inttypes.h}}}||{{{cstdbool}}}||{{{stdbool.h}}}||
+  ||{{{cstdint}}}||{{{stdint.h}}}||{{{ctgmath}}}||
+  ||{{{tgmath.h}}}|| || ||
+ 
+ Note, some of the new headers -- the C headers with a {{{.h}}} suffix -- are 
actually required by ISO/IEC 9899:1999 (a.k.a. C99) and consequently specified 
as part of the C++0x draft standard.  While these headers are technically a 
part of the C++ standard library, they do not fall within the scope of this 
development plan.
+ 
+ Modified headers -- existing headers for which changes are mandated by the 
standard -- will contain the appropriate conditional guards (utilizing the 
configuration macro(s) specified above) to enable the implementation of 
requirements specific to the C++0x draft standard.  The modified headers 
specified by the C++0x draft standard are shown in the following table:
+ 
+  ||tablestyle=width: 50%'''Modified C++0x Headers'''||
+  ||{{{functional}}}||{{{memory}}}||{{{utility}}}||
+  ||{{{complex}}}||{{{cctype}}}||{{{ctype.h}}}||
+  ||{{{cfloat}}}||{{{float.h}}}||{{{ios}}}||
+  ||{{{climits}}}||{{{limits.h}}}||{{{locale}}}||
+  ||{{{cmath}}}||{{{math.h}}}||{{{cstdarg}}}||
+  ||{{{stdarg.h}}}||{{{cstdio}}}||{{{cstdlib}}}||
+  ||{{{stdlib.h}}}||{{{ctime}}}||{{{wchar.h}}}||
+  ||{{{cwctype}}}||{{{wctype.h}}}|| ||
+ 
+ Note again, some of these headers -- the C headers in particular -- contain 
normative changes specified by C99 and are thus outside the scope of this 
development plan.
+ 
+ == Components ==
+ 
+ The new C++0x features are classified according to components shown in the 
following list:
+ 
+  * General utilities library (Chapter 20, Clause [utilities])
+   * Tuples (Section 3, Clause [tuple])
+   * Type traits (Section 4, Clause [meta])
+   * Function objects (Section 5, Clause [function.objects])
+* Reference wrappers (Section 5.5, Clause [refwrap])
+   * Smart pointers (Section 6, Clause [memory])
+  * Numerical library (Chapter 26, Clause [numerics])
+   * Random number generation (Section 4, Clause [rand])
+  * Containers (Chapter 23, Clause [containers])
+   * Fixed-size arrays (Section 2.1, Clause [array])
+   * Unordered associative containers (Section 4, Clause [unord])
+  * Regular expressions (Chapter 28, Clause [re])
+ 
+ Note, this is not a complete list of C++0x features: these are only the 
components that fall within the scope of this development plan.
+ 
+ 
  = Online Resources =
-  * [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf ISO/IEC 
TR 19768: C++ Library Extensions TR1].  The normative specification.
-  * [http://en.wikipedia.org/wiki/Technical_Report_1 Technical Report 1 
(Wikipedia)].  Good overview of the TR1 extensions.
-  
  
+  * [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf ISO/IEC 
TR 19768: C++ Library Extensions TR1].  The original draft specification.  (Now 
obsolete since modifications have been made in the latest C++ draft standard.)
+  * 

svn commit: r663333 - /stdcxx/site/download.html

2008-06-04 Thread sebor
Author: sebor
Date: Wed Jun  4 11:10:08 2008
New Revision: 66

URL: http://svn.apache.org/viewvc?rev=66view=rev
Log:
2008-06-04  Martin Sebor  [EMAIL PROTECTED]

* download.html (Searching the stdcxx Subversion Repository): Added
links to Subversion search sites.

Modified:
stdcxx/site/download.html

Modified: stdcxx/site/download.html
URL: 
http://svn.apache.org/viewvc/stdcxx/site/download.html?rev=66r1=663332r2=66view=diff
==
--- stdcxx/site/download.html (original)
+++ stdcxx/site/download.html Wed Jun  4 11:10:08 2008
@@ -141,6 +141,11 @@
   /a
 /li
 li
+  a href=#svnsearch
+Searching the stdcxx Subversion Repository
+  /a
+/li
+li
   a href=#svn
 Checking Out stdcxx Using the Subversion Client
   /a
@@ -240,6 +245,29 @@
   /ul
 /div   !-- section --
 
+a name=svnsearch/a
+h2 class=boxedSearching the stdcxx Subversion Repository/h2
+div class=section
+  p
+
+At least two online tools allow searching the stdcxx source code
+repository in Subversion:
+
+  p
+  ul
+li
+
+a 
href=http://svnsearch.org/svnsearch/repos/ASF/search?path=stdcxx;SVNSearch/a
+/li
+li
+
+a href=http://fisheye6.atlassian.com/browse/stdcxx;FishEye/a
+by a href=http://www.atlassian.com;Atlassian/a.
+
+/li
+  /ul
+/div   !-- section --
+
 a name=svn/a
 h2 class=boxedChecking Out Files Using the Subversion Client/h2
 div class=section




[Stdcxx Wiki] Update of FloatingPoint by MartinSebor

2008-06-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Stdcxx Wiki for change 
notification.

The following page has been changed by MartinSebor:
http://wiki.apache.org/stdcxx/FloatingPoint

The comment on the change is:
Added a heading and description.

--
  = WORK IN PROGRESS =
+ 
+ = Floating Point Numbers, Infinities and NaNs =
+ 
+ In preparation for resolving [http://issues.apache.org/jira/browse/STDCXX-51 
STDCXX-51] this page details the platform-specific details describing 
infinities and NaNs produced as the result of certain floating point 
calculations, usually triggered by invalid operands.
  
  == libc symbols ==
  


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

2008-06-04 Thread vitek
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 () == 

[Stdcxx Wiki] Update of FloatingPoint by MartinSebor

2008-06-04 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Stdcxx Wiki for change 
notification.

The following page has been changed by MartinSebor:
http://wiki.apache.org/stdcxx/FloatingPoint

The comment on the change is:
Added/corrected HP-UX and other libc symbols.

--
  The table below lists the public symbols defined on each platform for 
Infinity, Quiet NaN, and Signaling NaN.
  
  
tablestyle=background-color:cornsilk;text-align:center'''libc
 symbols'''||
- ||rowstyle=background-color:lightgray   || AIX
   || HP-UX || IRIX || Linux  || Solaris || 
Tru64 UNIX   || Windows ||
+ ||rowstyle=background-color:lightgray || AIX || HP-UX || IRIX || Linux || 
Solaris || Tru64 UNIX || Windows ||
- || header||`float.h`||`float.h`|| N/A 
 ||`math.h`  ||`sunmath.h`||`float.h`   || ||
- ||(Infinity  ||`FLT_INF`, `DBL_INF`, `LDBL_INF`   ||   || N/A   
   || `INFINITY` ||`infinity()` ||`FLT_INFINITY`, `DBL_INFINITY`, 
`LDBL_INFINITY`   || N/A ||
+ ||( header ||`float.h` ||`math.h`|| N/A 
||`math.h`||`sunmath.h`||`float.h`
+ ||(Infinity ||`INFINITY`, `FLT_INF`, `DBL_INF`, `LDBL_INF`||`INFINITY`|| 
N/A||`INFINITY`||`INFINITY`, `infinity()`||`FLT_INFINITY`, `DBL_INFINITY`, 
`LDBL_INFINITY`|| N/A||
- ||(Quiet NaN ||`FLT_QNAN`, `DBL_QNAN`, `LDBL_QNAN`||   || N/A   
   || `nan()`  ||`quiet_nan(long)`||`FLT_QNAN`, `DBL_QNAN`, `LDBL_QNAN`   
|| N/A ||
+ ||(Quiet NaN||`FLT_QNAN`, `DBL_QNAN`, `LDBL_QNAN` ^2^||`nan(const char*)` 
^1^|| N/A ||`nan(const char*)` ^1^||`quiet_nan(long)` ^2^   ||`FLT_QNAN`, 
`DBL_QNAN`, `LDBL_QNAN`   || N/A ||
  ||(Signaling NaN ||`FLT_SNAN`, `DBL_SNAN`, `LDBL_SNAN`||   || N/A   
   || N/A||`signaling_nan(long)`||`FLT_SNAN`, `DBL_SNAN`, `LDBL_SNAN`   
|| N/A ||
  
+ ^1^ Supports all signatures required by C99 and POSIX: `float nanf(const 
char*)`, `double nan(const char*)`, and `long double nanl(const char*)`.
+ 
+ ^2^ Recent versions also support the C99 interface.
  
  == printf() formatting ==
  


svn commit: r663410 - /stdcxx/branches/4.2.x/tests/support/18.support.rtti.cpp

2008-06-04 Thread vitek
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