30#ifndef _ENABLE_SPECIAL_MEMBERS_H
31#define _ENABLE_SPECIAL_MEMBERS_H 1
34#pragma GCC system_header
39namespace std _GLIBCXX_VISIBILITY(default)
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
44 struct _Enable_default_constructor_tag
46 explicit constexpr _Enable_default_constructor_tag() =
default;
54template<
bool _Switch,
typename _Tag =
void>
55 struct _Enable_default_constructor
57 constexpr _Enable_default_constructor() noexcept = default;
58 constexpr _Enable_default_constructor(_Enable_default_constructor const&)
60 constexpr _Enable_default_constructor(_Enable_default_constructor&&)
62 _Enable_default_constructor&
63 operator=(_Enable_default_constructor const&) noexcept = default;
64 _Enable_default_constructor&
65 operator=(_Enable_default_constructor&&) noexcept = default;
69 _Enable_default_constructor(_Enable_default_constructor_tag) { }
78template<
bool _Switch,
typename _Tag =
void>
79 struct _Enable_destructor { };
86template<
bool _Copy,
bool _CopyAssignment,
87 bool _Move,
bool _MoveAssignment,
89 struct _Enable_copy_move { };
98template<
bool _Default,
bool _Destructor,
99 bool _Copy,
bool _CopyAssignment,
100 bool _Move,
bool _MoveAssignment,
101 typename _Tag =
void>
102 struct _Enable_special_members
103 :
private _Enable_default_constructor<_Default, _Tag>,
104 private _Enable_destructor<_Destructor, _Tag>,
105 private _Enable_copy_move<_Copy, _CopyAssignment,
106 _Move, _MoveAssignment,
112template<
typename _Tag>
113 struct _Enable_default_constructor<false, _Tag>
115 constexpr _Enable_default_constructor() noexcept = delete;
116 constexpr _Enable_default_constructor(_Enable_default_constructor const&)
118 constexpr _Enable_default_constructor(_Enable_default_constructor&&)
120 _Enable_default_constructor&
121 operator=(_Enable_default_constructor const&) noexcept = default;
122 _Enable_default_constructor&
123 operator=(_Enable_default_constructor&&) noexcept = default;
127 _Enable_default_constructor(_Enable_default_constructor_tag) { }
130template<
typename _Tag>
131 struct _Enable_destructor<false, _Tag>
132 { ~_Enable_destructor() noexcept = delete; };
134template<typename _Tag>
135 struct _Enable_copy_move<false, true, true, true, _Tag>
137 constexpr _Enable_copy_move() noexcept = default;
138 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
139 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
141 operator=(_Enable_copy_move const&) noexcept = default;
143 operator=(_Enable_copy_move&&) noexcept = default;
146template<typename _Tag>
147 struct _Enable_copy_move<true, false, true, true, _Tag>
149 constexpr _Enable_copy_move() noexcept = default;
150 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
151 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
153 operator=(_Enable_copy_move const&) noexcept = delete;
155 operator=(_Enable_copy_move&&) noexcept = default;
158template<typename _Tag>
159 struct _Enable_copy_move<false, false, true, true, _Tag>
161 constexpr _Enable_copy_move() noexcept = default;
162 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
163 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
165 operator=(_Enable_copy_move const&) noexcept = delete;
167 operator=(_Enable_copy_move&&) noexcept = default;
170template<typename _Tag>
171 struct _Enable_copy_move<true, true, false, true, _Tag>
173 constexpr _Enable_copy_move() noexcept = default;
174 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
175 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
177 operator=(_Enable_copy_move const&) noexcept = default;
179 operator=(_Enable_copy_move&&) noexcept = default;
182template<typename _Tag>
183 struct _Enable_copy_move<false, true, false, true, _Tag>
185 constexpr _Enable_copy_move() noexcept = default;
186 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
187 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
189 operator=(_Enable_copy_move const&) noexcept = default;
191 operator=(_Enable_copy_move&&) noexcept = default;
194template<typename _Tag>
195 struct _Enable_copy_move<true, false, false, true, _Tag>
197 constexpr _Enable_copy_move() noexcept = default;
198 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
199 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
201 operator=(_Enable_copy_move const&) noexcept = delete;
203 operator=(_Enable_copy_move&&) noexcept = default;
206template<typename _Tag>
207 struct _Enable_copy_move<false, false, false, true, _Tag>
209 constexpr _Enable_copy_move() noexcept = default;
210 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
211 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
213 operator=(_Enable_copy_move const&) noexcept = delete;
215 operator=(_Enable_copy_move&&) noexcept = default;
218template<typename _Tag>
219 struct _Enable_copy_move<true, true, true, false, _Tag>
221 constexpr _Enable_copy_move() noexcept = default;
222 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
223 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
225 operator=(_Enable_copy_move const&) noexcept = default;
227 operator=(_Enable_copy_move&&) noexcept = delete;
230template<typename _Tag>
231 struct _Enable_copy_move<false, true, true, false, _Tag>
233 constexpr _Enable_copy_move() noexcept = default;
234 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
235 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
237 operator=(_Enable_copy_move const&) noexcept = default;
239 operator=(_Enable_copy_move&&) noexcept = delete;
242template<typename _Tag>
243 struct _Enable_copy_move<true, false, true, false, _Tag>
245 constexpr _Enable_copy_move() noexcept = default;
246 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
247 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
249 operator=(_Enable_copy_move const&) noexcept = delete;
251 operator=(_Enable_copy_move&&) noexcept = delete;
254template<typename _Tag>
255 struct _Enable_copy_move<false, false, true, false, _Tag>
257 constexpr _Enable_copy_move() noexcept = default;
258 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
259 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
261 operator=(_Enable_copy_move const&) noexcept = delete;
263 operator=(_Enable_copy_move&&) noexcept = delete;
266template<typename _Tag>
267 struct _Enable_copy_move<true, true, false, false, _Tag>
269 constexpr _Enable_copy_move() noexcept = default;
270 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
271 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
273 operator=(_Enable_copy_move const&) noexcept = default;
275 operator=(_Enable_copy_move&&) noexcept = delete;
278template<typename _Tag>
279 struct _Enable_copy_move<false, true, false, false, _Tag>
281 constexpr _Enable_copy_move() noexcept = default;
282 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
283 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
285 operator=(_Enable_copy_move const&) noexcept = default;
287 operator=(_Enable_copy_move&&) noexcept = delete;
290template<typename _Tag>
291 struct _Enable_copy_move<true, false, false, false, _Tag>
293 constexpr _Enable_copy_move() noexcept = default;
294 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
295 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
297 operator=(_Enable_copy_move const&) noexcept = delete;
299 operator=(_Enable_copy_move&&) noexcept = delete;
302template<typename _Tag>
303 struct _Enable_copy_move<false, false, false, false, _Tag>
305 constexpr _Enable_copy_move() noexcept = default;
306 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
307 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
309 operator=(_Enable_copy_move const&) noexcept = delete;
311 operator=(_Enable_copy_move&&) noexcept = delete;
315_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.