Read only version of list_of operator[] functions was missing const modifiers. As a result, when trying to access list elements, 1. const list_of ends up calling list's operator[] functions thus without auto type conversion, and 2 if forcing to use list_of::operator[], we encounter compiler error that the call "discards const-ness".
Read only version of list_of operator[] functions was missing const modifiers. As a result, when trying to access list elements, 1. const list_of ends up calling list's operator[] functions thus without auto type conversion, and 2 if forcing to use list_of::operator[], we encounter compiler error that the call "discards const-ness".