From df3a157dd1590bb195014d7632cc69dc4d7ac8c3 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Sat, 20 Jul 2019 08:33:04 -0700 Subject: [PATCH] Add noexcept to cxx api (#1448) --- include/onnxruntime/core/session/onnxruntime_cxx_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/onnxruntime/core/session/onnxruntime_cxx_api.h b/include/onnxruntime/core/session/onnxruntime_cxx_api.h index 2ea0a0d238..8cd8dea637 100644 --- a/include/onnxruntime/core/session/onnxruntime_cxx_api.h +++ b/include/onnxruntime/core/session/onnxruntime_cxx_api.h @@ -73,8 +73,8 @@ struct Base { protected: Base(const Base&) = delete; - Base(Base&& v) : p_{v.p_} { v.p_ = nullptr; } - void operator=(Base&& v) { + Base(Base&& v) noexcept : p_{v.p_} { v.p_ = nullptr; } + void operator=(Base&& v) noexcept { OrtRelease(p_); p_ = v.p_; v.p_ = nullptr;