-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Labels
Description
We need Ranges to allow modification items during enumeration. We need to investigate can this be achieved in the same syntax:
from(items).for_each([](Human & human){human.age += 1;})
or requires different constructors like:
mut_from(items).for_each([](Human & human){human.age += 1;})
The same question about unexpectedly producing copies - this should not happen actually. Or maybe we need a separate constructor for this:
int total = 0;
copy_from(items).for_each([](Human human){total += human.age;})
Plan:
- Checkout these issues: Non-copyable types of elements are not supported #22, copy assgin #44
- I started experimenting with this here a while ago: Add test for unique_ptr #29
- Propose the best solution :)
Investigate and propose solution to make the library extremely useful. Prefer implicit over explicit mutability and copy-ability specification.