{
while (__first != __last && *__first < __value)
++__first;
- while (__first != __last && !(*__first < __value))
- ++__first;
+ if (__first != __last)
+ {
+ ++__first;
+ while (__first != __last && !(*__first < __value))
+ ++__first;
+ }
return __first == __last;
}
const _Safe_iterator<_Iterator, _Sequence>& __last,
const _Tp& __value,
std::random_access_iterator_tag __tag)
- { return __check_partitioned_lower_aux(__first.base(), __last.base(),
- __value, __tag); }
+ {
+ return __check_partitioned_lower_aux(__first.base(), __last.base(),
+ __value, __tag);
+ }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 270. Binary search requirements overly strict
inline bool
__check_partitioned_lower(_ForwardIterator __first,
_ForwardIterator __last, const _Tp& __value)
- { return __check_partitioned_lower_aux(__first, __last, __value,
- std::__iterator_category(__first)); }
+ {
+ return __check_partitioned_lower_aux(__first, __last, __value,
+ std::__iterator_category(__first));
+ }
template<typename _ForwardIterator, typename _Tp>
inline bool
{
while (__first != __last && !(__value < *__first))
++__first;
- while (__first != __last && __value < *__first)
- ++__first;
+ if (__first != __last)
+ {
+ ++__first;
+ while (__first != __last && __value < *__first)
+ ++__first;
+ }
return __first == __last;
}
const _Safe_iterator<_Iterator, _Sequence>& __last,
const _Tp& __value,
std::random_access_iterator_tag __tag)
- { return __check_partitioned_upper_aux(__first.base(), __last.base(),
- __value, __tag); }
+ {
+ return __check_partitioned_upper_aux(__first.base(), __last.base(),
+ __value, __tag);
+ }
template<typename _ForwardIterator, typename _Tp>
inline bool
__check_partitioned_upper(_ForwardIterator __first,
_ForwardIterator __last, const _Tp& __value)
- { return __check_partitioned_upper_aux(__first, __last, __value,
- std::__iterator_category(__first)); }
+ {
+ return __check_partitioned_upper_aux(__first, __last, __value,
+ std::__iterator_category(__first));
+ }
template<typename _ForwardIterator, typename _Tp, typename _Pred>
inline bool
{
while (__first != __last && bool(__pred(*__first, __value)))
++__first;
- while (__first != __last && !bool(__pred(*__first, __value)))
- ++__first;
+ if (__first != __last)
+ {
+ ++__first;
+ while (__first != __last && !bool(__pred(*__first, __value)))
+ ++__first;
+ }
return __first == __last;
}
const _Safe_iterator<_Iterator, _Sequence>& __last,
const _Tp& __value, _Pred __pred,
std::random_access_iterator_tag __tag)
- { return __check_partitioned_lower_aux(__first.base(), __last.base(),
- __value, __pred, __tag); }
+ {
+ return __check_partitioned_lower_aux(__first.base(), __last.base(),
+ __value, __pred, __tag);
+ }
// Determine if a sequence is partitioned w.r.t. this element.
template<typename _ForwardIterator, typename _Tp, typename _Pred>
__check_partitioned_lower(_ForwardIterator __first,
_ForwardIterator __last, const _Tp& __value,
_Pred __pred)
- { return __check_partitioned_lower_aux(__first, __last, __value, __pred,
- std::__iterator_category(__first)); }
+ {
+ return __check_partitioned_lower_aux(__first, __last, __value, __pred,
+ std::__iterator_category(__first));
+ }
template<typename _ForwardIterator, typename _Tp, typename _Pred>
inline bool
{
while (__first != __last && !bool(__pred(__value, *__first)))
++__first;
- while (__first != __last && bool(__pred(__value, *__first)))
- ++__first;
+ if (__first != __last)
+ {
+ ++__first;
+ while (__first != __last && bool(__pred(__value, *__first)))
+ ++__first;
+ }
return __first == __last;
}
const _Safe_iterator<_Iterator, _Sequence>& __last,
const _Tp& __value, _Pred __pred,
std::random_access_iterator_tag __tag)
- { return __check_partitioned_upper_aux(__first.base(), __last.base(),
- __value, __pred, __tag); }
+ {
+ return __check_partitioned_upper_aux(__first.base(), __last.base(),
+ __value, __pred, __tag);
+ }
template<typename _ForwardIterator, typename _Tp, typename _Pred>
inline bool
__check_partitioned_upper(_ForwardIterator __first,
_ForwardIterator __last, const _Tp& __value,
_Pred __pred)
- { return __check_partitioned_upper_aux(__first, __last, __value, __pred,
- std::__iterator_category(__first)); }
+ {
+ return __check_partitioned_upper_aux(__first, __last, __value, __pred,
+ std::__iterator_category(__first));
+ }
// Helper struct to detect random access safe iterators.
template<typename _Iterator>