[CPU] fix gen_pattern::AttrAny::equal_to (#23689)

### Details:
Backport https://github.com/openvinotoolkit/openvino/pull/21890 from
master

### Tickets:
 - CVS-133621

Co-authored-by: Tingqian Li <tingqian.li@intel.com>
This commit is contained in:
Maksim Kutakov 2024-04-16 12:35:46 +02:00 committed by GitHub
parent e6fbca158a
commit 15b0f99132
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -411,16 +411,16 @@ struct AttrAny {
template <typename T>
bool equal_to(const std::vector<T>& rhs) {
if (any.empty() && rhs.empty())
return true;
if (any.empty())
return rhs.empty();
auto& vec = any.as<std::vector<T>>();
return std::equal(vec.begin(), vec.end(), rhs.begin());
}
template <typename T, typename CT0, typename... CTs>
bool equal_to(const std::vector<T>& rhs) {
if (any.empty() && rhs.empty())
return true;
if (any.empty())
return rhs.empty();
if (any.is<std::vector<CT0>>()) {
auto& vec = any.as<std::vector<CT0>>();