<commit_before>#ifndef MONSOON_OBJPIPE_DETAIL_MERGE_PIPE_H
#define MONSOON_OBJPIPE_DETAIL_MERGE_PIPE_H

#include <algorithm>
#include <functional>
#include <iterator>
#include <type_traits>
#include <monsoon/objpipe/detail/invocable_.h>
#include <monsoon/objpipe/detail/swappable.h>

namespace monsoon::objpipe::detail {


///\brief Adapter for source, that maintains a reference to source front.
///\tparam Underlying objpipe source.
template<typename Source>
class merge_queue_elem_ {
 public:
  ///\brief Transport type for get().
  using transport_type = transport<adapt::front_type<Source>>;
  ///\brief Value type of the source.
  using value_type = adapt::value_type<Source>;

  constexpr merge_queue_elem_(merge_queue_elem_&& other)
  noexcept(std::is_nothrow_move_constructible_v<transport_type>
      && std::is_nothrow_move_constructible_v<Source>)
  : front_val_(std::move(other.front_val_)),
    src_(std::move(other.src_))
  {}

  auto operator=(merge_queue_elem_&& other) noexcept
  -> merge_queue_elem_& {
    front_val_ = std::move(front_val_);
    src_ = std::move(src_);
    return *this;
  }<commit_msg>Change merge pipe to not use references.<commit_after>#ifndef MONSOON_OBJPIPE_DETAIL_MERGE_PIPE_H
#define MONSOON_OBJPIPE_DETAIL_MERGE_PIPE_H

#include <algorithm>
#include <functional>
#include <iterator>
#include <type_traits>
#include <monsoon/objpipe/detail/invocable_.h>
#include <monsoon/objpipe/detail/swappable.h>

namespace monsoon::objpipe::detail {


///\brief Adapter for source, that maintains a reference to source front.
///\tparam Underlying objpipe source.
template<typename Source>
class merge_queue_elem_ {
 public:
  ///\brief Transport type for get().
  ///\note We use value type, since this needs to be swappable
  ///without invalidating references.
  using transport_type = transport<adapt::value_type<Source>>;
  ///\brief Value type of the source.
  using value_type = adapt::value_type<Source>;

  constexpr merge_queue_elem_(merge_queue_elem_&& other)
  noexcept(std::is_nothrow_move_constructible_v<transport_type>
      && std::is_nothrow_move_constructible_v<Source>)
  : front_val_(std::move(other.front_val_)),
    src_(std::move(other.src_))
  {}

  auto operator=(merge_queue_elem_&& other) noexcept
  -> merge_queue_elem_& {
    front_val_ = std::move(front_val_);
    src_ = std::move(src_);
    return *this;
  }
{'fraction_non_alphanumeric': 0.11794439764111204, 'fraction_numerical': 0.0, 'mean_word_length': 5.4890710382513666, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 29, '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': '4437559', 'n_tokens_mistral': 831, 'n_tokens_neox': 797, 'n_words': 166}