<commit_before>#pragma once

#include <string>

#include <boost/mpl/transform.hpp>
#include <boost/variant/variant.hpp>

#include "blackhole/cpp17/string_view.hpp"

namespace blackhole {
namespace attribute {

struct owned_t;

struct value_t {
    typedef boost::variant<
        std::int64_t,
        double,
        string_view
    > type;

    /// Underlying type.
    type inner;

    value_t(int val): inner(static_cast<std::int64_t>(val)) {}
    value_t(double val): inner(val) {}
    value_t(string_view val): inner(val) {}
    value_t(const owned_t& val);<commit_msg>feat(attribute): make attribute eq comparable<commit_after>#pragma once

#include <string>

#include <boost/mpl/transform.hpp>
#include <boost/variant/variant.hpp>

#include "blackhole/cpp17/string_view.hpp"

namespace blackhole {
namespace attribute {

struct owned_t;

struct value_t {
    typedef boost::variant<
        std::int64_t,
        double,
        string_view
    > type;

    /// Underlying type.
    type inner;

    value_t(int val): inner(static_cast<std::int64_t>(val)) {}
    value_t(double val): inner(val) {}
    value_t(string_view val): inner(val) {}
    value_t(const owned_t& val);

    auto operator==(const value_t& other) const -> bool {
        return inner == other.inner;
    }
{'fraction_non_alphanumeric': 0.1277258566978193, 'fraction_numerical': 0.009345794392523364, 'mean_word_length': 3.508771929824561, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, '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': '1858939', 'n_tokens_mistral': 438, 'n_tokens_neox': 424, 'n_words': 92}