It occurs to me that I can probably do vector_range<const vector>. This would explain why the template argument to vector_range is a VectorType. I'll give this a try.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sorry for the HUGE delay, apparently my email notification settings for new forum posts got reset when sourceforge updated the UI :-/
I'll have a look at the const vector issue and let you know. const_cast<> is certainly ugly, yet I'm not sure whether there is a 100% clean way of dealing with this.
Best regards,
Karli
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It appears to be impossible to create a vector_range on a const vector.
Since there's no const constructor in C++, it's not immediately obvious to me how this would be implemented -- maybe some clever template trick.
I can also cast away the constness, but that's ugly.
Any suggestions?
It occurs to me that I can probably do vector_range<const vector>. This would explain why the template argument to vector_range is a VectorType. I'll give this a try.
Unfortunately that doesn't seem to work. Is there a recommended work around for this?
Hi Peter,
sorry for the HUGE delay, apparently my email notification settings for new forum posts got reset when sourceforge updated the UI :-/
I'll have a look at the const vector issue and let you know. const_cast<> is certainly ugly, yet I'm not sure whether there is a 100% clean way of dealing with this.
Best regards,
Karli