From efa1b0d8645c1cc697252cc11c222805fbaee2fb Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Thu, 17 Dec 2020 13:53:24 -0800 Subject: [PATCH] Minor fix to satisfy c++14 (#6162) --- .../core/session/experimental_onnxruntime_cxx_api.h | 6 ++++-- .../core/session/experimental_onnxruntime_cxx_inline.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/onnxruntime/core/session/experimental_onnxruntime_cxx_api.h b/include/onnxruntime/core/session/experimental_onnxruntime_cxx_api.h index eb08a19b75..6efb20ad83 100644 --- a/include/onnxruntime/core/session/experimental_onnxruntime_cxx_api.h +++ b/include/onnxruntime/core/session/experimental_onnxruntime_cxx_api.h @@ -19,7 +19,8 @@ #pragma once #include "onnxruntime_cxx_api.h" -namespace Ort::Experimental { +namespace Ort { +namespace Experimental { struct Session : Ort::Session { Session(Env& env, std::basic_string& model_path, SessionOptions& options) @@ -62,6 +63,7 @@ struct Value : Ort::Value { static Ort::Value CreateTensor(const std::vector& shape, ONNXTensorElementDataType type); }; -} // namespace Ort::Experimental +} +} #include "experimental_onnxruntime_cxx_inline.h" diff --git a/include/onnxruntime/core/session/experimental_onnxruntime_cxx_inline.h b/include/onnxruntime/core/session/experimental_onnxruntime_cxx_inline.h index c38ed3bd42..075de83ead 100644 --- a/include/onnxruntime/core/session/experimental_onnxruntime_cxx_inline.h +++ b/include/onnxruntime/core/session/experimental_onnxruntime_cxx_inline.h @@ -5,7 +5,8 @@ // // These are the inline implementations of the C++ header APIs. They are in this separate file as to not clutter // the main C++ file with implementation details. -namespace Ort::Experimental { +namespace Ort { +namespace Experimental { inline std::vector Session::Run(const std::vector& input_names, const std::vector& input_values, const std::vector& output_names, const RunOptions& run_options) { @@ -106,4 +107,5 @@ inline Ort::Value Value::CreateTensor(const std::vector& shape, ONNXTen return Ort::Value::CreateTensor(allocator, shape.data(), shape.size(), type); } -} // namespace Ort::Experimental +} +}