Adding constexpr in some places, fixing for_each_n and corresponding test