Bug 1434710 - Replaced mozilla::IndexSequence with std::index_sequence and removed #include "mozilla/IndexSequence.h" from js/src/frontend/EitherParser.h. r=botond draft
authorTom Bannister <tomabann@gmail.com>
Wed, 04 Apr 2018 20:05:39 +1000
changeset 778303 77c76f1108d6dacb118d282d692cf85515a28a0e
parent 778302 994847cbe63ae5fe04cb9572657fb8b6b1657a22
child 778304 988a0dc89b8869190615fd3ba2b61ea9165487b1
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 js/src/frontend/EitherParser.h. r=botond MozReview-Commit-ID: 8NStpChi7yw
js/src/frontend/EitherParser.h
--- a/js/src/frontend/EitherParser.h
+++ b/js/src/frontend/EitherParser.h
@@ -8,17 +8,16 @@
  * A variant-like class abstracting operations on a Parser with a given ParseHandler but
  * unspecified character type.
  */
 
 #ifndef frontend_EitherParser_h
 #define frontend_EitherParser_h
 
 #include "mozilla/Attributes.h"
-#include "mozilla/IndexSequence.h"
 #include "mozilla/Move.h"
 #include "mozilla/Tuple.h"
 #include "mozilla/TypeTraits.h"
 #include "mozilla/Variant.h"
 
 #include "frontend/Parser.h"
 #include "frontend/TokenStream.h"
 
@@ -30,17 +29,17 @@ template<template <class Parser> class G
          template <class This> class MemberFunction,
          typename... Args>
 struct InvokeMemberFunction
 {
     mozilla::Tuple<typename mozilla::Decay<Args>::Type...> args;
 
     template<class This, size_t... Indices>
     auto
-    matchInternal(This* obj, mozilla::IndexSequence<Indices...>)
+    matchInternal(This* obj, std::index_sequence<Indices...>)
       -> decltype(((*obj).*(MemberFunction<This>::get()))(mozilla::Get<Indices>(args)...))
     {
         return ((*obj).*(MemberFunction<This>::get()))(mozilla::Get<Indices>(args)...);
     }
 
   public:
     template<typename... ActualArgs>
     explicit InvokeMemberFunction(ActualArgs&&... actualArgs)