diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-20 02:13:49 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-20 02:13:49 +0000 |
commit | 0e384d91608f5ba25c7f40cafbf403d6255a811f (patch) | |
tree | 012cd47451c8831656f0d1c4bb9b3c09818ad8d4 /libstdc++-v3/testsuite/tr1/6_containers/utility/19535.cc | |
parent | 2ccf1db9e681c42a6b8367465b96ae81989d6c9b (diff) | |
download | gcc-0e384d91608f5ba25c7f40cafbf403d6255a811f.tar.gz |
2005-01-19 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/19535
* include/tr1/utility (struct __pair_get<1>::__get, __const_get):
Fix typo in the return type.
* testsuite/tr1/6_containers/utility/19535.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93940 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/tr1/6_containers/utility/19535.cc')
-rw-r--r-- | libstdc++-v3/testsuite/tr1/6_containers/utility/19535.cc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/tr1/6_containers/utility/19535.cc b/libstdc++-v3/testsuite/tr1/6_containers/utility/19535.cc new file mode 100644 index 00000000000..28ac42629b2 --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/6_containers/utility/19535.cc @@ -0,0 +1,42 @@ +// 2005-01-19 Petur Runolfsson <peturr02@ru.is> + +// Copyright (C) 2005 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// tr1 additions to pair + +#include <tr1/utility> + +struct A { }; +struct B { }; + +// libstdc++/19535 +void test01() +{ + std::pair<A, B> p; + std::tr1::get<1>(p); + + const std::pair<B, A> q; + std::tr1::get<1>(q); +} + +int main() +{ + test01(); + return 0; +} |