Skip to content

Commit

Permalink
Revert "Use auto&& _Tuple_get."
Browse files Browse the repository at this point in the history
This reverts commit d3c83f3.
  • Loading branch information
StephanTLavavej committed Nov 12, 2020
1 parent d3c83f3 commit 97e4323
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions stl/inc/tuple
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ public:
friend constexpr const tuple_element_t<_Index, tuple<_Types...>>&& get(const tuple<_Types...>&& _Tuple) noexcept;

template <size_t _Index, class... _Types>
friend constexpr auto&& _Tuple_get(tuple<_Types...>&& _Tuple) noexcept;
friend constexpr decltype(auto) _Tuple_get(tuple<_Types...>&& _Tuple) noexcept;

template <class _Ty, class... _Types>
friend constexpr _Ty& get(tuple<_Types...>& _Tuple) noexcept;
Expand Down Expand Up @@ -800,7 +800,7 @@ _NODISCARD constexpr const tuple_element_t<_Index, tuple<_Types...>>&& get(const
}

template <size_t _Index, class... _Types>
_NODISCARD constexpr auto&& _Tuple_get(tuple<_Types...>&& _Tuple) noexcept {
_NODISCARD constexpr decltype(auto) _Tuple_get(tuple<_Types...>&& _Tuple) noexcept {
// used by pair's piecewise constructor
using _Ty = tuple_element_t<_Index, tuple<_Types...>>;
using _Ttype = typename tuple_element<_Index, tuple<_Types...>>::_Ttype;
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/utility
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ template <class...>
class tuple;

template <size_t _Index, class... _Types>
_NODISCARD constexpr auto&& _Tuple_get(tuple<_Types...>&& _Tuple) noexcept;
_NODISCARD constexpr decltype(auto) _Tuple_get(tuple<_Types...>&& _Tuple) noexcept;

template <class _Ty1, class _Ty2>
struct pair { // store a pair of values
Expand Down

0 comments on commit 97e4323

Please sign in to comment.