Bug 1434710 - Replaced mozilla::IndexSequence with std::index_sequence and removed #include "mozilla/IndexSequence.h" from ipc/chromium/src/base/task.h. r=botond
MozReview-Commit-ID: 7ZLvGAaebL4
--- a/ipc/chromium/src/base/task.h
+++ b/ipc/chromium/src/base/task.h
@@ -4,39 +4,38 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_TASK_H_
#define BASE_TASK_H_
#include "base/revocable_store.h"
#include "base/tuple.h"
-#include "mozilla/IndexSequence.h"
#include "mozilla/Tuple.h"
#include "nsISupportsImpl.h"
#include "nsThreadUtils.h"
// Helper functions so that we can call a function a pass it arguments that come
// from a Tuple.
namespace details {
// Call the given method on the given object. Arguments are passed by move
// semantics from the given tuple. If the tuple has length N, the sequence must
// be IndexSequence<0, 1, ..., N-1>.
template<size_t... Indices, class ObjT, class Method, typename... Args>
-void CallMethod(mozilla::IndexSequence<Indices...>, ObjT* obj, Method method,
+void CallMethod(std::index_sequence<Indices...>, ObjT* obj, Method method,
mozilla::Tuple<Args...>& arg)
{
(obj->*method)(mozilla::Move(mozilla::Get<Indices>(arg))...);
}
// Same as above, but call a function.
template<size_t... Indices, typename Function, typename... Args>
-void CallFunction(mozilla::IndexSequence<Indices...>, Function function,
+void CallFunction(std::index_sequence<Indices...>, Function function,
mozilla::Tuple<Args...>& arg)
{
(*function)(mozilla::Move(mozilla::Get<Indices>(arg))...);
}
} // namespace details
// Call a method on the given object. Arguments are passed by move semantics