Skip to content

Commit

Permalink
Fix infinite type conversion in CTypedMemoryHandle (neoml-lib#661)
Browse files Browse the repository at this point in the history
Signed-off-by: Valeriy Fedyunin <valery.fedyunin@abbyy.com>

Co-authored-by: Stanislav Angeliuk <59917951+SAngeliuk@users.noreply.github.com>
  • Loading branch information
Valeriy Fedyunin and SAngeliuk authored Jun 21, 2022
1 parent 456d498 commit f3a1073
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NeoMathEngine/include/NeoMathEngine/MemoryHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class CTypedMemoryHandle : public CMemoryHandle {
template<typename U = T, typename std::enable_if<std::is_same<U, T>::value && !std::is_const<U>::value, int>::type = 0>
operator CTypedMemoryHandle<const U>() const
{
return CTypedMemoryHandle<const U>( *this );
return CTypedMemoryHandle<const U>( static_cast<const CMemoryHandle&>( *this ) );
}

CTypedMemoryHandle& operator+=( ptrdiff_t shift )
Expand Down

0 comments on commit f3a1073

Please sign in to comment.