Commit f75152a5 authored by Alexander Alekhin's avatar Alexander Alekhin Committed by Alexander Alekhin

gapi: fix build with Intel Compiler 2019

parent 8c25a8eb
...@@ -328,7 +328,8 @@ namespace util ...@@ -328,7 +328,8 @@ namespace util
util::type_list_index<T, Types...>::value; util::type_list_index<T, Types...>::value;
if (v.index() == t_index) if (v.index() == t_index)
return reinterpret_cast<T&>(v.memory); return *(T*)(&v.memory); // workaround for ICC 2019
// original code: return reinterpret_cast<T&>(v.memory);
else else
throw_error(bad_variant_access()); throw_error(bad_variant_access());
} }
...@@ -340,7 +341,8 @@ namespace util ...@@ -340,7 +341,8 @@ namespace util
util::type_list_index<T, Types...>::value; util::type_list_index<T, Types...>::value;
if (v.index() == t_index) if (v.index() == t_index)
return reinterpret_cast<const T&>(v.memory); return *(const T*)(&v.memory); // workaround for ICC 2019
// original code: return reinterpret_cast<const T&>(v.memory);
else else
throw_error(bad_variant_access()); throw_error(bad_variant_access());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment