4 ms·
Why is for-each out of the question? for(const thingy &x : myContainer) What's so illegal about that??? Are you also not writing your own move constructors an
by 72deluxe 5y ago
Why is for-each out of the question?
for(const thingy &x : myContainer)
What's so illegal about that??? Are you also not writing your own move constructors and assignment operators?
- gambiting 5y agoNothing is illegal about it, I'm just saying that in games our engines have tonnes of various containers, some of which don't work with a for each loop because they require iterators to be implemented and we don't have them, or containers which are containers but which aren't actually meant to ever be iterated upon. Again, there's nothing wrong about foreach loops in general. I'm just saying that in my industry and in the engines that we work with even the "basic" features of modern C++ are frowned upon for <reasons>.
- 72deluxe 5y agoVery odd and amusing at the same time!