Relative Content

Tag Archive for c++c++20const-correctness

How to ensure const correctness with a vector of smart pointers in C++20?

I have inherited a large data science project in C++20. To aid reasoning through the code I started to enforce const-correctness. The project involves classes that expose vectors of smart pointers and functions that can work with read-only versions of those, i.e. with const vectors of const pointers to const objects.