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