Use the old code for VC++

This commit is contained in:
Andreas Fabri 2025-04-09 09:14:28 +01:00
parent d0e74e555c
commit 6f455c6fd8
1 changed files with 6 additions and 4 deletions

View File

@ -138,18 +138,20 @@ public:
return tmp += -n;
}
template <typename It>
#if defined(BOOST_MSVC)
difference_type
difference_type operator- (const Self& i) const {
return nt - i.nt;
}
#else
template <typename It>
std::enable_if_t<std::is_convertible_v<iterator_category, std::random_access_iterator_tag>
&& std::is_convertible_v<const It&, const Self&>,
difference_type>
#endif
operator- (const It& i) const {
return nt - i.nt;
}
#endif
reference operator[]( difference_type n) const {
Self tmp = *this;