Commit 6df1466c authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Implement easy copying of checked/unchecked_vector_property_map

parent fd883479
......@@ -109,6 +109,14 @@ public:
return unchecked_t(*this, size);
}
// deep copy
checked_vector_property_map copy() const
{
checked_vector_property_map pmap(index);
*(pmap.store) = *store;
return pmap;
}
public:
// Copy ctor absent, default semantics is OK.
// Assignment operator absent, default semantics is OK.
......@@ -175,6 +183,15 @@ public:
checked_t get_checked() {return _checked;}
// deep copy
unchecked_vector_property_map copy() const
{
unchecked_vector_property_map pmap(_checked.index,
_checked.store->size());
*(pmap._checked.store) = *(_checked.store);
return pmap;
}
private:
checked_t _checked;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment