Merge branch 'static_assert' into 'master'

Use static_assert for compile time check

See merge request OpenMW/openmw!4637
This commit is contained in:
Evil Eye 2025-04-21 08:35:17 +00:00
commit 5a42db3256

View file

@ -406,8 +406,7 @@ namespace MWWorld
template <class T>
ContainerStoreIteratorBase(const ContainerStoreIteratorBase<T>& other)
{
char CANNOT_CONVERT_CONST_ITERATOR_TO_ITERATOR[IsConvertible<T, PtrType, void>::value ? 1 : -1];
((void)CANNOT_CONVERT_CONST_ITERATOR_TO_ITERATOR);
static_assert(IsConvertible<T, PtrType, void>::value);
copy(other);
}