30 #ifndef _ENABLE_SPECIAL_MEMBERS_H
31 #define _ENABLE_SPECIAL_MEMBERS_H 1
33 #pragma GCC system_header
37 namespace std _GLIBCXX_VISIBILITY(default)
39 _GLIBCXX_BEGIN_NAMESPACE_VERSION
41 struct _Enable_default_constructor_tag
43 explicit constexpr _Enable_default_constructor_tag() =
default;
51 template<
bool _Switch,
typename _Tag =
void>
75 template<
bool _Switch,
typename _Tag =
void>
83 template<
bool _Copy,
bool _CopyAssignment,
84 bool _Move,
bool _MoveAssignment,
95 template<
bool _Default,
bool _Destructor,
96 bool _Copy,
bool _CopyAssignment,
97 bool _Move,
bool _MoveAssignment,
103 _Move, _MoveAssignment,
109 template<
typename _Tag>
127 template<
typename _Tag>
128 struct _Enable_destructor<false, _Tag>
129 { ~_Enable_destructor() noexcept = delete; };
131 template<typename _Tag>
132 struct _Enable_copy_move<false, true, true, true, _Tag>
134 constexpr _Enable_copy_move() noexcept = default;
135 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
136 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
138 operator=(_Enable_copy_move const&) noexcept = default;
140 operator=(_Enable_copy_move&&) noexcept = default;
143 template<typename _Tag>
144 struct _Enable_copy_move<true, false, true, true, _Tag>
146 constexpr _Enable_copy_move() noexcept = default;
147 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
148 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
150 operator=(_Enable_copy_move const&) noexcept = delete;
152 operator=(_Enable_copy_move&&) noexcept = default;
155 template<typename _Tag>
156 struct _Enable_copy_move<false, false, true, true, _Tag>
158 constexpr _Enable_copy_move() noexcept = default;
159 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
160 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
162 operator=(_Enable_copy_move const&) noexcept = delete;
164 operator=(_Enable_copy_move&&) noexcept = default;
167 template<typename _Tag>
168 struct _Enable_copy_move<true, true, false, true, _Tag>
170 constexpr _Enable_copy_move() noexcept = default;
171 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
172 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
174 operator=(_Enable_copy_move const&) noexcept = default;
176 operator=(_Enable_copy_move&&) noexcept = default;
179 template<typename _Tag>
180 struct _Enable_copy_move<false, true, false, true, _Tag>
182 constexpr _Enable_copy_move() noexcept = default;
183 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
184 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
186 operator=(_Enable_copy_move const&) noexcept = default;
188 operator=(_Enable_copy_move&&) noexcept = default;
191 template<typename _Tag>
192 struct _Enable_copy_move<true, false, false, true, _Tag>
194 constexpr _Enable_copy_move() noexcept = default;
195 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
196 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
198 operator=(_Enable_copy_move const&) noexcept = delete;
200 operator=(_Enable_copy_move&&) noexcept = default;
203 template<typename _Tag>
204 struct _Enable_copy_move<false, false, false, true, _Tag>
206 constexpr _Enable_copy_move() noexcept = default;
207 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
208 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
210 operator=(_Enable_copy_move const&) noexcept = delete;
212 operator=(_Enable_copy_move&&) noexcept = default;
215 template<typename _Tag>
216 struct _Enable_copy_move<true, true, true, false, _Tag>
218 constexpr _Enable_copy_move() noexcept = default;
219 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
220 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
222 operator=(_Enable_copy_move const&) noexcept = default;
224 operator=(_Enable_copy_move&&) noexcept = delete;
227 template<typename _Tag>
228 struct _Enable_copy_move<false, true, true, false, _Tag>
230 constexpr _Enable_copy_move() noexcept = default;
231 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
232 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
234 operator=(_Enable_copy_move const&) noexcept = default;
236 operator=(_Enable_copy_move&&) noexcept = delete;
239 template<typename _Tag>
240 struct _Enable_copy_move<true, false, true, false, _Tag>
242 constexpr _Enable_copy_move() noexcept = default;
243 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
244 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
246 operator=(_Enable_copy_move const&) noexcept = delete;
248 operator=(_Enable_copy_move&&) noexcept = delete;
251 template<typename _Tag>
252 struct _Enable_copy_move<false, false, true, false, _Tag>
254 constexpr _Enable_copy_move() noexcept = default;
255 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
256 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default;
258 operator=(_Enable_copy_move const&) noexcept = delete;
260 operator=(_Enable_copy_move&&) noexcept = delete;
263 template<typename _Tag>
264 struct _Enable_copy_move<true, true, false, false, _Tag>
266 constexpr _Enable_copy_move() noexcept = default;
267 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
268 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
270 operator=(_Enable_copy_move const&) noexcept = default;
272 operator=(_Enable_copy_move&&) noexcept = delete;
275 template<typename _Tag>
276 struct _Enable_copy_move<false, true, false, false, _Tag>
278 constexpr _Enable_copy_move() noexcept = default;
279 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
280 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
282 operator=(_Enable_copy_move const&) noexcept = default;
284 operator=(_Enable_copy_move&&) noexcept = delete;
287 template<typename _Tag>
288 struct _Enable_copy_move<true, false, false, false, _Tag>
290 constexpr _Enable_copy_move() noexcept = default;
291 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default;
292 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
294 operator=(_Enable_copy_move const&) noexcept = delete;
296 operator=(_Enable_copy_move&&) noexcept = delete;
299 template<typename _Tag>
300 struct _Enable_copy_move<false, false, false, false, _Tag>
302 constexpr _Enable_copy_move() noexcept = default;
303 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete;
304 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete;
306 operator=(_Enable_copy_move const&) noexcept = delete;
308 operator=(_Enable_copy_move&&) noexcept = delete;
311 _GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
A mixin helper to conditionally enable or disable the default constructor.
A mixin helper to conditionally enable or disable the default destructor.
A mixin helper to conditionally enable or disable the copy/move special members.
A mixin helper to conditionally enable or disable the special members.