@@ -94,33 +94,33 @@ tuple(Args &&...) -> tuple<Args...>;
9494
9595template <::std::size_t I, typename ... Args>
9696FAST_IO_GNU_ALWAYS_INLINE
97- [[nodiscard]]
98- constexpr auto && get(::fast_io::containers::tuple<Args...> &self) noexcept
97+ [[nodiscard]]
98+ constexpr decltype ( auto ) get(::fast_io::containers::tuple<Args...> &self) noexcept
9999{
100100 return static_cast <::fast_io::containers::details::tuple_element_impl_<I, ::fast_io::containers::details::pack_indexing_t_<I, Args...>> &>(self).val_ ;
101101}
102102
103103template <::std::size_t I, typename ... Args>
104104FAST_IO_GNU_ALWAYS_INLINE
105- [[nodiscard]]
106- constexpr auto && get(::fast_io::containers::tuple<Args...> const &self) noexcept
105+ [[nodiscard]]
106+ constexpr decltype ( auto ) get(::fast_io::containers::tuple<Args...> const &self) noexcept
107107{
108108 return static_cast <::fast_io::containers::details::tuple_element_impl_<I, ::fast_io::containers::details::pack_indexing_t_<I, Args...>> const &>(self).val_ ;
109109}
110110
111111template <::std::size_t I, typename ... Args>
112112FAST_IO_GNU_ALWAYS_INLINE
113- [[nodiscard]]
114- constexpr auto && get(::fast_io::containers::tuple<Args...> &&self) noexcept
113+ [[nodiscard]]
114+ constexpr decltype ( auto ) get(::fast_io::containers::tuple<Args...> &&self) noexcept
115115{
116116 return ::std::move (
117117 static_cast <::fast_io::containers::details::tuple_element_impl_<I, ::fast_io::containers::details::pack_indexing_t_<I, Args...>> &&>(self).val_ );
118118}
119119
120120template <::std::size_t I, typename ... Args>
121121FAST_IO_GNU_ALWAYS_INLINE
122- [[nodiscard]]
123- constexpr auto && get(::fast_io::containers::tuple<Args...> const &&self) noexcept
122+ [[nodiscard]]
123+ constexpr decltype ( auto ) get(::fast_io::containers::tuple<Args...> const &&self) noexcept
124124{
125125 return ::std::move (
126126 static_cast <::fast_io::containers::details::tuple_element_impl_<I, ::fast_io::containers::details::pack_indexing_t_<I, Args...>> const &&>(self).val_ );
@@ -147,17 +147,36 @@ constexpr auto get_tuple_element_by_type_() noexcept
147147template <typename T, typename ... Args>
148148 requires ((::std::same_as<T, Args> + ...) == 1 )
149149FAST_IO_GNU_ALWAYS_INLINE
150- [[nodiscard]]
151- constexpr auto && get(::fast_io::containers::tuple<Args...> const &self) noexcept
150+ [[nodiscard]]
151+ constexpr decltype ( auto ) get(::fast_io::containers::tuple<Args...> const &self) noexcept
152152{
153153 return static_cast <decltype (::fast_io::containers::details::get_tuple_element_by_type_<T, 0 , Args...>())::type const &>(self).val_ ;
154154}
155155
156156template <typename T, typename ... Args>
157157 requires ((::std::same_as<T, Args> + ...) == 1 )
158158FAST_IO_GNU_ALWAYS_INLINE
159- [[nodiscard]]
160- constexpr auto && get(::fast_io::containers::tuple<Args...> const &&self) noexcept
159+ [[nodiscard]]
160+ constexpr decltype (auto ) get(::fast_io::containers::tuple<Args...> const &&self) noexcept
161+ {
162+ return ::std::move (
163+ static_cast <decltype (::fast_io::containers::details::get_tuple_element_by_type_<T, 0 , Args...>())::type const &&>(self).val_ );
164+ }
165+
166+ template <typename T, typename ... Args>
167+ requires ((::std::same_as<T, Args> + ...) == 1 )
168+ FAST_IO_GNU_ALWAYS_INLINE
169+ [[nodiscard]]
170+ constexpr decltype (auto ) get(::fast_io::containers::tuple<Args...> &self) noexcept
171+ {
172+ return static_cast <decltype (::fast_io::containers::details::get_tuple_element_by_type_<T, 0 , Args...>())::type const &>(self).val_ ;
173+ }
174+
175+ template <typename T, typename ... Args>
176+ requires ((::std::same_as<T, Args> + ...) == 1 )
177+ FAST_IO_GNU_ALWAYS_INLINE
178+ [[nodiscard]]
179+ constexpr decltype (auto ) get(::fast_io::containers::tuple<Args...> &&self) noexcept
161180{
162181 return ::std::move (
163182 static_cast <decltype (::fast_io::containers::details::get_tuple_element_by_type_<T, 0 , Args...>())::type const &&>(self).val_ );
@@ -177,15 +196,15 @@ constexpr bool is_tuple_<tuple<Args...>> = true;
177196template <typename T>
178197concept is_tuple = ::fast_io::containers::details::is_tuple_<::std::remove_cvref_t <T>>;
179198
180- template <typename ... Args>
199+ template <typename ... Args>
181200[[nodiscard]]
182- constexpr auto forward_as_tuple (Args&&... args)
201+ constexpr auto forward_as_tuple (Args &&...args)
183202{
184203#if defined(__clang__)
185204#pragma clang diagnostic push
186205#pragma clang diagnostic ignored "-Wmissing-braces"
187206#endif
188- return ::fast_io::containers::tuple<Args&&...>{::std::forward<Args>(args)...};
207+ return ::fast_io::containers::tuple<Args &&...>{::std::forward<Args>(args)...};
189208#if defined(__clang__)
190209#pragma clang diagnostic pop
191210#endif
0 commit comments