@ibaned Hoping to get your perspective on the following as a much more experienced developer.
I did a little bit of work trying to fix up the const correctness of some of the ask_ functions in the mesh class but hit a bit of a roadblocks because some of the intermediate data is cached in the mesh tags or other arrays in the mesh class. I was thinking about doing the following if/when I have time to allow a const reference to mesh to be useable.
- Create a
Cache struct internal to the Mesh class that holds all of the data/tags that is cached.
- Make the stored instance of
Cache mutable so it can be updated in a const reference to Mesh
- In the
get_tag functions if the tag name doesn't exist check it against the list of names that were used as internal cache variables and give an error message saying "you are relying on deprecated tags use ask_... instead".
@ibaned Hoping to get your perspective on the following as a much more experienced developer.
I did a little bit of work trying to fix up the const correctness of some of the
ask_functions in the mesh class but hit a bit of a roadblocks because some of the intermediate data is cached in the mesh tags or other arrays in the mesh class. I was thinking about doing the following if/when I have time to allow aconstreference to mesh to be useable.Cachestruct internal to theMeshclass that holds all of the data/tags that is cached.Cachemutable so it can be updated in a const reference toMeshget_tagfunctions if the tag name doesn't exist check it against the list of names that were used as internal cache variables and give an error message saying "you are relying on deprecated tags use ask_... instead".