fork download
#include 
#include 

template
struct DJBhash_helper
     : std::integral_constant {};
 
template
struct DJBhash_helper
     : DJBhash_helper<(acc << 5) + acc + head, tail...> {};
 
template
struct DJBhash
     : DJBhash_helper<5381, str...> {};
 
int main()
{
    std::cout << DJBhash<'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
                         '0', '1', '2', '3', '4', '5', '6', '7'>::value << '\n';
}
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
3434365166