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

Function recursiveSymmetric

test/matchit/ds.cpp:236–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235template <typename Range>
236constexpr bool recursiveSymmetric(Range const &range)
237{
238 Id<int32_t> i;
239 Id<SubrangeT<Range const>> subrange;
240 return match(range)(
241 // clang-format off
242 pattern | ds(i, subrange.at(ooo), i) = [&] { return recursiveSymmetric(*subrange); },
243 pattern | ds(i, subrange.at(ooo), _) = expr(false),
244 pattern | _ = expr(true)
245 // clang-format on
246 );
247}
248
249TEST(Ds, subrangeOooBinder)
250{

Callers 1

TESTFunction · 0.70

Calls 4

matchFunction · 0.50
dsFunction · 0.50
exprFunction · 0.50
atMethod · 0.45

Tested by

no test coverage detected