diff --git a/src/common/transformations/src/transformations/common_optimizations/convert_quantize_dequantize.cpp b/src/common/transformations/src/transformations/common_optimizations/convert_quantize_dequantize.cpp index e6ea1e477a71b6..672b89184776fb 100644 --- a/src/common/transformations/src/transformations/common_optimizations/convert_quantize_dequantize.cpp +++ b/src/common/transformations/src/transformations/common_optimizations/convert_quantize_dequantize.cpp @@ -133,17 +133,21 @@ ov::pass::ConvertQuantizeDequantize::ConvertQuantizeDequantize( if (!ov::op::util::get_single_value(output_high, out_high_val)) return false; -#define PRECISION_LIMITS_FOR(type) \ - {ov::element::type}, { \ - static_cast(std::numeric_limits>::min()), \ +#define PRECISION_LIMITS_FOR(type) \ + m[ov::element::type] = std::make_pair( \ + static_cast(std::numeric_limits>::min()), \ static_cast(std::numeric_limits>::max()) \ - } + ) + + static const std::unordered_map> supported_intervals = []() { + std::unordered_map> m; + PRECISION_LIMITS_FOR(i8); + PRECISION_LIMITS_FOR(u8); + PRECISION_LIMITS_FOR(i16); + PRECISION_LIMITS_FOR(u16); + return m; + }(); - static const std::unordered_map> supported_intervals{ - {PRECISION_LIMITS_FOR(i8)}, - {PRECISION_LIMITS_FOR(u8)}, - {PRECISION_LIMITS_FOR(i16)}, - {PRECISION_LIMITS_FOR(u16)}}; #undef PRECISION_LIMITS_FOR const auto& type = convert1.get_element_type();