allow GenericMemento to access data through arrow operator
the arrow allows
This commit is contained in:
parent
09375ced9c
commit
46e6a78682
@ -29,6 +29,13 @@ class GenericMemento : public nf7::MutableMemento {
|
||||
assert(map_.empty());
|
||||
}
|
||||
|
||||
T* operator->() noexcept {
|
||||
return &data_;
|
||||
}
|
||||
const T* operator->() const noexcept {
|
||||
return &data_;
|
||||
}
|
||||
|
||||
std::shared_ptr<Tag> Save() noexcept override {
|
||||
if (tag_) return tag_;
|
||||
auto [itr, emplaced] = map_.emplace(next_++, data_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user