mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 22:11:33 +00:00
Use static_assert for compile time check
This commit is contained in:
parent
87d77a6882
commit
042c4b2b9d
1 changed files with 1 additions and 2 deletions
|
@ -406,8 +406,7 @@ namespace MWWorld
|
||||||
template <class T>
|
template <class T>
|
||||||
ContainerStoreIteratorBase(const ContainerStoreIteratorBase<T>& other)
|
ContainerStoreIteratorBase(const ContainerStoreIteratorBase<T>& other)
|
||||||
{
|
{
|
||||||
char CANNOT_CONVERT_CONST_ITERATOR_TO_ITERATOR[IsConvertible<T, PtrType, void>::value ? 1 : -1];
|
static_assert(IsConvertible<T, PtrType, void>::value);
|
||||||
((void)CANNOT_CONVERT_CONST_ITERATOR_TO_ITERATOR);
|
|
||||||
copy(other);
|
copy(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue