<commit_before>// Describing expectations for a valid sparse matrix library

#ifndef SPARSELIB_CONCEPT_HPP
#define SPARSELIB_CONCEPT_HPP

#include <type_traits>
#include <iostream>

// First, some preliminaries (no predefined Concepts are supplied in library yet)
template<typename T> concept bool ForwardIterator =
    requires( T a, T b ) {
    { a != b }
    { a == b }
    { ++a }
    { *a }
};

template<typename T, typename U> concept bool DereferencesTo =
    requires( T a ) {
    { *a } -> U;
};

template<typename T, typename ...Args> concept bool ConstructibleFrom =
    std::is_constructible<T, Args...>::value;

template<typename T> concept bool ForwardIterator =
    std::is_convertible<typename std::iterator_traits<T>::iterator_category,
                        std::forward_iterator_tag>::value;

template<typename T, typename U> concept bool Same =
    std::is_same<T, U>::value;

template<typename T, typename U> concept bool IteratorRange =
    Same<T, U> && ForwardIterator<T>;

template<typename L> concept bool SparseLibrary =<commit_msg>Allow triplet type to be aggregate initializable as well as constructible<commit_after>// Describing expectations for a valid sparse matrix library

#ifndef SPARSELIB_CONCEPT_HPP
#define SPARSELIB_CONCEPT_HPP

#include <type_traits>
#include <iostream>

// First, some preliminaries (no predefined Concepts are supplied in library yet)
template<typename T> concept bool ForwardIterator =
    requires( T a, T b ) {
    { a != b }
    { a == b }
    { ++a }
    { *a }
};

template<typename T, typename U> concept bool DereferencesTo =
    requires( T a ) {
    { *a } -> U;
};

template<typename T, typename ...Args> concept bool ConstructibleFrom =
    std::is_constructible<T, Args...>::value ||     // constructors
    requires(Args... args) { { T{args...} } -> T }; // aggregate initialization

template<typename T> concept bool ForwardIterator =
    std::is_convertible<typename std::iterator_traits<T>::iterator_category,
                        std::forward_iterator_tag>::value;

template<typename T, typename U> concept bool Same =
    std::is_same<T, U>::value;

template<typename T, typename U> concept bool IteratorRange =
    Same<T, U> && ForwardIterator<T>;

template<typename L> concept bool SparseLibrary =
{'fraction_non_alphanumeric': 0.11558669001751314, 'fraction_numerical': 0.0, 'mean_word_length': 3.8720682302771854, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 36, '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': '5425109', 'n_tokens_mistral': 704, 'n_tokens_neox': 670, 'n_words': 211}