3#include <boost/mp11/algorithm.hpp>
4#include <boost/mp11/detail/mp_rename.hpp>
20template <
typename Ret,
typename Func,
typename T,
typename... Ts>
22 if (std::invoke(std::forward<Func>(pred), val)) {
23 return Ret{std::in_place, val};
26 if constexpr (
sizeof...(Ts) > 0) {
35template <
typename Func,
typename Tuple>
37 using VariantT = boost::mp11::mp_rename<boost::mp11::mp_unique<Tuple>, std::variant>;
38 using Ret = std::optional<VariantT>;
40 if constexpr (std::tuple_size_v<Tuple> == 0) {
41 return Ret{std::nullopt};
44 [&pred](
const auto&... elems) {
constexpr Ret tuple_find_first_impl(Func &&pred, const T &val, const Ts &... rest)
Definition tuple_matcher.hpp:21
Definition asm_buffer.hpp:19
constexpr auto tuple_find_first(Func &&pred, const Tuple &val)
Definition tuple_matcher.hpp:36