-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
It would be valuable to reassign container objects inline using the =
operator. For example, I have workflows where I iteratively build containers while discarding old versions. It would be very convenient to do so via something like:
ygm::container::map<key_type, value_type> my_map = make_map();
while(condition == true) {
my_map = make_new_map(my_map);
}
This does not currently work, and I believe we need to add an overloaded =
operator for each container with an implementation like
container_type &operator=(container_type rhs) {
std::swap(*this, rhs);
return *this;
}
We will probably need to do some accounting with the ygm_ptr
s for the objects in this case, though.
Metadata
Metadata
Assignees
Labels
No labels