30#ifndef _ENABLE_SPECIAL_MEMBERS_H
31#define _ENABLE_SPECIAL_MEMBERS_H 1
33#pragma GCC system_header
37namespace std _GLIBCXX_VISIBILITY(default)
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
42 struct _Enable_default_constructor_tag
44 explicit constexpr _Enable_default_constructor_tag() =
default;
52template<
bool _Switch,
typename _Tag =
void>
53 struct _Enable_default_constructor
55 constexpr _Enable_default_constructor() noexcept = default;
56 constexpr _Enable_default_constructor(_Enable_default_constructor const&)
58 constexpr _Enable_default_constructor(_Enable_default_constructor&&)
60 _Enable_default_constructor&
61 operator=(_Enable_default_constructor const&) noexcept = default;
62 _Enable_default_constructor&
63 operator=(_Enable_default_constructor&&) noexcept = default;
67 _Enable_default_constructor(_Enable_default_constructor_tag) { }
76template<
bool _Switch,
typename _Tag =
void>
77 struct _Enable_destructor { };
84template<
bool _Copy,
bool _CopyAssignment,
85 bool _Move,
bool _MoveAssignment,
87 struct _Enable_copy_move { };
96template<
bool _Default,
bool _Destructor,
97 bool _Copy,
bool _CopyAssignment,
98 bool _Move,
bool _MoveAssignment,
100 struct _Enable_special_members
101 :
private _Enable_default_constructor<_Default, _Tag>,
102 private _Enable_destructor<_Destructor, _Tag>,
103 private _Enable_copy_move<_Copy, _CopyAssignment,
104 _Move, _MoveAssignment,
110template<
typename _Tag>
111 struct _Enable_default_constructor<false, _Tag>
113 constexpr _Enable_default_constructor() noexcept = delete;
114 constexpr _Enable_default_constructor(_Enable_default_constructor const&)
116 constexpr _Enable_default_constructor(_Enable_default_constructor&&)
118 _Enable_default_constructor&
119 operator=(_Enable_default_constructor const&) noexcept = default;
120 _Enable_default_constructor&
121 operator=(_Enable_default_constructor&&) noexcept = default;
125 _Enable_default_constructor(_Enable_default_constructor_tag) { }
128template<
typename _Tag>
129 struct _Enable_destructor<false, _Tag>
130 { ~_Enable_destructor() noexcept = delete; };
132template<typename _Tag>
133 struct _Enable_copy_move<false, true, true, true, _Tag>
135 constexpr _Enable_copy_move() noexcept = default;
136 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
137 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
139 operator=(_Enable_copy_move const&) noexcept = default;
141 operator=(_Enable_copy_move&&) noexcept = default;
144template<typename _Tag>
145 struct _Enable_copy_move<true, false, true, true, _Tag>
147 constexpr _Enable_copy_move() noexcept = default;
148 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
149 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
151 operator=(_Enable_copy_move const&) noexcept = delete;
153 operator=(_Enable_copy_move&&) noexcept = default;
156template<typename _Tag>
157 struct _Enable_copy_move<false, false, true, true, _Tag>
159 constexpr _Enable_copy_move() noexcept = default;
160 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
161 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
163 operator=(_Enable_copy_move const&) noexcept = delete;
165 operator=(_Enable_copy_move&&) noexcept = default;
168template<typename _Tag>
169 struct _Enable_copy_move<true, true, false, true, _Tag>
171 constexpr _Enable_copy_move() noexcept = default;
172 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
173 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
175 operator=(_Enable_copy_move const&) noexcept = default;
177 operator=(_Enable_copy_move&&) noexcept = default;
180template<typename _Tag>
181 struct _Enable_copy_move<false, true, false, true, _Tag>
183 constexpr _Enable_copy_move() noexcept = default;
184 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
185 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
187 operator=(_Enable_copy_move const&) noexcept = default;
189 operator=(_Enable_copy_move&&) noexcept = default;
192template<typename _Tag>
193 struct _Enable_copy_move<true, false, false, true, _Tag>
195 constexpr _Enable_copy_move() noexcept = default;
196 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
197 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
199 operator=(_Enable_copy_move const&) noexcept = delete;
201 operator=(_Enable_copy_move&&) noexcept = default;
204template<typename _Tag>
205 struct _Enable_copy_move<false, false, false, true, _Tag>
207 constexpr _Enable_copy_move() noexcept = default;
208 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
209 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
211 operator=(_Enable_copy_move const&) noexcept = delete;
213 operator=(_Enable_copy_move&&) noexcept = default;
216template<typename _Tag>
217 struct _Enable_copy_move<true, true, true, false, _Tag>
219 constexpr _Enable_copy_move() noexcept = default;
220 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
221 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
223 operator=(_Enable_copy_move const&) noexcept = default;
225 operator=(_Enable_copy_move&&) noexcept = delete;
228template<typename _Tag>
229 struct _Enable_copy_move<false, true, true, false, _Tag>
231 constexpr _Enable_copy_move() noexcept = default;
232 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
233 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
235 operator=(_Enable_copy_move const&) noexcept = default;
237 operator=(_Enable_copy_move&&) noexcept = delete;
240template<typename _Tag>
241 struct _Enable_copy_move<true, false, true, false, _Tag>
243 constexpr _Enable_copy_move() noexcept = default;
244 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
245 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
247 operator=(_Enable_copy_move const&) noexcept = delete;
249 operator=(_Enable_copy_move&&) noexcept = delete;
252template<typename _Tag>
253 struct _Enable_copy_move<false, false, true, false, _Tag>
255 constexpr _Enable_copy_move() noexcept = default;
256 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
257 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
259 operator=(_Enable_copy_move const&) noexcept = delete;
261 operator=(_Enable_copy_move&&) noexcept = delete;
264template<typename _Tag>
265 struct _Enable_copy_move<true, true, false, false, _Tag>
267 constexpr _Enable_copy_move() noexcept = default;
268 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
269 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
271 operator=(_Enable_copy_move const&) noexcept = default;
273 operator=(_Enable_copy_move&&) noexcept = delete;
276template<typename _Tag>
277 struct _Enable_copy_move<false, true, false, false, _Tag>
279 constexpr _Enable_copy_move() noexcept = default;
280 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
281 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
283 operator=(_Enable_copy_move const&) noexcept = default;
285 operator=(_Enable_copy_move&&) noexcept = delete;
288template<typename _Tag>
289 struct _Enable_copy_move<true, false, false, false, _Tag>
291 constexpr _Enable_copy_move() noexcept = default;
292 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
293 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
295 operator=(_Enable_copy_move const&) noexcept = delete;
297 operator=(_Enable_copy_move&&) noexcept = delete;
300template<typename _Tag>
301 struct _Enable_copy_move<false, false, false, false, _Tag>
303 constexpr _Enable_copy_move() noexcept = default;
304 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
305 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
307 operator=(_Enable_copy_move const&) noexcept = delete;
309 operator=(_Enable_copy_move&&) noexcept = delete;
313_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.