Fix klist members that never compiled
rbegin, rend, crbegin and crend were declared returning iterator or const_iterator while their bodies return reverse_iterator or const_reverse_iterator -- a hard error the first time any of them is named. Correcting that exposed the same class of defect one level down: end() const and cend() build a const_iterator from &_head, which is a const LIST_ENTRY* in a const member function, while the iterator constructor takes a plain PLIST_ENTRY. The iterator carries constness in its List template argument rather than in the entry pointer -- iter_from_entry() const already takes a non-const PLIST_ENTRY -- so const_cast is the consistent fix. Verified by explicitly instantiating klist<void(*)()>, which forces every member to be compiled. Nothing in the tree calls any of these yet.
N
namazso committed
31fc8f17bf8ffb74430ec42aca6ee8d3d909a542
Parent: d1d420f