diff options
| author | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-18 09:33:28 +0000 |
|---|---|---|
| committer | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-18 09:33:28 +0000 |
| commit | 2bfe7f77cc25896df6941dee488836b73d414ba1 (patch) | |
| tree | 794af96a0bea7c1b6988b3d30c2072b1eda1db90 /libstdc++-v3/testsuite | |
| parent | 7ad63df9cf26efc859398ab72522caf392bfe57b (diff) | |
| download | ppe42-gcc-2bfe7f77cc25896df6941dee488836b73d414ba1.tar.gz ppe42-gcc-2bfe7f77cc25896df6941dee488836b73d414ba1.zip | |
2014-10-18 François Dumont <fdumont@gcc.gnu.org>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/63500
* include/debug/functions.h (__foreign_iterator_aux2): Do not check for
foreign iterators if input iterators returns rvalue reference.
* testsuite/23_containers/vector/63500.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@216423 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite')
| -rw-r--r-- | libstdc++-v3/testsuite/23_containers/vector/63500.cc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/vector/63500.cc b/libstdc++-v3/testsuite/23_containers/vector/63500.cc new file mode 100644 index 00000000000..99fc9f4007f --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/vector/63500.cc @@ -0,0 +1,39 @@ +// -*- C++ -*- + +// Copyright (C) 2014 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 3, 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 COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +#include <memory> +#include <iterator> +#include <debug/vector> + +class Foo +{}; + +void +test01() +{ + __gnu_debug::vector<std::unique_ptr<Foo>> v; + __gnu_debug::vector<std::unique_ptr<Foo>> w; + + v.insert(end(v), + make_move_iterator(begin(w)), + make_move_iterator(end(w))); +} |

