diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-13 17:35:40 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-13 17:35:40 +0000 |
commit | 21e812b7e3fb363dc2483304a15ab140f4b206aa (patch) | |
tree | a85e88374615fc41a7e03e165a5010bbe0e81a41 /libstdc++-v3/testsuite/25_algorithms | |
parent | f55d473b7373a47721a2200ae73b9fbe7fb7b32e (diff) | |
download | ppe42-gcc-21e812b7e3fb363dc2483304a15ab140f4b206aa.tar.gz ppe42-gcc-21e812b7e3fb363dc2483304a15ab140f4b206aa.zip |
2008-03-13 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/35541
* include/debug/functions.h (__check_sorted_set_aux): Fix signature.
* testsuite/25_algorithms/set_difference/35541.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133173 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/25_algorithms')
-rw-r--r-- | libstdc++-v3/testsuite/25_algorithms/set_difference/35541.cc | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/25_algorithms/set_difference/35541.cc b/libstdc++-v3/testsuite/25_algorithms/set_difference/35541.cc new file mode 100644 index 00000000000..819175df5e8 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/set_difference/35541.cc @@ -0,0 +1,36 @@ +// 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. + +// { dg-options "-D_GLIBCXX_DEBUG" } +// { dg-do compile } + +// libstdc++/35541 + +#include <set> +#include <iterator> +#include <algorithm> + +void test01() +{ + std::set<std::pair<unsigned,int> > mFactors; + std::set<std::pair<unsigned,int> > secondFactor; + std::set_difference(mFactors.begin(), mFactors.end(), + mFactors.begin(), mFactors.end(), + std::insert_iterator<std::set<std::pair<unsigned,int> > > + (secondFactor, secondFactor.end())); +} |