<commit_before>#ifndef __bootstrap_hpp
#define __bootstrap_hpp__

#include "boxedcpp.hpp"
#include "register_function.hpp"

template<typename Ret, typename P1, typename P2>
Ret add(P1 p1, P2 p2)
{
  return p1 + p2;
}

template<typename Ret, typename P1, typename P2>
Ret subtract(P1 p1, P2 p2)
{
  return p1 - p2;
}

template<typename Ret, typename P1, typename P2>
Ret divide(P1 p1, P2 p2)
{
  return p1 / p2;
}


template<typename Ret, typename P1, typename P2>
Ret multiply(P1 p1, P2 p2)
{
  return p1 * p2;
}

template<typename P1, typename P2>
bool bool_and(P1 p1, P2 p2)
{
  return p1 && p2;
}

template<typename P1, typename P2>
bool bool_or(P1 p1, P2 p2)
{
  return p1 || p2;
}

template<typename P1, typename P2>
bool equals(P1 p1, P2 p2)
{
  return p1 == p2;
}

template<typename P1, typename P2>
bool not_equals(P1 p1, P2 p2)
{
  return p1 != p2;
}

template<typename P1, typename P2>
bool less_than(P1 p1, P2 p2)
{
  return p1 < p2;
}

template<typename P1, typename P2>
bool greater_than(P1 p1, P2 p2)
{
  return p1 > p2;
}

template<typename P1, typename P2>
bool less_than_equals(P1 p1, P2 p2)
{
  return p1 <= p2;
}

template<typename P1, typename P2>
bool greater_than_equals(P1 p1, P2 p2)
{
  return p1 >= p2;
}

template<typename P1, typename P2>
P1 &timesequal(P1 &p1, P2 p2)
{
  return (p1 *= p2);
}

//Add canonical forms of operators
template<typename T>
void add_oper_equals(BoxedCPP_System &s)
{
  register_function(s, &equals<const T&, const T&>, "=");
}

template<typename T>
void add_oper_add(BoxedCPP_System &s)
{
  register_function(s, &add<T, const T&, const T&>, "+");
}

template<typename T>
void add_oper_subtract(BoxedCPP_System &s)
{
  register_function(s, &subtract<T, const T&, const T&>, "-");
}

template<typename T>
void add_oper_divide(BoxedCPP_System &s)
{
  register_function(s, &divide<T, const T&, const T&>, "-");
}

template<typename T>
void add_oper_multiply(BoxedCPP_System &s)
{
  register_function(s, &multiply<T, const T&, const T&>, "*");
}

template<typename T>
void add_oper_not_equals(BoxedCPP_System &s)
{
  register_function(s, &not_equals<const T&, const T&>, "!=");
}

template<typename T>
void add_oper_less_than(BoxedCPP_System &s)
{
  register_function(s, &less_than<const T&, const T&>, "<");
}

template<typename T>
void add_oper_greater_than(BoxedCPP_System &s)
{
  register_function(s, &greater_than<const T&, const T&>, ">");
}

template<typename T>
void add_oper_less_than_equals(BoxedCPP_System &s)
{
  register_function(s, &less_than_equals<const T&, const T&>, "<=");
}

template<typename T>
void add_oper_greater_than_equals(BoxedCPP_System &s)
{
  register_function(s, &greater_than_equals<const T&, const T&>, ">=");
}


template<typename T, typename R>
void add_opers_comparison_overload(BoxedCPP_System &s)
{
  register_function(s, &equals<const T&, const R&>, "==");
  register_function(s, &not_equals<const T&, const R&>, "!=");
  register_function(s, &less_than<const T&, const R&>, "<");
  register_function(s, &greater_than<const T&, const R&>, ">");
  register_function(s, &less_than_equals<const T&, const R&>, "<=");
  register_function(s, &greater_than_equals<const T&, const R&>, ">=");
}

template<typename T>
void add_opers_comparison(BoxedCPP_System &s)
{
  add_opers_comparison_overload<T, T>(s);
}

template<typename Ret, typename T, typename R>
void add_opers_arithmetic_overload(BoxedCPP_System &s)
{
  register_function(s, &add<Ret, T, R>, "+");
  register_function(s, &subtract<Ret, T, R>, "-");
  register_function(s, &divide<Ret, T, R>, "/");
  register_function(s, &multiply<Ret, T, R>, "*");
  register_function(s, &timesequal<T, R>, "*=");
}

template<typename T><commit_msg>Add registration for /=, -= and += operators<commit_after>#ifndef __bootstrap_hpp
#define __bootstrap_hpp__

#include "boxedcpp.hpp"
#include "register_function.hpp"

template<typename Ret, typename P1, typename P2>
Ret add(P1 p1, P2 p2)
{
  return p1 + p2;
}

template<typename Ret, typename P1, typename P2>
Ret subtract(P1 p1, P2 p2)
{
  return p1 - p2;
}

template<typename Ret, typename P1, typename P2>
Ret divide(P1 p1, P2 p2)
{
  return p1 / p2;
}


template<typename Ret, typename P1, typename P2>
Ret multiply(P1 p1, P2 p2)
{
  return p1 * p2;
}

template<typename P1, typename P2>
bool bool_and(P1 p1, P2 p2)
{
  return p1 && p2;
}

template<typename P1, typename P2>
bool bool_or(P1 p1, P2 p2)
{
  return p1 || p2;
}

template<typename P1, typename P2>
bool equals(P1 p1, P2 p2)
{
  return p1 == p2;
}

template<typename P1, typename P2>
bool not_equals(P1 p1, P2 p2)
{
  return p1 != p2;
}

template<typename P1, typename P2>
bool less_than(P1 p1, P2 p2)
{
  return p1 < p2;
}

template<typename P1, typename P2>
bool greater_than(P1 p1, P2 p2)
{
  return p1 > p2;
}

template<typename P1, typename P2>
bool less_than_equals(P1 p1, P2 p2)
{
  return p1 <= p2;
}

template<typename P1, typename P2>
bool greater_than_equals(P1 p1, P2 p2)
{
  return p1 >= p2;
}

template<typename P1, typename P2>
P1 &timesequal(P1 &p1, const P2 &p2)
{
  return (p1 *= p2);
}

template<typename P1, typename P2>
P1 &dividesequal(P1 &p1, const P2 &p2)
{
  return (p1 /= p2);
}

template<typename P1, typename P2>
P1 &addsequal(P1 &p1, const P2 &p2)
{
  return (p1 += p2);
}

template<typename P1, typename P2>
P1 &subtractsequal(P1 &p1, const P2 &p2)
{
  return (p1 -= p2);
}

//Add canonical forms of operators
template<typename T>
void add_oper_equals(BoxedCPP_System &s)
{
  register_function(s, &equals<const T&, const T&>, "=");
}

template<typename T>
void add_oper_add(BoxedCPP_System &s)
{
  register_function(s, &add<T, const T&, const T&>, "+");
}

template<typename T>
void add_oper_subtract(BoxedCPP_System &s)
{
  register_function(s, &subtract<T, const T&, const T&>, "-");
}

template<typename T>
void add_oper_divide(BoxedCPP_System &s)
{
  register_function(s, &divide<T, const T&, const T&>, "-");
}

template<typename T>
void add_oper_multiply(BoxedCPP_System &s)
{
  register_function(s, &multiply<T, const T&, const T&>, "*");
}

template<typename T>
void add_oper_not_equals(BoxedCPP_System &s)
{
  register_function(s, &not_equals<const T&, const T&>, "!=");
}

template<typename T>
void add_oper_less_than(BoxedCPP_System &s)
{
  register_function(s, &less_than<const T&, const T&>, "<");
}

template<typename T>
void add_oper_greater_than(BoxedCPP_System &s)
{
  register_function(s, &greater_than<const T&, const T&>, ">");
}

template<typename T>
void add_oper_less_than_equals(BoxedCPP_System &s)
{
  register_function(s, &less_than_equals<const T&, const T&>, "<=");
}

template<typename T>
void add_oper_greater_than_equals(BoxedCPP_System &s)
{
  register_function(s, &greater_than_equals<const T&, const T&>, ">=");
}


template<typename T, typename R>
void add_opers_comparison_overload(BoxedCPP_System &s)
{
  register_function(s, &equals<const T&, const R&>, "==");
  register_function(s, &not_equals<const T&, const R&>, "!=");
  register_function(s, &less_than<const T&, const R&>, "<");
  register_function(s, &greater_than<const T&, const R&>, ">");
  register_function(s, &less_than_equals<const T&, const R&>, "<=");
  register_function(s, &greater_than_equals<const T&, const R&>, ">=");
}

template<typename T>
void add_opers_comparison(BoxedCPP_System &s)
{
  add_opers_comparison_overload<T, T>(s);
}

template<typename Ret, typename T, typename R>
void add_opers_arithmetic_overload(BoxedCPP_System &s)
{
  register_function(s, &add<Ret, T, R>, "+");
  register_function(s, &subtract<Ret, T, R>, "-");
  register_function(s, &divide<Ret, T, R>, "/");
  register_function(s, &multiply<Ret, T, R>, "*");
  register_function(s, &timesequal<T, R>, "*=");
  register_function(s, &dividesequal<T, R>, "/=");
  register_function(s, &subtractsequal<T, R>, "-=");
  register_function(s, &addsequal<T, R>, "+=");
}

template<typename T>
{'fraction_non_alphanumeric': 0.15542521994134897, 'fraction_numerical': 0.030218028815504273, 'mean_word_length': 5.591596638655462, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 119, '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': '2320955', 'n_tokens_mistral': 3266, 'n_tokens_neox': 3188, 'n_words': 762}