friend difference_type
operator-(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT
{
- if (__builtin_expect(__x._M_node || __y._M_node, true))
- return difference_type(_S_buffer_size())
- * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
- + (__y._M_last - __y._M_cur);
-
- return 0;
+ return difference_type(_S_buffer_size())
+ * (__x._M_node - __y._M_node - int(__x._M_node != 0))
+ + (__x._M_cur - __x._M_first)
+ + (__y._M_last - __y._M_cur);
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
operator-(const _Self& __x,
const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) _GLIBCXX_NOEXCEPT
{
- if (__builtin_expect(__x._M_node || __y._M_node, true))
- return difference_type(_S_buffer_size())
- * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
- + (__y._M_last - __y._M_cur);
-
- return 0;
+ return difference_type(_S_buffer_size())
+ * (__x._M_node - __y._M_node - int(__x._M_node != 0))
+ + (__x._M_cur - __x._M_first)
+ + (__y._M_last - __y._M_cur);
}
friend _Self