◆ logical()
template<typename Type , typename Cardinal >
Constructs a eve::logical from a Callable Object. The Callable Object must satisfy the following prototype: T generator(std::ptrdiff_t index, std::ptrdiff_t cardinal);
and is supposed to return the value computed from the current index and the cardinal to store at said index.
Example: See it live on Compiler Explorer #include <eve/logical.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
// Generates the wide [true false true .. ]
std::cout << r << "\n";
}
|