Cast a list of pointers to a list of constant pointers in C++
I have a class that needs to build / maintain a list of pointers to objects, but then should return a constant list to constant pointers to the same data. So something like:
I have a class that needs to build / maintain a list of pointers to objects, but then should return a constant list to constant pointers to the same data. So something like: