File tree 1 file changed +11
-7
lines changed
1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 2015
2015
\effects
2016
2016
Given the exposition-only function:
2017
2017
\begin{codeblock}
2018
- template<class F, class Tuple, size_t... I>
2019
- constexpr decltype(auto) @\placeholdernc{apply-impl}@(F&& f, Tuple&& t, index_sequence<I...>) {
2018
+ namespace std {
2019
+ template<class F, class Tuple, size_t... I>
2020
+ constexpr decltype(auto) @\placeholdernc{apply-impl}@(F&& f, Tuple&& t, index_sequence<I...>) {
2020
2021
// \expos
2021
- return @\placeholdernc{INVOKE}@(std::forward<F>(f), std::get<I>(std::forward<Tuple>(t))...); // see \ref{func.require}
2022
+ return @\placeholdernc{INVOKE}@(std::forward<F>(f), get<I>(std::forward<Tuple>(t))...); // see \ref{func.require}
2023
+ }
2022
2024
}
2023
2025
\end{codeblock}
2024
2026
Equivalent to:
2039
2041
\effects
2040
2042
Given the exposition-only function:
2041
2043
\begin{codeblock}
2042
- template<class T, class Tuple, size_t... I>
2043
- requires is_constructible_v<T, decltype(get<I>(declval<Tuple>()))...>
2044
- constexpr T @\placeholdernc{make-from-tuple-impl}@(Tuple&& t, index_sequence<I...>) { // \expos
2045
- return T(get<I>(std::forward<Tuple>(t))...);
2044
+ namespace std {
2045
+ template<class T, class Tuple, size_t... I>
2046
+ requires is_constructible_v<T, decltype(get<I>(declval<Tuple>()))...>
2047
+ constexpr T @\placeholdernc{make-from-tuple-impl}@(Tuple&& t, index_sequence<I...>) { // \expos
2048
+ return T(get<I>(std::forward<Tuple>(t))...);
2049
+ }
2046
2050
}
2047
2051
\end{codeblock}
2048
2052
Equivalent to:
You can’t perform that action at this time.
0 commit comments