From 6c252a0bea807aa748b8cfc5dbaad52af3a9e11e Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Thu, 20 May 2021 09:19:04 -0700 Subject: [PATCH] Fix builds that use gcc 5 (#7765) --- onnxruntime/core/framework/prepacked_weights_container.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/core/framework/prepacked_weights_container.cc b/onnxruntime/core/framework/prepacked_weights_container.cc index cc6b45e00f..42cdd3debb 100644 --- a/onnxruntime/core/framework/prepacked_weights_container.cc +++ b/onnxruntime/core/framework/prepacked_weights_container.cc @@ -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; }