stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r662518 - in /stdcxx/branches/4.2.x: tests/containers/23.bitset.cpp tests/containers/23.vector.cons.cpp tests/self/0.printf.cpp tests/support/18.exception.cpp util/collate.cpp util/scanner.cpp
Date Mon, 02 Jun 2008 23:37:30 GMT
elemings@apache.org wrote:
> Author: elemings
> Date: Mon Jun  2 11:59:24 2008
> New Revision: 662518
> 
> URL: http://svn.apache.org/viewvc?rev=662518&view=rev
> Log:
> 2008-06-02  Eric Lemings <eric.lemings@roguewave.com>
> 
[...]
> Modified: stdcxx/branches/4.2.x/tests/containers/23.vector.cons.cpp
> URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/containers/23.vector.cons.cpp?rev=662518&r1=662517&r2=662518&view=diff
> ==============================================================================
> --- stdcxx/branches/4.2.x/tests/containers/23.vector.cons.cpp (original)
> +++ stdcxx/branches/4.2.x/tests/containers/23.vector.cons.cpp Mon Jun  2 11:59:24 2008
> @@ -618,7 +618,7 @@
>          for (typename Vector::size_type i = 0; i != rw_opt_nloops; ++i) {
>  
>              // construct an element at then end of array
> -            alloc.construct (vals + i, i);
> +            alloc.construct (vals + i, typename Alloc::value_type (i));

For simplicity (and to avoid running into compiler bugs) I suggest
replacing the typename with:

     alloc.construct (vals + i, T (i))

>  
>              // verify ctor with a strict InputIterator
>              InputIter<T> first (vals,     vals,     vals + i);
> 
[...]
> 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=662518&r1=662517&r2=662518&view=diff
> ==============================================================================
> --- stdcxx/branches/4.2.x/tests/support/18.exception.cpp (original)
> +++ stdcxx/branches/4.2.x/tests/support/18.exception.cpp Mon Jun  2 11:59:24 2008
> @@ -668,7 +668,7 @@
>          // exclude exception, bad_alloc, bad_cast, and bad_exception
>          // they are typically generated by the compiler and their
>          // what() strings are implementation-specific
> -        unsigned en = j % ((sizeof expect / sizeof *expect) - 5);
> +        size_t en = j % ((sizeof expect / sizeof *expect) - 5);


The reference to size_t should be qualified with std:: here. I was
about to recommend compiling with EDG eccp again to detect the absence
of the qualification but it appears that #including <sys/resource.h>
on Linux brings size_t into file scope so compiling with the front
end there doesn't reveal the problem. Ditto for Sun C++ on Solaris
whose C++ C headers are similarly strict.

Martin

Mime
View raw message