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
--- 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)