<commit_before>#ifndef AUTOCHECK_APPLY_HPP
#define AUTOCHECK_APPLY_HPP

#include <type_traits>
#include <tuple>

namespace autocheck {

  template <int N, int... Is>
  struct range : range<N - 1, N - 1, Is...> {};

  template <int... Is>
  struct range<0, Is...> {};

  /* Const version. */

  template <typename F, typename Tuple>
  struct result_of_apply {};

  template <typename F, typename... Args>
  struct result_of_apply<F, std::tuple<Args...>> {
    typedef typename std::result_of<F(Args&...)>::type type;
  };

  template <typename F, typename Tuple>
  /* Cannot put const in the parameter list here for some reason. Breaks in
   * GCC 4.7.2 and Clang 3.2. Works in Clang 3.3. Doesn't seem right, but
   * we'll do it this way for now. */
  typename result_of_apply<F, typename std::decay<Tuple>::type>::type
  apply(F f, Tuple&& args) {<commit_msg>cleanup<commit_after>#ifndef AUTOCHECK_APPLY_HPP
#define AUTOCHECK_APPLY_HPP

#include <type_traits>
#include <tuple>

namespace autocheck {

  /* To extend for more fixed-size containers, just overload result_of_apply,
   * std::tuple_size, and std::get. */

  template <int N, int... Is>
  struct range : range<N - 1, N - 1, Is...> {};

  template <int... Is>
  struct range<0, Is...> {};

  template <typename F, typename Tuple>
  struct result_of_apply {};

  template <typename F, typename... Args>
  struct result_of_apply<F, std::tuple<Args...>> {
    typedef typename std::result_of<F(Args&...)>::type type;
  };

  template <typename F, typename Tuple>
  typename result_of_apply<F, typename std::decay<Tuple>::type>::type
  apply(F f, Tuple&& args) {
{'fraction_non_alphanumeric': 0.14938271604938272, 'fraction_numerical': 0.008024691358024692, 'mean_word_length': 3.698550724637681, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1332220', 'n_tokens_mistral': 583, 'n_tokens_neox': 545, 'n_words': 168}