On 01-11-2015 00:33, Mohammed El-Afifi wrote:
Hello everybody,
I know this might have been raised a few times before in this mailing list, but I'd like to know if it's possible(or otherwise what would prevent) to have sorted and randomized adaptors so that I may have a sorted and randomized view of a range respectively. Something like
vector<int> x; // operations to fill x x | boost::adaptors::sorted; x | boost::adaptors::randomized;// That one might also take an optional random generator as a parameter.
I understand that in this case the adaptor isn't entirely lazy as the adapted(x here) must be completely consumed before producing a single element in the resulting range.
Right.
I want to know however if having such adaptors may contradict any basic principles of the existing adaptors.
Well, you could say being lazy is the principle being violated. -Thorsten