Fix builds that use gcc 5 (#7765)

This commit is contained in:
Hariharan Seshadri 2021-05-20 09:19:04 -07:00 committed by GitHub
parent f6eb0f76ae
commit 6c252a0bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,12 +31,12 @@ AllocatorPtr PrepackedWeightsContainer::GetOrCreateAllocator(const std::string&
}
const PrePackedWeights& PrepackedWeightsContainer::GetWeight(const std::string& key) const {
// .at() will throw if th key doesn't exist
// .at() will throw if the key doesn't exist
return prepacked_weights_map_.at(key);
}
bool PrepackedWeightsContainer::WriteWeight(const std::string& key, PrePackedWeights&& packed_weight) {
auto ret = prepacked_weights_map_.insert({key, std::move(packed_weight)});
auto ret = prepacked_weights_map_.insert(std::make_pair(key, std::move(packed_weight)));
return ret.second;
}