248 template <
typename Tuple,
size_t... Idx>
260 template <
typename Tag,
typename U1,
typename... U2,
enable_if_t<
262 constexpr tuple(Tag, U1&& this_arg, U2&&... rest_arg)
273 template <
typename Tag,
typename Tuple,
size_t... Index,
enable_if_t<
283 template <
typename Tag,
typename Tuple,
enable_if_t<
290#ifdef MSTL_STANDARD_20__
296 conjunction_v<is_default_constructible<T>, is_default_constructible<Rest>...>,
int> = 0>
297 constexpr explicit(!conjunction_v<
298 is_implicitly_default_constructible<T>, is_implicitly_default_constructible<Rest>...>)
299 tuple()
noexcept(conjunction_v<
300 is_nothrow_default_constructible<T>, is_nothrow_default_constructible<Rest>...>)
301 : base_type(), data_() {}
310 _INNER tuple_constructible<tuple,
const T&,
const Rest&...>::value,
int> = 0>
311 constexpr explicit(
_INNER tuple_explicitly_convertible<tuple,
const T&,
const Rest&...>::value)
312 tuple(
const T& this_arg,
const Rest&... rest_arg)
noexcept(conjunction_v<
313 is_nothrow_copy_constructible<T>, is_nothrow_copy_constructible<Rest>...>)
314 : tuple(exact_arg_construct_tag{}, this_arg, rest_arg...) {}
323 template <
typename U1,
typename... U2,
enable_if_t<conjunction_v<
_INNER tuple_perfect_forward<tuple, U1, U2...>,
324 _INNER tuple_constructible<tuple, U1, U2...>>,
int> = 0>
325 constexpr explicit(
_INNER tuple_explicitly_convertible<tuple, U1, U2...>::value)
326 tuple(U1&& this_arg, U2&&... rest_arg)
noexcept(
_INNER tuple_nothrow_constructible<tuple, U1, U2...>::value)
334 template <
typename... U,
enable_if_t<conjunction_v<
_INNER tuple_constructible<tuple,
const U&...>,
335 _INNER tuple_convertible<tuple,
const tuple<U...>&, U...>>,
int> = 0>
336 constexpr explicit(
_INNER tuple_explicitly_convertible<tuple,
const U&...>::value)
337 tuple(
const tuple<U...>& tup)
noexcept(
_INNER tuple_nothrow_constructible<tuple,
const U&...>::value)
338 : tuple(unpack_utility_construct_tag{}, tup) {}
345 template <
typename... U,
enable_if_t<conjunction_v<
_INNER tuple_constructible<tuple, U...>,
346 _INNER tuple_convertible<tuple, tuple<U...>, U...>>,
int> = 0>
347 constexpr explicit(
_INNER tuple_explicitly_convertible<tuple, U...>::value)
348 tuple(tuple<U...>&& tup)
noexcept(
_INNER tuple_nothrow_constructible<tuple, U...>::value)
349 : tuple(unpack_utility_construct_tag{},
_MSTL move(tup)) {}
358 _INNER tuple_constructible<tuple, const T1&, const T2&>::value,
int> = 0>
359 constexpr explicit(
_INNER tuple_explicitly_convertible<tuple, const T1&, const T2&>::value)
360 tuple(
const pair<T1, T2>& pir)
noexcept(
_INNER tuple_nothrow_constructible<tuple, const T1&, const T2&>::value)
361 : tuple(unpack_utility_construct_tag{}, pir) {}
369 template <typename T1, typename T2, enable_if_t<_INNER tuple_constructible<tuple, T1, T2>::value,
int> = 0>
370 constexpr explicit(
_INNER tuple_explicitly_convertible<tuple, T1, T2>::value)
371 tuple(pair<T1, T2>&& pir)
noexcept(
_INNER tuple_nothrow_constructible<tuple, T1, T2>::value)
372 : tuple(unpack_utility_construct_tag{},
_MSTL move(pir)) {}
375 conjunction<is_default_constructible<T>, is_default_constructible<Rest>...>::value &&
376 !conjunction<is_implicitly_default_constructible<T>,
377 is_implicitly_default_constructible<Rest>...>::value,
int> = 0>
378 explicit tuple() noexcept(conjunction<
379 is_nothrow_default_constructible<T>, is_nothrow_default_constructible<Rest>...>::value)
380 : base_type(), data_() {}
383 conjunction<is_default_constructible<T>, is_default_constructible<Rest>...>::value &&
384 conjunction<is_implicitly_default_constructible<T>,
385 is_implicitly_default_constructible<Rest>...>::value,
int> = 0>
386 tuple() noexcept(conjunction<
387 is_nothrow_default_constructible<T>, is_nothrow_default_constructible<Rest>...>::value)
388 : base_type(), data_() {}
390 template <
typename T = This,
enable_if_t<
_INNER tuple_constructible<tuple,
const T&,
const Rest&...>::value &&
391 _INNER tuple_explicitly_convertible<tuple,
const T&,
const Rest&...>::value,
int> = 0>
392 explicit tuple(
const T& this_arg,
const Rest&... rest_arg)
noexcept(conjunction<
393 is_nothrow_copy_constructible<T>, is_nothrow_copy_constructible<Rest>...>::value)
394 : tuple(exact_arg_construct_tag{}, this_arg, rest_arg...) {}
396 template <
typename T = This,
enable_if_t<
_INNER tuple_constructible<tuple,
const T&,
const Rest&...>::value &&
397 !
_INNER tuple_explicitly_convertible<tuple,
const T&,
const Rest&...>::value,
int> = 0>
398 tuple(
const T& this_arg,
const Rest&... rest_arg)
noexcept(conjunction<
399 is_nothrow_copy_constructible<T>, is_nothrow_copy_constructible<Rest>...>::value)
400 : tuple(exact_arg_construct_tag{}, this_arg, rest_arg...) {}
402 template <
typename U1,
typename... U2,
enable_if_t<
403 conjunction<
_INNER tuple_constructible<tuple, U1, U2...>,
_INNER tuple_convertible<tuple, U1, U2...>>::value &&
404 _INNER tuple_explicitly_convertible<tuple, U1, U2...>::value,
int> = 0>
405 explicit tuple(U1&& this_arg, U2&&... rest_arg)
noexcept(
_INNER tuple_nothrow_constructible<tuple, U1, U2...>::value)
408 template <
typename U1,
typename... U2,
enable_if_t<
409 conjunction<
_INNER tuple_constructible<tuple, U1, U2...>,
_INNER tuple_convertible<tuple, U1, U2...>>::value &&
410 !
_INNER tuple_explicitly_convertible<tuple, U1, U2...>::value,
int> = 0>
411 tuple(U1&& this_arg, U2&&... rest_arg)
noexcept(
_INNER tuple_nothrow_constructible<tuple, U1, U2...>::value)
414 template <
typename... U,
enable_if_t<conjunction<
_INNER tuple_constructible<tuple,
const U&...>,
415 _INNER tuple_convertible<tuple,
const tuple<U...>&, U...>>::value &&
416 _INNER tuple_explicitly_convertible<tuple,
const U&...>::value,
int> = 0>
417 explicit tuple(
const tuple<U...>& tup)
noexcept(
_INNER tuple_nothrow_constructible<tuple,
const U&...>::value)
418 : tuple(unpack_utility_construct_tag{}, tup) {}
420 template <
typename... U,
enable_if_t<conjunction<
_INNER tuple_constructible<tuple,
const U&...>,
421 _INNER tuple_convertible<tuple,
const tuple<U...>&, U...>>::value &&
422 !
_INNER tuple_explicitly_convertible<tuple,
const U&...>::value,
int> = 0>
423 tuple(
const tuple<U...>& tup)
noexcept(
_INNER tuple_nothrow_constructible<tuple,
const U&...>::value)
424 : tuple(unpack_utility_construct_tag{}, tup) {}
427 conjunction<
_INNER tuple_constructible<tuple, U...>,
_INNER tuple_convertible<tuple, tuple<U...>, U...>>::value &&
428 _INNER tuple_explicitly_convertible<tuple, U...>::value,
int> = 0>
429 explicit tuple(tuple<U...>&& tup)
noexcept(
_INNER tuple_nothrow_constructible<tuple, U...>::value)
430 : tuple(unpack_utility_construct_tag{},
_MSTL move(tup)) {}
433 conjunction<
_INNER tuple_constructible<tuple, U...>,
_INNER tuple_convertible<tuple, tuple<U...>, U...>>::value &&
434 !
_INNER tuple_explicitly_convertible<tuple, U...>::value,
int> = 0>
435 tuple(tuple<U...>&& tup)
noexcept(
_INNER tuple_nothrow_constructible<tuple, U...>::value)
436 : tuple(unpack_utility_construct_tag{},
_MSTL move(tup)) {}
438 template <typename T1, typename T2, enable_if_t<_INNER tuple_constructible<tuple, const T1&, const T2&>::value &&
439 _INNER tuple_explicitly_convertible<tuple, const T1&, const T2&>::value,
int> = 0>
440 explicit tuple(
const pair<T1, T2>& pir)
noexcept(
_INNER tuple_nothrow_constructible<tuple, const T1&, const T2&>::value)
441 : tuple(unpack_utility_construct_tag{}, pir) {}
443 template <typename T1, typename T2, enable_if_t<_INNER tuple_constructible<tuple, const T1&, const T2&>::value &&
444 !
_INNER tuple_explicitly_convertible<tuple, const T1&, const T2&>::value,
int> = 0>
445 tuple(
const pair<T1, T2>& pir)
noexcept(
_INNER tuple_nothrow_constructible<tuple, const T1&, const T2&>::value)
446 : tuple(unpack_utility_construct_tag{}, pir) {}
449 _INNER tuple_constructible<tuple, T1, T2>::value &&
_INNER tuple_explicitly_convertible<tuple, T1, T2>::value,
int> = 0>
450 explicit tuple(pair<T1, T2>&& pir)
noexcept(
_INNER tuple_nothrow_constructible<tuple, T1, T2>::value)
451 : tuple(unpack_utility_construct_tag{},
_MSTL move(pir)) {}
454 _INNER tuple_constructible<tuple, T1, T2>::value && !
_INNER tuple_explicitly_convertible<tuple, T1, T2>::value,
int> = 0>
455 tuple(pair<T1, T2>&& pir)
noexcept(
_INNER tuple_nothrow_constructible<tuple, T1, T2>::value)
456 : tuple(unpack_utility_construct_tag{},
_MSTL move(pir)) {}
528 _INNER tuple_assignable<tuple, const T1&, const T2&>::value,
int> = 0>
530 _INNER tuple_nothrow_assignable<tuple, const T1&, const T2&>::value) {
544 _INNER tuple_assignable<tuple, T1, T2>::value,
int> = 0>
546 _INNER tuple_nothrow_assignable<tuple, T1, T2>::value) {
572 template <
typename... U>
574 return data_ == t.data_ && base_type::equal_to(t.get_rest());
583 template <
typename... U>
585 return data_ < rhs.data_ || (!(rhs.data_ < data_) && base_type::less_to(rhs.get_rest()));
588 template <
size_t Index,
typename... Types>
590 template <
size_t Index,
typename... Types>
591 friend constexpr const tuple_element_t<Index, Types...>&
get(
const tuple<Types...>&)
noexcept;
592 template <
size_t Index,
typename... Types>
594 template <
size_t Index, typename... Types>
595 friend constexpr const
tuple_element_t<Index, Types...>&&
get(const tuple<Types...>&&) noexcept;
597 template <
size_t Index, typename... Types>
598 friend constexpr
tuple_element_t<Index, Types...>&& pair_get_from_tuple(tuple<Types...>&&) noexcept;
601 MSTL_NODISCARD constexpr
bool operator ==(const
tuple& rhs) const noexcept {
613 MSTL_NODISCARD
constexpr size_t to_hash() const noexcept {
624 base_type::swap(t.get_rest());