<commit_before>#pragma once

#include <type_traits>

namespace fys
{

template<class T>
auto underlying_cast(T& t) -> typename std::underlying_type<T>::type
{
    return static_cast<typename std::underlying_type<T>::type>(t);
}

template<class T>
auto underlying_reference_cast(T& t) -> typename std::underlying_type<T>::type&
{
    return reinterpret_cast<typename std::underlying_type<T>::type&>(t);
}<commit_msg>fix underlying_cast, taking a const& instead of &, now usable with temporaries<commit_after>#pragma once

#include <type_traits>

namespace fys
{

template<class T>
auto underlying_cast(T const& t) -> typename std::underlying_type<T>::type
{
    return static_cast<typename std::underlying_type<T>::type>(t);
}

template<class T>
auto underlying_reference_cast(T& t) -> typename std::underlying_type<T>::type&
{
    return reinterpret_cast<typename std::underlying_type<T>::type&>(t);
}
{'fraction_non_alphanumeric': 0.14206437291897892, 'fraction_numerical': 0.0, 'mean_word_length': 7.59047619047619, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, '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': '3797167', 'n_tokens_mistral': 306, 'n_tokens_neox': 297, 'n_words': 63}