using C++17 emplace return type

This commit is contained in:
Jinhao
2018-08-27 06:51:20 +08:00
parent fe185e382b
commit 81d667dbd7
12 changed files with 78 additions and 13 deletions

View File

@@ -85,8 +85,12 @@ namespace nana
}
}
#ifdef _nana_std_has_emplace_return_type
auto & rep = impl_->base.emplace_back();
#else
impl_->base.emplace_back();
auto & rep = impl_->base.back();
#endif
rep.handle = wd;
rep.keys.emplace_back(key);
@@ -242,8 +246,12 @@ namespace detail
return kv.second;
}
#ifdef _nana_std_has_emplace_return_type
return table_.emplace_back(key).second;
#else
table_.emplace_back(key);
return table_.back().second;
#endif
}
iterator find(const Key& key)