Again, since the memory helpd by s can not be known at compile time the 'constexpr' doesn't do anything and you are left with a linear search that uses recursion (pretty heavy). You'd probably be better off with a simple loop.