<commit_before>#pragma once

namespace lw {

#define LW_DEFINE_SINGLETON_INSTANCE( _Type ) _Type* Singleton< _Type >::s_instance = nullptr;

/// @brief Base class for singletons.
///
/// @tparam T The type to have only a single instance.
template< class T >
class Singleton {
public:
    static bool exists( void ){
        return s_instance != nullptr;
    }

    static T* instance_ptr( void ){
        return s_instance;
    }

    static T& instance( void ){
        return *instance_ptr();
    }

    Singleton( void ){
        s_instance = (T*)this;
    }

    Singleton( const Singleton& ) = delete;

    Singleton( Singleton&& other ){
        s_instance = (T*)this;
    }

    ~Singleton( void ){
        s_instance = nullptr;
    }

private:
    static T* s_instance;
};

}
<commit_msg>Fixed singleton defining macro<commit_after>#pragma once

namespace lw {

#define LW_DEFINE_SINGLETON_INSTANCE( _Type ) \
    template<> _Type* Singleton< _Type >::s_instance = nullptr;

/// @brief Base class for singletons.
///
/// @tparam T The type to have only a single instance.
template< class T >
class Singleton {
public:
    static bool exists( void ){
        return s_instance != nullptr;
    }

    static T* instance_ptr( void ){
        return s_instance;
    }

    static T& instance( void ){
        return *instance_ptr();
    }

    Singleton( void ){
        s_instance = (T*)this;
    }

    Singleton( const Singleton& ) = delete;

    Singleton( Singleton&& other ){
        s_instance = (T*)this;
    }

    ~Singleton( void ){
        s_instance = nullptr;
    }

private:
    static T* s_instance;
};

}

{'fraction_non_alphanumeric': 0.11500615006150061, 'fraction_numerical': 0.0, 'mean_word_length': 2.498924731182796, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '82668', 'n_tokens_mistral': 524, 'n_tokens_neox': 506, 'n_words': 150}