
25 Feb
2009
25 Feb
'09
5:46 p.m.
Neil Groves skrev:
Dear Giovanni,
I do provide both alternatives, for example
boost::make_uniqued_range(rng) is equivalent to rng | uniqued
IMHO the make_... syntax for range adaptors is horrible (i don't even like the past tense, why not just unique?). But why use two different names in the first place? Why not make
I simply dislike lots of overloading particularly where the semantics are different. Perhaps the semantics aren't that different.
There are very different. The past tense is used for adaptors that has O(1) complexity and merely wraps the range's iterators in a new type of iterators. An algorithm like boost::unique(-) really modifies the range, | boost::adaptors::uniqued, does not. -Thorsten