incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Vitek <Travis.Vi...@roguewave.com>
Subject RE: svn commit: r1242128 - in /stdcxx/branches/4.2.x: include/valarray tests/regress/26.valarray.binary.stdcxx-1061.cpp
Date Wed, 08 Feb 2012 23:33:00 GMT
Yes. Unfortunately I spent too much time trying to make sure I followed the process (which
I've forgotten) and not enough time making sure my code was correct.

Will fix immediately.

Travis

> -----Original Message-----
> From: Martin Sebor [mailto:msebor@gmail.com]
> Sent: Wednesday, February 08, 2012 3:31 PM
> To: dev@stdcxx.apache.org
> Cc: vitek@apache.org; commits@stdcxx.apache.org
> Subject: Re: svn commit: r1242128 - in /stdcxx/branches/4.2.x:
> include/valarray tests/regress/26.valarray.binary.stdcxx-1061.cpp
> 
> ...
> > +int main ()
> > +{
> > +    const int a[] = { 0, 1, 0, 3, 0, -5, 0, -7, 0, -11 };
> > +
> > +    const std::valarray<int>   v0 (a, sizeof a);
>                                           ^^^^^^^^
> I'm sure you meant sizeof a / sizeof *a here...
> 
> > +    const std::valarray<bool>  v1 = std::operator&&  (v0, 1);
> > +
> > +    for (std::size_t i = 0; i<  sizeof a; ++i)
> 
> and the same or v0.size() here.
> 
> Martin
> 
> > +        assert ((a [i]&&  1) == v1 [i]);
> > +
> > +    return 0;
> > +}
> > +
> >
> >

Mime
View raw message