<commit_before>#pragma once

#include <cstddef>
#include <memory>
#include <functional>
#include <ratio>

#include <circular_iterator.hpp>


namespace helene
{
template <class T,
          std::size_t Size,
          template <class, class, std::size_t> class StoragePolicy>
class sliding_window
    : public StoragePolicy<sliding_window<T, Size, StoragePolicy>, T, Size>
{
    typedef StoragePolicy<sliding_window<T, Size, StoragePolicy>, T, Size>
        storage_policy;

public:
    static const std::size_t size = Size;

    typedef T value_type;
    typedef T& reference;
    typedef const T& const_reference;
    typedef std::size_t size_type;
    typedef std::ptrdiff_t difference_type;
    typedef circular_iterator<T*> iterator;
    typedef circular_iterator<const T*> const_iterator;

public:
    sliding_window()
        : head_(storage_policy::begin(),
                storage_policy::end(),
                storage_policy::begin()),
          tail_(storage_policy::begin(),
                storage_policy::end(),
                storage_policy::end())
    {
    }

    void
    push_back(const T& value)
    {
        *tail_ = value;
        ++tail_;
        ++head_;
    }
<commit_msg>Make initalization of parent storage_policy explicit. 	modified:   include/sliding_window.hpp<commit_after>#pragma once

#include <cstddef>
#include <memory>
#include <functional>
#include <ratio>

#include <circular_iterator.hpp>


namespace helene
{
template <class T,
          std::size_t Size,
          template <class, class, std::size_t> class StoragePolicy>
class sliding_window
    : public StoragePolicy<sliding_window<T, Size, StoragePolicy>, T, Size>
{
    typedef StoragePolicy<sliding_window<T, Size, StoragePolicy>, T, Size>
        storage_policy;

public:
    static const std::size_t size = Size;

    typedef T value_type;
    typedef T& reference;
    typedef const T& const_reference;
    typedef std::size_t size_type;
    typedef std::ptrdiff_t difference_type;
    typedef circular_iterator<T*> iterator;
    typedef circular_iterator<const T*> const_iterator;

public:
    sliding_window()
        : storage_policy(),
          head_(storage_policy::begin(),
                storage_policy::end(),
                storage_policy::begin()),
          tail_(storage_policy::begin(),
                storage_policy::end(),
                storage_policy::end())
    {
    }

    void
    push_back(const T& value)
    {
        *tail_ = value;
        ++tail_;
        ++head_;
    }

{'fraction_non_alphanumeric': 0.1057462090981644, 'fraction_numerical': 0.0, 'mean_word_length': 2.93563579277865, 'pattern_counts': {'":': 0, '<': 29, '<?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': '1330015', 'n_tokens_mistral': 742, 'n_tokens_neox': 727, 'n_words': 178}