From f35653866a3bff6c362db8b135e94edd8e8930ce Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Mon, 22 Jul 2024 12:52:29 -0400 Subject: [PATCH] Special case where c++20 is defined by was undefined again --- onnxruntime/core/session/inference_session.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/onnxruntime/core/session/inference_session.cc b/onnxruntime/core/session/inference_session.cc index 0243c128cea3d..2cad8f58efc93 100644 --- a/onnxruntime/core/session/inference_session.cc +++ b/onnxruntime/core/session/inference_session.cc @@ -2748,6 +2748,12 @@ common::Status InferenceSession::RunAsync(const RunOptions* run_options, #if __cplusplus >= 202002L std::function run_fn = [=, this]() { #else +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated" + std::function run_fn = [=]() { +#pragma GCC diagnostic pop +#endif std::function run_fn = [=]() { #endif Status status = Status::OK();