4 ms·
This is nice short-hand that I've wanted for a while. I do wish they would have made them overloads of the existing functions in the same namespace, rather than
by pavon 5y ago
This is nice short-hand that I've wanted for a while. I do wish they would have made them overloads of the existing functions in the same namespace, rather than in a new ranges namespace. Oh well, you can always use that namespace, and even if you don't "::ranges" is still less typing than "begin(), end()".
- beojan 5y agoYou can always do something like namespace rng = std::ranges;
- inetknght 5y ago> namespace rng = std::ranges Aliasing the namespace is great! But pick a good name for the alias. Naming things is, after all, one of the hardest things for programmers to do. If I see `rng::` without knowing what it is then I'm going to assume it's something to do with a random number generator.