Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <template <typename Arg> class P, TypeList TL>
- struct FilterImpl{
- using Ret = Nil;
- };
- template <template <typename> class P, TypeSequence TS>
- struct FilterImpl<P, TS> {
- private:
- template <typename T>
- using NotP = ApplyLogicNotToValue<P<T>>;
- using Skipped = typename Impl::SkipWhileImpl<NotP, TS>::Ret; // Skip all args for which P is false.
- template <TypeList TL_>
- struct AfterSkip;
- template <TypeSequence TS_>
- struct AfterSkip<TS_> {
- using Head = typename TS_::Head;
- using Tail = typename FilterImpl<P, typename TS_::Tail>::Ret;
- };
- template <Empty TE>
- struct AfterSkip<TE> : Nil {};
- public:
- using Ret = AfterSkip<Skipped>;
- };
Advertisement
Add Comment
Please, Sign In to add comment