Fix SimpleBarrier
[folly.git] / folly / ApplyTuple.h
index 0288f567c2c02ab642ead3c842fddc2b5f6c226b..b22987766702fa4f023ae780abf30e0c55c7d4e9 100644 (file)
@@ -55,9 +55,14 @@ inline constexpr std::size_t sum(std::size_t v1, Args... vs) {
   return v1 + sum(vs...);
 }
 
-template <class... Tuple>
-using MakeIndexSequenceFromTuple = MakeIndexSequence<sum(
-    std::tuple_size<typename std::decay<Tuple>::type>::value...)>;
+template <typename... Tuples>
+struct TupleSizeSum {
+  static constexpr auto value = sum(std::tuple_size<Tuples>::value...);
+};
+
+template <typename... Tuples>
+using MakeIndexSequenceFromTuple = MakeIndexSequence<
+    TupleSizeSum<typename std::decay<Tuples>::type...>::value>;
 
 // This is to allow using this with pointers to member functions,
 // where the first argument in the tuple will be the this pointer.