I am wondering if it is possible to create something like a predicate for std :: map for all its values, so I don't need to edit the values before inserting them into the map.
What I would like is something like this:
mymap["username"] = " Marlon ";
assert(mymap["username"] == "Marlon");
In the context, I create std :: map for the .ini file and . I would like it to automatically remove leading / trailing spaces from the values when I want to restore them . I already created a predicate to ignore the wrapper and spaces from the key, so I want to know if the same can be done for the value.
source
share