diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-29 22:38:19 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-29 22:38:19 +0000 |
commit | a3b03203218c6dacd34e03e7cd4c1063d5eee850 (patch) | |
tree | 437c96e20c1f18a30c72894d13d937e1036ef4b3 /libstdc++-v3/testsuite/25_algorithms | |
parent | 29c144d19ffd01e74445aee8ba7d404ade2ce870 (diff) | |
download | ppe42-gcc-a3b03203218c6dacd34e03e7cd4c1063d5eee850.tar.gz ppe42-gcc-a3b03203218c6dacd34e03e7cd4c1063d5eee850.zip |
2008-03-29 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/35725
* include/bits/stl_algobase.h (__fill_a(_ForwardIterator,
_ForwardIterator, _Tp), __fill_a(_Tp*, _Tp*, _Tp),
__fill_n_a(_OutputIterator, _Size, _Tp), __fill_n_a(_Tp*, _Size,
_Tp)): Fix signatures.
* testsuite/25_algorithms/fill/35725.cc: New.
* testsuite/25_algorithms/fill_n/35725.cc: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133721 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/25_algorithms')
-rw-r--r-- | libstdc++-v3/testsuite/25_algorithms/fill/35725.cc | 30 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/25_algorithms/fill_n/35725.cc | 30 |
2 files changed, 60 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/35725.cc b/libstdc++-v3/testsuite/25_algorithms/fill/35725.cc new file mode 100644 index 00000000000..0c5b0e46cb4 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/fill/35725.cc @@ -0,0 +1,30 @@ +// { dg-do compile } + +// Copyright (C) 2008 Free Software Foundation, Inc. +// +// 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 <string> +#include <vector> +#include <algorithm> + +// libstdc++/35725 +void test01() +{ + std::vector<std::string> foo(20); + std::fill(foo.begin(), foo.end(), "bar"); +} diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/35725.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/35725.cc new file mode 100644 index 00000000000..a914d1cd4eb --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/35725.cc @@ -0,0 +1,30 @@ +// { dg-do compile } + +// Copyright (C) 2008 Free Software Foundation, Inc. +// +// 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 <string> +#include <vector> +#include <algorithm> + +// libstdc++/35725 +void test01() +{ + std::vector<std::string> foo(20); + std::fill_n(foo.begin(), 20, "bar"); +} |