Skip to content

Commit 3aa2e5f

Browse files
committed
update tuple declaration
1 parent 9ef3687 commit 3aa2e5f

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

libcxx/include/tuple

+7-9
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,6 @@ public:
392392

393393
template <size_t _Ip, class _Hp>
394394
class __tuple_leaf<_Ip, _Hp, true> : private __remove_cv_t<_Hp> {
395-
typedef __remove_cv_t<_Hp> _BaseT;
396-
397395
public:
398396
_LIBCPP_CONSTEXPR_SINCE_CXX14 __tuple_leaf& operator=(const __tuple_leaf&) = delete;
399397

@@ -404,29 +402,29 @@ public:
404402

405403
template <class _Alloc>
406404
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a)
407-
: _BaseT(allocator_arg_t(), __a) {}
405+
: _Hp(allocator_arg_t(), __a) {}
408406

409407
template <class _Alloc>
410-
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a) : _BaseT(__a) {}
408+
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a) : _Hp(__a) {}
411409

412410
template <class _Tp,
413411
__enable_if_t< _And< _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp> >::value,
414412
int> = 0>
415413
_LIBCPP_HIDE_FROM_ABI
416414
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_leaf(_Tp&& __t) noexcept(is_nothrow_constructible<_Hp, _Tp>::value)
417-
: _BaseT(std::forward<_Tp>(__t)) {}
415+
: _Hp(std::forward<_Tp>(__t)) {}
418416

419417
template <class _Tp, class _Alloc>
420418
_LIBCPP_HIDE_FROM_ABI constexpr explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
421-
: _BaseT(std::forward<_Tp>(__t)) {}
419+
: _Hp(std::forward<_Tp>(__t)) {}
422420

423421
template <class _Tp, class _Alloc>
424422
_LIBCPP_HIDE_FROM_ABI constexpr explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
425-
: _BaseT(allocator_arg_t(), __a, std::forward<_Tp>(__t)) {}
423+
: _Hp(allocator_arg_t(), __a, std::forward<_Tp>(__t)) {}
426424

427425
template <class _Tp, class _Alloc>
428426
_LIBCPP_HIDE_FROM_ABI constexpr explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
429-
: _BaseT(std::forward<_Tp>(__t), __a) {}
427+
: _Hp(std::forward<_Tp>(__t), __a) {}
430428

431429
__tuple_leaf(__tuple_leaf const&) = default;
432430
__tuple_leaf(__tuple_leaf&&) = default;
@@ -538,7 +536,7 @@ __memberwise_forward_assign(_Dest& __dest, _Source&& __source, __tuple_types<_Up
538536

539537
template <class... _Tp>
540538
class _LIBCPP_TEMPLATE_VIS tuple {
541-
typedef __tuple_impl<typename __make_tuple_indices<sizeof...(_Tp)>::type, __remove_cv_t<_Tp>...> _BaseT;
539+
typedef __tuple_impl<typename __make_tuple_indices<sizeof...(_Tp)>::type, _Tp...> _BaseT;
542540

543541
_BaseT __base_;
544542

0 commit comments

Comments
 (0)