diff --git a/onnxruntime/core/providers/coreml/coreml_execution_provider.cc b/onnxruntime/core/providers/coreml/coreml_execution_provider.cc index 86222e364666a..a208a44eb39ff 100644 --- a/onnxruntime/core/providers/coreml/coreml_execution_provider.cc +++ b/onnxruntime/core/providers/coreml/coreml_execution_provider.cc @@ -66,7 +66,7 @@ CoreMLExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph_vie if (main_graph->GetModel().MetaData().count(kCOREML_CACHE_KEY) > 0) { user_provided_key = graph_viewer.GetGraph().GetModel().MetaData().at(kCOREML_CACHE_KEY); if (user_provided_key.size() > 32 || - std::any_if(user_provided_key.begin(), user_provided_key.end(), + std::any_of(user_provided_key.begin(), user_provided_key.end(), [](unsigned char c) { return !std::isalnum(c); })) { user_provided_key = std::to_string(std::hash{}(user_provided_key)); }