Use boost::shared ptr

release/4.3a0
Frank Dellaert 2023-01-25 22:59:22 -08:00
parent e2f69e0afe
commit d00971d2c9
1 changed files with 2 additions and 2 deletions

View File

@ -192,8 +192,8 @@ namespace gtsam {
const_iterator_type it_; const_iterator_type it_;
deref_iterator(const_iterator_type it) : it_(it) {} deref_iterator(const_iterator_type it) : it_(it) {}
ConstKeyValuePair operator*() const { return {it_->first, *(it_->second)}; } ConstKeyValuePair operator*() const { return {it_->first, *(it_->second)}; }
std::unique_ptr<ConstKeyValuePair> operator->() { boost::shared_ptr<ConstKeyValuePair> operator->() {
return std::make_unique<ConstKeyValuePair>(it_->first, *(it_->second)); return boost::make_shared<ConstKeyValuePair>(it_->first, *(it_->second));
} }
bool operator==(const deref_iterator& other) const { bool operator==(const deref_iterator& other) const {
return it_ == other.it_; return it_ == other.it_;