void _VECTOR_IMPL<_Tp, _Alloc>::_M_fill_insert_aux (iterator __pos, size_type __n, const _Tp& __x, const __true_type& /*_Movable*/) { if (&__x >= this->_M_start && &__x < this->_M_finish) { _Tp __x_copy = __x; _M_fill_insert_aux(__pos, __n, __x_copy, __true_type()); return; } iterator __src = this->_M_finish; iterator __dst = __src + __n; for (; __src != __pos; --__dst, --__src) { _STLP_STD::_Move_Construct(__dst, *__src); _STLP_STD::_Destroy_Moved(__src); } _STLP_STD::fill(__pos, __dst, __x); }
void _VECTOR_IMPL<_Tp, _Alloc>::_M_fill_insert_aux (iterator __pos, size_type __n, const _Tp& __x, const __true_type& /*_Movable*/) { if (_M_is_inside(__x)) { _Tp __x_copy = __x; _M_fill_insert_aux(__pos, __n, __x_copy, __true_type()); return; } iterator __src = this->_M_finish - 1; iterator __dst = __src + __n; for (; __src >= __pos; --__dst, --__src) { _STLP_STD::_Move_Construct(__dst, *__src); _STLP_STD::_Destroy_Moved(__src); } __uninitialized_fill_n(__pos, __n, __x, _PODType()); this->_M_finish += __n; }
_InputIter _STLP_CALL __do_get_integer(_InputIter& __in_ite, _InputIter& __end, ios_base& __str, ios_base::iostate& __err, _Integer& __val, _CharT* __pc) { #if defined (__HP_aCC) && (__HP_aCC == 1) bool _IsSigned = !((_Integer)(-1) > 0); #else typedef typename __bool2type<numeric_limits<_Integer>::is_signed>::_Ret _IsSigned; #endif const numpunct<_CharT>& __numpunct = *__STATIC_CAST(const numpunct<_CharT>*, __str._M_numpunct_facet()); const string& __grouping = __str._M_grouping(); // cached copy const int __base_or_zero = __get_base_or_zero(__in_ite, __end, __str, __pc); int __got = __base_or_zero & 1; bool __result; if (__in_ite == __end) { // We may have already read a 0. If so, if (__got > 0) { // the result is 0 even if we're at eof. __val = 0; __result = true; } else __result = false; } else { const bool __negative = (__base_or_zero & 2) != 0; const int __base = __base_or_zero >> 2; #if defined (__HP_aCC) && (__HP_aCC == 1) if (_IsSigned) __result = __get_integer(__in_ite, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __true_type() ); else __result = __get_integer(__in_ite, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __false_type() ); #else __result = __get_integer(__in_ite, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, _IsSigned()); # endif } __err = __STATIC_CAST(ios_base::iostate, __result ? ios_base::goodbit : ios_base::failbit); if (__in_ite == __end) __err |= ios_base::eofbit; return __in_ite; }
_InputIter _STLP_CALL __do_get_integer(_InputIter& __in_ite, _InputIter& __end, ios_base& __str, ios_base::iostate& __err, _Integer& __val, _CharT* /*__pc*/) { locale __loc = __str.getloc(); const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); #if defined (__HP_aCC) && (__HP_aCC == 1) bool _IsSigned = !((_Integer)(-1) > 0); #else typedef typename is_signed<_Integer>::type::type _IsSigned; #endif const int __base_or_zero = __get_base_or_zero(__in_ite, __end, __str.flags(), __ctype); int __got = __base_or_zero & 1; bool __result; if (__in_ite == __end) { // We may have already read a 0. If so, if (__got > 0) { // the result is 0 even if we're at eof. __val = 0; __result = true; } else __result = false; } else { const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc); const bool __negative = (__base_or_zero & 2) != 0; const int __base = __base_or_zero >> 2; #if defined (__HP_aCC) && (__HP_aCC == 1) if (_IsSigned) __result = __get_integer(__in_ite, __end, __base, __val, __got, __negative, __np.thousands_sep(), __np.grouping(), __true_type() ); else __result = __get_integer(__in_ite, __end, __base, __val, __got, __negative, __np.thousands_sep(), __np.grouping(), __false_type() ); #else __result = __get_integer(__in_ite, __end, __base, __val, __got, __negative, __np.thousands_sep(), __np.grouping(), _IsSigned()); # endif } __err = __STATIC_CAST(ios_base::iostate, __result ? ios_base::goodbit : ios_base::failbit); if (__in_ite == __end) __err |= ios_base::eofbit; return __in_ite; }