Fixed compilation with C++23 (#20724)

This commit is contained in:
Ilya Lavrenov 2023-10-27 16:29:40 +04:00 committed by GitHub
parent b75f2e67de
commit 620a0fc289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 4 deletions

View File

@ -5,7 +5,8 @@
set(TARGET_NAME openvino_c)
# Suppress warnings due to catch macro with legacy exception types
ov_deprecated_no_errors()
ov_disable_deprecated_warnings()
add_definitions(-DIN_OV_COMPONENT)
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

View File

@ -4,7 +4,7 @@
set(TARGET fluid_preproc_tests)
ov_deprecated_no_errors()
ov_disable_deprecated_warnings()
find_package(OpenCV QUIET COMPONENTS gapi core imgproc)
if(NOT OpenCV_FOUND OR NOT OpenCV_VERSION VERSION_GREATER_EQUAL 4)

View File

@ -37,7 +37,7 @@ std::string DiscreteTypeInfo::get_version() const {
if (version_id) {
return std::string(version_id);
}
return nullptr;
return {};
}
DiscreteTypeInfo::operator std::string() const {

View File

@ -5,6 +5,7 @@
#pragma once
#include <cstdint>
#include <iterator>
#include <map>
#include <mutex>
#include <string>

View File

@ -397,7 +397,7 @@ public:
}
void allocate() noexcept override {
if (InferenceEngine::TBlob<T>::buffer() != tensor->data()) {
if ((void*)InferenceEngine::TBlob<T>::buffer() != tensor->data()) {
InferenceEngine::TBlob<T>::_allocator =
InferenceEngine::details::make_pre_allocator(static_cast<T*>(tensor->data()), tensor->get_byte_size());
InferenceEngine::TBlob<T>::allocate();