| 118 | |
| 119 | template <typename Func, typename... Args> |
| 120 | bool try_invoke(Func&& f, Args&&... args) |
| 121 | { |
| 122 | return switch_(bools(is_invocable<Func, Args...>{}), |
| 123 | [&](true_t, auto _) { |
| 124 | _(std::forward<Func>(f))(std::forward<Args>(args)...); |
| 125 | return true; |
| 126 | }, |
| 127 | [](auto...) { |
| 128 | return false; |
| 129 | } |
| 130 | ); |
| 131 | } |
| 132 | |
| 133 | void test_try_invoke() |
| 134 | { |
no test coverage detected