mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Added etl::generate algorithm
This commit is contained in:
parent
59cd9e66d7
commit
7bb125a360
@ -169,6 +169,18 @@ namespace etl
|
||||
return first2;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
// generate
|
||||
template <typename TIterator, typename TFunction>
|
||||
ETL_CONSTEXPR14
|
||||
void generate(TIterator db, TIterator de, TFunction funct)
|
||||
{
|
||||
while (db != de)
|
||||
{
|
||||
*db++ = funct();
|
||||
}
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
// copy
|
||||
#if ETL_USING_STL && ETL_USING_CPP20
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user