<commit_before>#include <iostream>
#include <stdexcept>
#include <limits>
#include <type_traits>

namespace const_expr_string
{
    // Definition
    template<typename CharT>
    class const_expr_string
    {
        public:
            using value_type = CharT;
            using traits_type = std::char_traits<value_type>;
            using size_type = size_t;
            using difference_type = std::ptrdiff_t;
            using const_pointer = const CharT *;
            using pointer = const_pointer;
            using const_reference = const CharT&;
            using reference = const_reference;
            using const_iterator = const CharT*;
            using iterator = const_iterator;
            using const_reverse_iterator = std::reverse_iterator<const_iterator>;
            using reverse_iterator = const_reverse_iterator;
            static constexpr size_type npos = size_type(-1);

            // Constructors
            constexpr const_expr_string(const_pointer data) noexcept;
            constexpr const_expr_string(const const_expr_string<CharT>& other) = default;

            // Size based
            constexpr size_t length() const noexcept;
            constexpr size_t size() const noexcept;
            constexpr size_type max_size() const noexcept;
            constexpr bool empty() const noexcept;

            // Conversion operator
            constexpr operator const_pointer() const noexcept;

            // Iterators
            constexpr iterator begin() const noexcept;
            constexpr const_iterator cbegin() const noexcept;
            constexpr iterator end() const noexcept;
            constexpr const_iterator cend() const noexcept;

            // TODO: Fix reverse_iterator functions!
            //Can't be constexpr without a reverse_iterator type
            //constexpr const_reverse_iterator rbegin() const noexcept;
            //constexpr const_reverse_iterator crbegin() const noexcept;
            //constexpr const_reverse_iterator rend() const noexcept;
            //constexpr const_reverse_iterator crend() const noexcept;

            // Indexing
            constexpr const_reference operator[](size_type pos) const;
            constexpr const_reference at(size_type pos) const;

            // ref positions
            constexpr const_reference front() const;
            constexpr const_reference back() const;

            // Data member
            constexpr const_pointer data() const noexcept;

            // Compares
            constexpr int compare (const_expr_string v) const;
            constexpr int compare (size_type pos1, size_type count1, const_expr_string v) const;
            constexpr int compare (size_type pos1, size_type count1, const_expr_string v,
                    size_type pos2, size_type count2) const;
            constexpr int compare (const_pointer s) const; // TODO: not implemented
            constexpr int compare (size_type pos1, size_type count1, const_pointer s) const; // TODO: not implemented
            constexpr int compare (size_type pos1, size_type count1, const_pointer s, size_type count2) const; // TODO: not implemented

            // Finds
            constexpr size_type find(const_expr_string v, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type find(value_type c, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type find(const_pointer, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type find(const_pointer, size_type pos, size_type count) const;// TODO: not implemented
            constexpr size_type rfind(const_expr_string v, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type rfind(value_type c, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type rfind(const_pointer, size_type pos = 0) const;// TODO: not implemented<commit_msg>Updated TODO comments on the Compare functions<commit_after>#include <iostream>
#include <stdexcept>
#include <limits>
#include <type_traits>

namespace const_expr_string
{
    // Definition
    template<typename CharT>
    class const_expr_string
    {
        public:
            using value_type = CharT;
            using traits_type = std::char_traits<value_type>;
            using size_type = size_t;
            using difference_type = std::ptrdiff_t;
            using const_pointer = const CharT *;
            using pointer = const_pointer;
            using const_reference = const CharT&;
            using reference = const_reference;
            using const_iterator = const CharT*;
            using iterator = const_iterator;
            using const_reverse_iterator = std::reverse_iterator<const_iterator>;
            using reverse_iterator = const_reverse_iterator;
            static constexpr size_type npos = size_type(-1);

            // Constructors
            constexpr const_expr_string(const_pointer data) noexcept;
            constexpr const_expr_string(const const_expr_string<CharT>& other) = default;

            // Size based
            constexpr size_t length() const noexcept;
            constexpr size_t size() const noexcept;
            constexpr size_type max_size() const noexcept;
            constexpr bool empty() const noexcept;

            // Conversion operator
            constexpr operator const_pointer() const noexcept;

            // Iterators
            constexpr iterator begin() const noexcept;
            constexpr const_iterator cbegin() const noexcept;
            constexpr iterator end() const noexcept;
            constexpr const_iterator cend() const noexcept;

            // TODO: Fix reverse_iterator functions!
            //Can't be constexpr without a reverse_iterator type
            //constexpr const_reverse_iterator rbegin() const noexcept;
            //constexpr const_reverse_iterator crbegin() const noexcept;
            //constexpr const_reverse_iterator rend() const noexcept;
            //constexpr const_reverse_iterator crend() const noexcept;

            // Indexing
            constexpr const_reference operator[](size_type pos) const;
            constexpr const_reference at(size_type pos) const;

            // ref positions
            constexpr const_reference front() const;
            constexpr const_reference back() const;

            // Data member
            constexpr const_pointer data() const noexcept;

            // Compares
            constexpr int compare (const_expr_string v) const;
            constexpr int compare (size_type pos1, size_type count1, const_expr_string v) const;
            constexpr int compare (size_type pos1, size_type count1, const_expr_string v,
                    size_type pos2, size_type count2) const;
            constexpr int compare (const_pointer s) const;
            constexpr int compare (size_type pos1, size_type count1, const_pointer s) const;
            constexpr int compare (size_type pos1, size_type count1, const_pointer s, size_type count2) const;

            // Finds
            constexpr size_type find(const_expr_string v, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type find(value_type c, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type find(const_pointer, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type find(const_pointer, size_type pos, size_type count) const;// TODO: not implemented
            constexpr size_type rfind(const_expr_string v, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type rfind(value_type c, size_type pos = 0) const;// TODO: not implemented
            constexpr size_type rfind(const_pointer, size_type pos = 0) const;// TODO: not implemented
{'fraction_non_alphanumeric': 0.06472699307869777, 'fraction_numerical': 0.004614201486798257, 'mean_word_length': 2.405936272370144, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '2859339', 'n_tokens_mistral': 1985, 'n_tokens_neox': 1939, 'n_words': 642}