<commit_before>//
// snowflake.hpp
// *************
//
// Copyright (c) 2019 <NAME> (sharon at aegis dot gg)
//
// Distributed under the MIT License. (See accompanying file LICENSE)
//

#pragma once

#include "aegis/fwd.hpp"
#include "aegis/config.hpp"
#include <nlohmann/json.hpp>


namespace aegis
{

/// Stores creation time and extra data specific to Discord for entities
class snowflake
{
public:
    constexpr snowflake() noexcept : _id(0) {}
    constexpr snowflake(int64_t _snowflake) noexcept : _id(_snowflake) {}
    constexpr snowflake(const snowflake & _snowflake) noexcept : _id(_snowflake._id) {}
    explicit snowflake(const char * _snowflake) noexcept : _id(std::stoll(std::string(_snowflake))) {}
    explicit snowflake(const std::string & _snowflake) noexcept : _id(std::stoll(_snowflake)) {}
    explicit snowflake(const std::string_view _snowflake) noexcept : _id(std::stoll(std::string{ _snowflake })) {}
	explicit snowflake(const nlohmann::json & _snowflake) noexcept : _id(std::stoll(_snowflake.get<std::string>())) {}
	snowflake(const aegis::guild & _guild) noexcept;
	snowflake(const aegis::channel & _channel) noexcept;
	snowflake(const aegis::gateway::objects::role & _role) noexcept;
	snowflake(const aegis::gateway::objects::message & _message) noexcept;
	snowflake(const aegis::gateway::objects::emoji & _emoji) noexcept;
	snowflake(const aegis::gateway::objects::attachment & _attachment) noexcept;

    constexpr operator int64_t() const noexcept
    {
        return _id;<commit_msg>Forgot c++17 checks for std::string_view<commit_after>//
// snowflake.hpp
// *************
//
// Copyright (c) 2019 <NAME> (sharon at aegis dot gg)
//
// Distributed under the MIT License. (See accompanying file LICENSE)
//

#pragma once

#include "aegis/fwd.hpp"
#include "aegis/config.hpp"
#include <nlohmann/json.hpp>


namespace aegis
{

/// Stores creation time and extra data specific to Discord for entities
class snowflake
{
public:
    constexpr snowflake() noexcept : _id(0) {}
    constexpr snowflake(int64_t _snowflake) noexcept : _id(_snowflake) {}
    constexpr snowflake(const snowflake & _snowflake) noexcept : _id(_snowflake._id) {}
    explicit snowflake(const char * _snowflake) noexcept : _id(std::stoll(std::string(_snowflake))) {}
    explicit snowflake(const std::string & _snowflake) noexcept : _id(std::stoll(_snowflake)) {}
#if defined(AEGIS_CXX17)
    explicit snowflake(const std::string_view _snowflake) noexcept : _id(std::stoll(std::string{ _snowflake })) {}
#endif
	explicit snowflake(const nlohmann::json & _snowflake) noexcept : _id(std::stoll(_snowflake.get<std::string>())) {}
	snowflake(const aegis::guild & _guild) noexcept;
	snowflake(const aegis::channel & _channel) noexcept;
	snowflake(const aegis::gateway::objects::role & _role) noexcept;
	snowflake(const aegis::gateway::objects::message & _message) noexcept;
	snowflake(const aegis::gateway::objects::emoji & _emoji) noexcept;
	snowflake(const aegis::gateway::objects::attachment & _attachment) noexcept;

    constexpr operator int64_t() const noexcept
    {
        return _id;
{'fraction_non_alphanumeric': 0.13911355548366225, 'fraction_numerical': 0.0071174377224199285, 'mean_word_length': 5.523206751054852, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2731908', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1118, 'n_words': 236}