diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-05 19:25:48 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-05 19:25:48 +0000 |
commit | a7e95a36ae03042318c834b30844bb22a8d66ce0 (patch) | |
tree | 9b800f96aaf5df5ba35a62b48ee1768f69197664 /libstdc++-v3/testsuite/26_numerics | |
parent | 8bb2c2a29366f52c14bc6300dea64966823c95bc (diff) | |
download | gcc-a7e95a36ae03042318c834b30844bb22a8d66ce0.tar.gz |
2006-12-05 Paolo Carlini <pcarlini@suse.de>
DR 543, [Ready].
* include/bits/slice_array.h (slice::slice()): Implement the
resolution.
* include/bits/gslice.h (gslice::_Indexer::_Indexer()): Add.
(gslice::gslice()): Use it.
* testsuite/26_numerics/valarray/dr543.cc: New.
* docs/html/ext/howto.html: Add an entry for DR 543.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119552 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/26_numerics')
-rw-r--r-- | libstdc++-v3/testsuite/26_numerics/valarray/dr543.cc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/26_numerics/valarray/dr543.cc b/libstdc++-v3/testsuite/26_numerics/valarray/dr543.cc new file mode 100644 index 00000000000..9afa93a4b83 --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/valarray/dr543.cc @@ -0,0 +1,40 @@ +// Copyright (C) 2006 Free Software Foundation +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +// USA. + +#include <valarray> +#include <testsuite_hooks.h> + +// DR 543. valarray slice default constructor +void test01() +{ + bool test __attribute__((unused)) = true; + + std::valarray<int> v1(10); + std::valarray<int> v2 = v1[std::slice()]; + VERIFY( v2.size() == 0 ); + + std::valarray<int> v3(10); + std::valarray<int> v4 = v3[std::gslice()]; + VERIFY( v4.size() == 0 ); +} + +int main() +{ + test01(); + return 0; +} |