Use static_assert for compile time check

This commit is contained in:
elsid 2025-04-18 14:37:42 +02:00
parent 87d77a6882
commit 042c4b2b9d
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

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);
}