mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-08-14 14:49:48 +00:00
Enable interoperability between iterators
This commit is contained in:
parent
b34070f23c
commit
84a2617c24
2 changed files with 22 additions and 2 deletions
|
@ -46,6 +46,10 @@ namespace mchlib {
|
|||
|
||||
namespace implem {
|
||||
template class DirIterator<true>;
|
||||
template class DirIterator<false>;
|
||||
template bool DirIterator<true>::equal ( const DirIterator<false>& ) const;
|
||||
template bool DirIterator<true>::equal ( const DirIterator<true>& ) const;
|
||||
template DirIterator<true>::DirIterator ( DirIterator<false>&&, enabler );
|
||||
|
||||
template <bool Const>
|
||||
DirIterator<Const>::DirIterator (DirIterator<Const>&& parOther) :
|
||||
|
@ -55,6 +59,15 @@ namespace mchlib {
|
|||
{
|
||||
}
|
||||
|
||||
template <bool Const>
|
||||
template <bool OtherConst>
|
||||
DirIterator<Const>::DirIterator (DirIterator<OtherConst>&& parOther, typename std::enable_if<std::is_convertible<typename DirIterator<OtherConst>::VecIterator, VecIterator>::value, enabler>::type) :
|
||||
m_current(parOther.m_current),
|
||||
m_end(parOther.m_end),
|
||||
m_base_path(std::move(parOther.m_base_path))
|
||||
{
|
||||
}
|
||||
|
||||
template <bool Const>
|
||||
DirIterator<Const>::DirIterator (VecIterator parBegin, VecIterator parEnd, std::unique_ptr<PathName>&& parBasePath) :
|
||||
m_current(parBegin),
|
||||
|
@ -98,7 +111,8 @@ namespace mchlib {
|
|||
}
|
||||
|
||||
template <bool Const>
|
||||
bool DirIterator<Const>::equal (const DirIterator<Const>& parOther) const {
|
||||
template <bool OtherConst>
|
||||
bool DirIterator<Const>::equal (const DirIterator<OtherConst>& parOther) const {
|
||||
return
|
||||
(m_end == parOther.m_end) and
|
||||
(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue