add c++14 constexpr version: generate, generate_n