I have a huge data structure and it's content is updated regularly. I need to apply a filter to it each time I get a change request. So to avoid duplicating/copying it, I use an std::view + std::views::filter. (as lightweight container)
Having this class
class MyClass
{
std::map<std::string, std::set<std::string>> myData;
// How to add the view as class member based on myData ?
};
How can I create this view inside a class. What type to specify ? How to intialize it ? Is it possible to reassign it ?