Bug 1434710 - Replaced mozilla::IndexSequence with std::index_sequence and removed #include "mozilla/IndexSequence.h" from ipc/chromium/src/base/task.h. r=botond draft
authorTom Bannister <tomabann@gmail.com>
Wed, 04 Apr 2018 19:58:12 +1000
changeset 778302 994847cbe63ae5fe04cb9572657fb8b6b1657a22
parent 778301 0b976f011cd4086da0cf18ccb4eb4a35d8869019
child 778303 77c76f1108d6dacb118d282d692cf85515a28a0e
push id105466
push userbmo:tomabann@gmail.com
push dateFri, 06 Apr 2018 06:41:20 +0000
reviewersbotond
bugs1434710
milestone61.0a1
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
ipc/chromium/src/base/task.h
--- 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