Bug 1434710 - Replaced mozilla::IndexSequence with std::index_sequence and removed #include "mozilla/IndexSequence.h" from js/src/threading/Thread.h. r=botond
MozReview-Commit-ID: AXRmKV8PMVy
--- a/js/src/threading/Thread.h
+++ b/js/src/threading/Thread.h
@@ -5,17 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef threading_Thread_h
#define threading_Thread_h
#include "mozilla/Atomics.h"
#include "mozilla/Attributes.h"
#include "mozilla/HashFunctions.h"
-#include "mozilla/IndexSequence.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/Tuple.h"
#include <stdint.h>
#include "jsutil.h"
#include "threading/LockGuard.h"
@@ -233,17 +232,17 @@ public:
static THREAD_RETURN_TYPE THREAD_CALL_API Start(void* aPack) {
auto* pack = static_cast<ThreadTrampoline<F, Args...>*>(aPack);
pack->callMain(typename mozilla::IndexSequenceFor<Args...>::Type());
js_delete(pack);
return 0;
}
template<size_t ...Indices>
- void callMain(mozilla::IndexSequence<Indices...>) {
+ void callMain(std::index_sequence<Indices...>) {
f(mozilla::Get<Indices>(args)...);
}
};
} // namespace detail
} // namespace js
#undef THREAD_RETURN_TYPE