<commit_before>#pragma once

#include <string>

namespace cm {

template<typename T>
class Sqr_t
{
public:
	static constexpr Sqr_t NONE = Sqr_t(-1);
	static constexpr unsigned COUNT = 64;

private:
	T mValue;

public:

	constexpr Sqr_t()
	: mValue(-1)
	{
		;
	}

	explicit constexpr Sqr_t(T value)
	: mValue(value)
	{
		;
	}

	Sqr_t(const std::string& str, size_t& idx)
	{
		mValue = str[idx++] - 'a';
		mValue += ('8' - str[idx++]) * 8;
	}

	constexpr unsigned row() const
	{
		return mValue >> 3;
	}

	constexpr unsigned col() const
	{
		return mValue & 7;
	}

	constexpr operator const T() const
	{
		return mValue;
	}

	bool operator==(const Sqr_t& rhs) const
	{
		return mValue == rhs.mValue;
	}

	bool operator!=(const Sqr_t& rhs) const
	{
		return mValue != rhs.mValue;
	}

	explicit operator bool() const
	{
		return *this != NONE;
	}

	std::string toStr() const
	{
		const char s[] = {(char) ('a' + col()), (char) ('8' - row()), '\0'};
		return s;
	}
};

template<typename T>
constexpr Sqr_t<T> Sqr_t<T>::NONE;

typedef Sqr_t<unsigned> Sqr;

}
<commit_msg>Two new constructors for Sqr.<commit_after>#pragma once

#include <string>

namespace cm {

template<typename T>
class Sqr_t
{
public:
	static constexpr Sqr_t NONE = Sqr_t(-1);
	static constexpr unsigned COUNT = 64;

private:
	T mValue;

public:

	constexpr Sqr_t()
	: mValue(-1)
	{
		;
	}

	explicit constexpr Sqr_t(T value)
	: mValue(value)
	{
		;
	}

	constexpr Sqr_t(T row, T column)
	: Sqr_t(row * 8 + column)
	{
		;
	}

	Sqr_t(const std::string& str)
	{
		mValue = str[0] - 'a';
		mValue += ('8' - str[1]) * 8;
	}

	Sqr_t(const std::string& str, size_t& idx)
	{
		mValue = str[idx++] - 'a';
		mValue += ('8' - str[idx++]) * 8;
	}

	constexpr unsigned row() const
	{
		return mValue >> 3;
	}

	constexpr unsigned col() const
	{
		return mValue & 7;
	}

	constexpr operator const T() const
	{
		return mValue;
	}

	bool operator==(const Sqr_t& rhs) const
	{
		return mValue == rhs.mValue;
	}

	bool operator!=(const Sqr_t& rhs) const
	{
		return mValue != rhs.mValue;
	}

	explicit operator bool() const
	{
		return *this != NONE;
	}

	std::string toStr() const
	{
		const char s[] = {(char) ('a' + col()), (char) ('8' - row()), '\0'};
		return s;
	}
};

template<typename T>
constexpr Sqr_t<T> Sqr_t<T>::NONE;

typedef Sqr_t<unsigned> Sqr;

}

{'fraction_non_alphanumeric': 0.1621271076523995, 'fraction_numerical': 0.010808473843493299, 'mean_word_length': 3.3333333333333335, 'pattern_counts': {'":': 0, '<': 15, '<?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': '622108', 'n_tokens_mistral': 1077, 'n_tokens_neox': 973, 'n_words': 246}