#include <iostream>
using namespace std;
namespace detail
{
    template<size_t Count>
    inline constexpr size_t countof(const char(&string)[Count])
    {
        return Count - 1;
    }

    template<typename T>
    struct ascii_hash_t
    {
        template<typename L>
        static constexpr T f(L const& data, T hash, size_t i = 0)
        {
            return i < countof(data) ? f(data, (hash & (~0u)) ^ (hash << 7) ^ T(data[i]), i + 1) : hash;
        }
    };

    template<typename T, typename L>
    inline constexpr T generate_ascii_hash(L const& data)
    {
        return detail::ascii_hash_t<T>::f(data, 0);
    }
};

template<size_t Count>
inline constexpr uint32_t hash_constexpr(const char(&string)[Count])
{
    return detail::generate_ascii_hash<uint32_t>(string);
}
int main() {
	// your code goes here
	constexpr uint32_t asd = hash_constexpr("asdasd");
	return 0;
}