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

Function isLarge

sample/isLarge.cpp:4–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <iostream>
3
4constexpr bool isLarge(double value)
5{
6 using namespace matchit;
7 return match(value)(
8 // clang-format off
9 pattern | app(_ * _, _ > 1000) = expr(true),
10 pattern | _ = expr(false)
11 // clang-format on
12 );
13}
14
15// app with projection returning scalar types is supported by constexpr match.
16static_assert(isLarge(100));

Callers 2

isLarge.cppFile · 0.85
mainFunction · 0.85

Calls 3

appFunction · 0.85
matchFunction · 0.50
exprFunction · 0.50

Tested by

no test coverage detected