From f62fe088383cea66312a300c5c6e7c1d7669809f Mon Sep 17 00:00:00 2001 From: saganatt <8majak8@gmail.com> Date: Wed, 8 Dec 2021 22:51:14 +0100 Subject: [PATCH 1/2] Extend pack with unique types and interleaved --- Framework/Foundation/include/Framework/Pack.h | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Framework/Foundation/include/Framework/Pack.h b/Framework/Foundation/include/Framework/Pack.h index 62c1f10338777..97c7db418a457 100644 --- a/Framework/Foundation/include/Framework/Pack.h +++ b/Framework/Foundation/include/Framework/Pack.h @@ -90,6 +90,15 @@ constexpr auto concatenate_pack(P1 p1, P2 p2, Ps... ps) template using concatenated_pack_t = decltype(concatenate_pack(Ps{}...)); +template +constexpr auto interleave_pack(pack, pack) +{ + return concatenated_pack_t...>{}; +} + +template +using interleaved_pack_t = decltype(interleave_pack(Ps{}...)); + /// Selects from the pack types that satisfy the Condition template