You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <ms...@gmail.com> on 2012/02/09 00:30:58 UTC
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;
> +}
> +
>
>
RE: svn commit: r1242128 - in /stdcxx/branches/4.2.x:
include/valarray tests/regress/26.valarray.binary.stdcxx-1061.cpp
Posted by Travis Vitek <Tr...@roguewave.com>.
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;
> > +}
> > +
> >
> >