diff --git a/include/etl/algorithm.h b/include/etl/algorithm.h index cc989d15..dd01415a 100644 --- a/include/etl/algorithm.h +++ b/include/etl/algorithm.h @@ -169,6 +169,18 @@ namespace etl return first2; } + //*************************************************************************** + // generate + template + ETL_CONSTEXPR14 + void generate(TIterator db, TIterator de, TFunction funct) + { + while (db != de) + { + *db++ = funct(); + } + } + //*************************************************************************** // copy #if ETL_USING_STL && ETL_USING_CPP20