| 28 | |
| 29 | template <typename Value, bool byRef> |
| 30 | class MatchHelper |
| 31 | { |
| 32 | private: |
| 33 | using ValueT = typename ValueType<Value, byRef>::ValueT; |
| 34 | ValueT mValue; |
| 35 | using ValueRefT = ValueT &&; |
| 36 | |
| 37 | public: |
| 38 | template <typename V> |
| 39 | constexpr explicit MatchHelper(V &&value) : mValue{std::forward<V>(value)} {} |
| 40 | template <typename... PatternPair> |
| 41 | constexpr auto operator()(PatternPair const &...patterns) |
| 42 | { |
| 43 | return matchPatterns(std::forward<ValueRefT>(mValue), patterns...); |
| 44 | } |
| 45 | }; |
| 46 | |
| 47 | template <typename Value> |
| 48 | constexpr auto match(Value &&value) |
nothing calls this directly
no outgoing calls
no test coverage detected