Googletest export

Rewrite ReturnNew action without using pump.

PiperOrigin-RevId: 308219616
This commit is contained in:
Abseil Team
2020-04-24 05:17:47 -04:00
committed by Gennadiy Rozental
parent d7ca9af004
commit 955552518b
6 changed files with 104 additions and 175 deletions

View File

@@ -422,11 +422,13 @@ auto ApplyImpl(F&& f, Tuple&& args, IndexSequence<Idx...>) -> decltype(
// Apply the function to a tuple of arguments.
template <typename F, typename Tuple>
auto Apply(F&& f, Tuple&& args)
-> decltype(ApplyImpl(std::forward<F>(f), std::forward<Tuple>(args),
MakeIndexSequence<std::tuple_size<Tuple>::value>())) {
auto Apply(F&& f, Tuple&& args) -> decltype(
ApplyImpl(std::forward<F>(f), std::forward<Tuple>(args),
MakeIndexSequence<std::tuple_size<
typename std::remove_reference<Tuple>::type>::value>())) {
return ApplyImpl(std::forward<F>(f), std::forward<Tuple>(args),
MakeIndexSequence<std::tuple_size<Tuple>::value>());
MakeIndexSequence<std::tuple_size<
typename std::remove_reference<Tuple>::type>::value>());
}
// Template struct Function<F>, where F must be a function type, contains