]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/23_containers/list/modifiers/swap/1.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 23_containers / list / modifiers / swap / 1.cc
CommitLineData
83ffe9cd 1// Copyright (C) 2004-2023 Free Software Foundation, Inc.
f1c4ca32
BK
2//
3// This file is part of the GNU ISO C++ Library. This library is free
4// software; you can redistribute it and/or modify it under the
5// terms of the GNU General Public License as published by the
748086b7 6// Free Software Foundation; either version 3, or (at your option)
f1c4ca32 7// any later version.
13feb023 8
f1c4ca32
BK
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13feb023 13
f1c4ca32 14// You should have received a copy of the GNU General Public License along
748086b7
JJ
15// with this library; see the file COPYING3. If not see
16// <http://www.gnu.org/licenses/>.
f1c4ca32
BK
17
18#include <list>
7ce18a45 19#include "1.h"
f1c4ca32 20
13feb023
JW
21#if __cplusplus >= 201103L
22# define NOTHROW noexcept
23#else
24# define NOTHROW
25#endif
26
f1c4ca32
BK
27namespace std
28{
13feb023
JW
29 template<>
30 void
31 list<T, allocator<T> >::swap(list<T, allocator<T> >&) NOTHROW
f1c4ca32
BK
32 { ++swap_calls; }
33}
34
f1c4ca32
BK
35// See c++/13658 for background info.
36int main()
37{
875d0f10
BK
38 swap11<std::list<T> >();
39 swap12<std::list<T> >();
f1c4ca32
BK
40 return 0;
41}