Skip to content

Commit

Permalink
Integrate changes needed for OpenCV
Browse files Browse the repository at this point in the history
  • Loading branch information
barche committed Nov 12, 2024
1 parent efbb555 commit f82cdfa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/jlcxx/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ class ArrayRef
{
return data()[i];
}
else if constexpr(std::is_same<julia_t, static_julia_type<ValueT>>::value && !std::is_same<julia_t, WrappedCppPtr>::value)
{
return *reinterpret_cast<ValueT*>(&data()[i]);
}
else
{
return *extract_pointer_nonull<ValueT>(data()[i]);
Expand All @@ -263,6 +267,10 @@ class ArrayRef
if constexpr(std::is_same<julia_t, ValueT>::value)
{
return data()[i];
}
else if constexpr(std::is_same<julia_t, static_julia_type<ValueT>>::value && !std::is_same<julia_t, WrappedCppPtr>::value)
{
return *reinterpret_cast<ValueT*>(&data()[i]);
}
else
{
Expand Down

0 comments on commit f82cdfa

Please sign in to comment.