<commit_before>#pragma once

#include <utility>
#include <archie/utils/fused/tuple.h>
#include <archie/utils/meta/indexable.h>
#include <archie/utils/meta/boolean.h>
#include <archie/utils/traits/is_fused_tuple.h>
#include <config.h>

namespace archie {
namespace utils {
  namespace fused {
    namespace detail {
      struct apply_ {
        template <typename F, typename Tp, typename... Us>
        decltype(auto) operator()(F&& f, Tp&& tp, Us&&... us) const {
          return impl(meta::boolean < traits::is_fused_tuple<
                                          std::remove_reference_t<Tp>>::value &&
                          (sizeof...(Us) == 0) > {},
                      std::forward<F>(f), std::forward<Tp>(tp),
                      std::forward<Us>(us)...);
        }

      private:
        template <typename F, typename... Ts>
        decltype(auto) impl(meta::false_t, F&& f, Ts&&... ts) const {
          return std::forward<F>(f)(std::forward<Ts>(ts)...);
        }
        template <std::size_t... ids>
        struct apply_impl {
          template <typename F, typename Tp>
          constexpr decltype(auto) operator()(F&& f, Tp&& t) const {
            return std::forward<F>(f)(fused::get<ids>(std::forward<Tp>(t))...);
          }
        };
        template <typename F, typename Tp>
        decltype(auto) impl(meta::true_t, F&& f, Tp&& tp) const {
          return meta::indexable_t<
              apply_impl,
              fused::tuple_size<std::remove_reference_t<Tp>>::value>{}(
              std::forward<F>(f), std::forward<Tp>(tp));
        }
      };
    }
    constexpr detail::apply_ apply{};
  }
}<commit_msg>use fused::select_overload in fused::apply<commit_after>#pragma once

#include <utility>
#include <archie/utils/fused/tuple.h>
#include <archie/utils/fused/select_overload.h>
#include <archie/utils/meta/indexable.h>
#include <archie/utils/meta/boolean.h>
#include <archie/utils/traits/is_fused_tuple.h>
#include <config.h>

namespace archie {
namespace utils {
  namespace fused {
    namespace detail {
      struct apply_ {
        template <typename F, typename Tp, typename... Us>
        decltype(auto) operator()(F&& f, Tp&& tp, Us&&... us) const {
          return impl(fused::select_overload, std::forward<F>(f),
                      std::forward<Tp>(tp), std::forward<Us>(us)...);
        }

      private:
        template <typename F, typename... Ts>
        decltype(auto) impl(fused::otherwise, F&& f, Ts&&... ts) const {
          return std::forward<F>(f)(std::forward<Ts>(ts)...);
        }
        template <std::size_t... ids>
        struct apply_impl {
          template <typename F, typename Tp>
          constexpr decltype(auto) operator()(F&& f, Tp&& t) const {
            return std::forward<F>(f)(fused::get<ids>(std::forward<Tp>(t))...);
          }
        };
        template <typename F, typename Tp,
                  typename = meta::requires<
                      traits::is_fused_tuple<std::remove_reference_t<Tp>>>>
        decltype(auto) impl(fused::choice<1>, F&& f, Tp&& tp) const {
          return meta::indexable_t<
              apply_impl,
              fused::tuple_size<std::remove_reference_t<Tp>>::value>{}(
              std::forward<F>(f), std::forward<Tp>(tp));
        }
      };
    }
    constexpr detail::apply_ apply{};
  }
}
{'fraction_non_alphanumeric': 0.1661169415292354, 'fraction_numerical': 0.0005997001499250374, 'mean_word_length': 2.302970297029703, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5305363', 'n_tokens_mistral': 1086, 'n_tokens_neox': 1044, 'n_words': 210}