diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index ee004790..273c7c09 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -506,19 +506,8 @@ struct BooleanConstant {}; // reduce code size. GTEST_API_ void IllegalDoDefault(const char* file, int line); -// Helper types for Apply() below. -template struct int_pack { typedef int_pack type; }; - -template struct append; -template -struct append, I> : int_pack {}; - -template -struct make_int_pack : append::type, C - 1> {}; -template <> struct make_int_pack<0> : int_pack<> {}; - template -auto ApplyImpl(F&& f, Tuple&& args, int_pack) -> decltype( +auto ApplyImpl(F&& f, Tuple&& args, IndexSequence) -> decltype( std::forward(f)(std::get(std::forward(args))...)) { return std::forward(f)(std::get(std::forward(args))...); } @@ -527,9 +516,9 @@ auto ApplyImpl(F&& f, Tuple&& args, int_pack) -> decltype( template auto Apply(F&& f, Tuple&& args) -> decltype(ApplyImpl(std::forward(f), std::forward(args), - make_int_pack::value>())) { + MakeIndexSequence::value>())) { return ApplyImpl(std::forward(f), std::forward(args), - make_int_pack::value>()); + MakeIndexSequence::value>()); } // Template struct Function, where F must be a function type, contains