MCPcopy Create free account
hub / github.com/BowenFu/matchit.cpp / matchPatternMultipleImpl

Function matchPatternMultipleImpl

develop/matchit/patterns.h:1099–1113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1097 std::size_t... I, typename ValueTuple, typename PatternTuple,
1098 typename ContextT>
1099 constexpr decltype(auto)
1100 matchPatternMultipleImpl(ValueTuple &&valueTuple, PatternTuple &&patternTuple,
1101 int32_t depth, ContextT &context,
1102 std::index_sequence<I...>)
1103 {
1104 auto const func = [&](auto &&value, auto &&pattern)
1105 {
1106 return matchPattern(std::forward<decltype(value)>(value), pattern,
1107 depth + 1, context);
1108 };
1109 static_cast<void>(func);
1110 return (func(get<I + valueStartIdx>(std::forward<ValueTuple>(valueTuple)),
1111 std::get<I + patternStartIdx>(patternTuple)) &&
1112 ...);
1113 }
1114
1115 template <std::size_t valueStartIdx, std::size_t patternStartIdx,
1116 std::size_t size, typename ValueTuple, typename PatternTuple,

Callers

nothing calls this directly

Calls 1

matchPatternFunction · 0.85

Tested by

no test coverage detected