Refactor ix86_expand_vecop_qihi2.
[gcc.git] / libstdc++-v3 / testsuite / 23_containers / headers / vector / synopsis.cc
blobbb5bf68b344b3675e536809ffb56f7988e9011ab
1 // { dg-do compile }
2 // { dg-require-normal-mode "" }
3 // { dg-require-normal-namespace "" }
5 // Copyright (C) 2007-2025 Free Software Foundation, Inc.
6 //
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 3, or (at your option)
11 // any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License along
19 // with this library; see the file COPYING3. If not see
20 // <http://www.gnu.org/licenses/>.
22 #include <vector>
24 #if __cplusplus >= 201103L
25 # define NOTHROW(X) noexcept(X)
26 #else
27 # define NOTHROW(X)
28 #endif
30 #if __cplusplus >= 202002L
31 # define CONSTEXPR constexpr
32 #else
33 # define CONSTEXPR
34 #endif
36 namespace std {
37 template <class T, class Allocator> class vector;
39 template <class T, class Allocator>
40 CONSTEXPR
41 bool operator==(const vector<T,Allocator>& x,
42 const vector<T,Allocator>& y);
44 #if __cplusplus < 202002L
45 template <class T, class Allocator>
46 bool operator< (const vector<T,Allocator>& x,
47 const vector<T,Allocator>& y);
49 template <class T, class Allocator>
50 bool operator!=(const vector<T,Allocator>& x,
51 const vector<T,Allocator>& y);
53 template <class T, class Allocator>
54 bool operator> (const vector<T,Allocator>& x,
55 const vector<T,Allocator>& y);
57 template <class T, class Allocator>
58 bool operator>=(const vector<T,Allocator>& x,
59 const vector<T,Allocator>& y);
61 template <class T, class Allocator>
62 bool operator<=(const vector<T,Allocator>& x,
63 const vector<T,Allocator>& y);
64 #endif
66 template <class T, class Allocator>
67 CONSTEXPR
68 void swap(vector<T,Allocator>& x, vector<T,Allocator>& y)
69 NOTHROW(noexcept(x.swap(y)));
71 template <class Allocator> class vector<bool,Allocator>;
73 template <class Allocator>
74 CONSTEXPR
75 bool operator==(const vector<bool,Allocator>& x,
76 const vector<bool,Allocator>& y);
78 #if __cplusplus < 202002L
79 template <class Allocator>
80 bool operator< (const vector<bool,Allocator>& x,
81 const vector<bool,Allocator>& y);
83 template <class Allocator>
84 bool operator!=(const vector<bool,Allocator>& x,
85 const vector<bool,Allocator>& y);
87 template <class Allocator>
88 bool operator> (const vector<bool,Allocator>& x,
89 const vector<bool,Allocator>& y);
91 template <class Allocator>
92 bool operator>=(const vector<bool,Allocator>& x,
93 const vector<bool,Allocator>& y);
95 template <class Allocator>
96 bool operator<=(const vector<bool,Allocator>& x,
97 const vector<bool,Allocator>& y);
98 #endif
100 template <class Allocator>
101 CONSTEXPR
102 void swap(vector<bool,Allocator>& x, vector<bool,Allocator>& y);