Back to problems

Concatenate Two C++ Index Sequences at Compile Time

Algorithm · Squarepoint · Medium

Design a compile-time C++ type trait that accepts two std::index_sequence specializations and produces a single std::index_sequence containing every index from the first argument followed by every index from the second argument, with their original relative order preserved. Implement the concatenation using a primary template followed by a partial specialization that unpacks two variadic template parameter packs and expands them into one output pack. Expose the result…

Checking your access…