Removed throwing destructor (#5023)

This commit is contained in:
Anton Pankratv 2021-04-12 07:20:59 +03:00 committed by GitHub
parent 88548416fd
commit 9a46851a33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View File

@ -46,7 +46,7 @@ public:
/**
* @brief A destructor
*/
~SharedObjectLoader() noexcept(false);
~SharedObjectLoader();
/**
* @brief Searches for a function symbol in the loaded module

View File

@ -2,7 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <dlfcn.h>
#include <iostream>
#include "details/ie_so_loader.h"
#include "file_utils.h"
@ -27,9 +29,9 @@ public:
}
#endif // ENABLE_UNICODE_PATH_SUPPORT
~Impl() noexcept(false) {
~Impl() {
if (0 != dlclose(shared_object)) {
IE_THROW() << "dlclose failed: " << dlerror();
std::cerr << "dlclose failed: " << dlerror() << std::endl;
}
}
@ -60,7 +62,7 @@ SharedObjectLoader::SharedObjectLoader(const char * pluginName) {
_impl.reset(new Impl(pluginName));
}
SharedObjectLoader::~SharedObjectLoader() noexcept(false) {}
SharedObjectLoader::~SharedObjectLoader() {}
void* SharedObjectLoader::get_symbol(const char* symbolName) const {
return _impl->get_symbol(symbolName);

View File

@ -254,8 +254,7 @@ class SharedObjectLoader::Impl {
}
};
SharedObjectLoader::~SharedObjectLoader() noexcept(false) {
}
SharedObjectLoader::~SharedObjectLoader() {}
SharedObjectLoader::SharedObjectLoader(const char * pluginName) {
_impl = std::make_shared<Impl>(pluginName);