Constant expression hash function

While I was (finally) working on the second part of my Why C++: Template metaprogramming series (here's part1), I noticed I didn't specify the implementation of the hash-function I used in switch-statements.

It's nothing too crazy and wasn't inherently relevant to the point of the code demonstrated either, but I figured I'd mention it nevertheless! It's a nifty little function (see wikipedia) I found various uses for while programming with templates.

template<size_t N>  
constexpr unsigned int hash(const char(&str)[N], size_t I = N) {  
    return (I == 1 ? ((2166136261u ^ str[0]) * 16777619u) : ((hash(str, I - 1) ^ str[I - 1]) * 16777619u));

On another note: CppCon 2016 is just about a month away! While I won't attend in person, I'm excited to watch recordings of some of the talks online. I'm looking forward to many great insights again. Here's the schedule for this year: