; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.51106.1
TITLE E:\????????????????\any\any\any.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB OLDNAMES
PUBLIC ??_C@_07DCLBNMLN@generic?$AA@ ; `string'
PUBLIC ??_C@_0O@BFJCFAAK@unknown?5error?$AA@ ; `string'
PUBLIC ??_C@_08LLGCOLLL@iostream?$AA@ ; `string'
PUBLIC ??_C@_0BG@PADBLCHM@iostream?5stream?5error?$AA@ ; `string'
PUBLIC ??_C@_06FHFOAHML@system?$AA@ ; `string'
PUBLIC ??_C@_0BI@CFPLBAOH@invalid?5string?5position?$AA@ ; `string'
PUBLIC ??_C@_0BA@JFNIOLAK@string?5too?5long?$AA@ ; `string'
PUBLIC ??_C@_0BD@OLBABOEK@vector?$DMT?$DO?5too?5long?$AA@ ; `string'
PUBLIC ??_R2_System_error_category@std@@8 ; std::_System_error_category::`RTTI Base Class Array'
PUBLIC ??_R2_Iostream_error_category@std@@8 ; std::_Iostream_error_category::`RTTI Base Class Array'
PUBLIC ??_R2_Generic_error_category@std@@8 ; std::_Generic_error_category::`RTTI Base Class Array'
PUBLIC ??_R2error_category@std@@8 ; std::error_category::`RTTI Base Class Array'
PUBLIC ??_R1A@?0A@EA@_System_error_category@std@@8 ; std::_System_error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
PUBLIC ??_R1A@?0A@EA@_Iostream_error_category@std@@8 ; std::_Iostream_error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
PUBLIC ??_R1A@?0A@EA@_Generic_error_category@std@@8 ; std::_Generic_error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
PUBLIC ??_R1A@?0A@EA@error_category@std@@8 ; std::error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
PUBLIC ??_R3_System_error_category@std@@8 ; std::_System_error_category::`RTTI Class Hierarchy Descriptor'
PUBLIC ??_R0?AV_System_error_category@std@@@8 ; std::_System_error_category `RTTI Type Descriptor'
PUBLIC ??_R3_Iostream_error_category@std@@8 ; std::_Iostream_error_category::`RTTI Class Hierarchy Descriptor'
PUBLIC ??_R0?AV_Iostream_error_category@std@@@8 ; std::_Iostream_error_category `RTTI Type Descriptor'
PUBLIC ??_R3_Generic_error_category@std@@8 ; std::_Generic_error_category::`RTTI Class Hierarchy Descriptor'
PUBLIC ??_R0?AV_Generic_error_category@std@@@8 ; std::_Generic_error_category `RTTI Type Descriptor'
PUBLIC ??_R3error_category@std@@8 ; std::error_category::`RTTI Class Hierarchy Descriptor'
PUBLIC ??_R0?AVerror_category@std@@@8 ; std::error_category `RTTI Type Descriptor'
PUBLIC ??_R4_System_error_category@std@@6B@ ; std::_System_error_category::`RTTI Complete Object Locator'
PUBLIC ??_R4_Iostream_error_category@std@@6B@ ; std::_Iostream_error_category::`RTTI Complete Object Locator'
PUBLIC ??_R4_Generic_error_category@std@@6B@ ; std::_Generic_error_category::`RTTI Complete Object Locator'
PUBLIC ??_R4error_category@std@@6B@ ; std::error_category::`RTTI Complete Object Locator'
PUBLIC ??_7_System_error_category@std@@6B@ ; std::_System_error_category::`vftable'
PUBLIC ??_7_Iostream_error_category@std@@6B@ ; std::_Iostream_error_category::`vftable'
PUBLIC ??_7_Generic_error_category@std@@6B@ ; std::_Generic_error_category::`vftable'
PUBLIC ??_7error_category@std@@6B@ ; std::error_category::`vftable'
PUBLIC ?value@?$_Sizeof@U_Nil@std@@U12@U12@U12@U12@U12@U12@U12@@std@@2IB ; std::_Sizeof<std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil>::value
PUBLIC ?value@?$integral_constant@_N$00@std@@2_NB ; std::integral_constant<bool,1>::value
PUBLIC ?value@?$integral_constant@_N$0A@@std@@2_NB ; std::integral_constant<bool,0>::value
EXTRN __imp_?_Orphan_all@_Container_base0@std@@QAEXXZ:PROC
EXTRN __imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z:PROC
EXTRN __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z:PROC
EXTRN __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z:PROC
EXTRN __imp___purecall:PROC
EXTRN __imp_?_Xbad_alloc@std@@YAXXZ:PROC
EXTRN _atexit:PROC
EXTRN __imp_?_Xlength_error@std@@YAXPBD@Z:PROC
EXTRN __imp_?_Xout_of_range@std@@YAXPBD@Z:PROC
EXTRN __imp__getchar:PROC
EXTRN __imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A:BYTE
EXTRN __imp__clock:PROC
EXTRN __imp_?_Winerror_map@std@@YAPBDH@Z:PROC
EXTRN __imp_?_Syserror_map@std@@YAPBDH@Z:PROC
EXTRN __imp_??2@YAPAXI@Z:PROC
EXTRN ??_7type_info@@6B@:QWORD ; type_info::`vftable'
EXTRN __imp__memmove:PROC
EXTRN __imp_??3@YAXPAX@Z:PROC
EXTRN @__security_check_cookie@4:PROC
EXTRN __purecall:PROC
; COMDAT ?value@?$integral_constant@_N$0A@@std@@2_NB
CONST SEGMENT
?value@?$integral_constant@_N$0A@@std@@2_NB DB 00H ; std::integral_constant<bool,0>::value
CONST ENDS
; COMDAT ?value@?$integral_constant@_N$00@std@@2_NB
CONST SEGMENT
?value@?$integral_constant@_N$00@std@@2_NB DB 01H ; std::integral_constant<bool,1>::value
CONST ENDS
; COMDAT ?value@?$_Sizeof@U_Nil@std@@U12@U12@U12@U12@U12@U12@U12@@std@@2IB
CONST SEGMENT
?value@?$_Sizeof@U_Nil@std@@U12@U12@U12@U12@U12@U12@U12@@std@@2IB DD 00H ; std::_Sizeof<std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil>::value
CONST ENDS
; COMDAT ??_7error_category@std@@6B@
CONST SEGMENT
??_7error_category@std@@6B@ DD FLAT:??_R4error_category@std@@6B@ ; std::error_category::`vftable'
DD FLAT:??_Eerror_category@std@@UAEPAXI@Z
DD FLAT:__purecall
DD FLAT:__purecall
DD FLAT:?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z
DD FLAT:?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
DD FLAT:?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
CONST ENDS
; COMDAT ??_7_Generic_error_category@std@@6B@
CONST SEGMENT
??_7_Generic_error_category@std@@6B@ DD FLAT:??_R4_Generic_error_category@std@@6B@ ; std::_Generic_error_category::`vftable'
DD FLAT:??_E_Generic_error_category@std@@UAEPAXI@Z
DD FLAT:?name@_Generic_error_category@std@@UBEPBDXZ
DD FLAT:?message@_Generic_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
DD FLAT:?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z
DD FLAT:?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
DD FLAT:?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
CONST ENDS
; COMDAT ??_7_Iostream_error_category@std@@6B@
CONST SEGMENT
??_7_Iostream_error_category@std@@6B@ DD FLAT:??_R4_Iostream_error_category@std@@6B@ ; std::_Iostream_error_category::`vftable'
DD FLAT:??_E_Iostream_error_category@std@@UAEPAXI@Z
DD FLAT:?name@_Iostream_error_category@std@@UBEPBDXZ
DD FLAT:?message@_Iostream_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
DD FLAT:?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z
DD FLAT:?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
DD FLAT:?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
CONST ENDS
; COMDAT ??_7_System_error_category@std@@6B@
CONST SEGMENT
??_7_System_error_category@std@@6B@ DD FLAT:??_R4_System_error_category@std@@6B@ ; std::_System_error_category::`vftable'
DD FLAT:??_E_System_error_category@std@@UAEPAXI@Z
DD FLAT:?name@_System_error_category@std@@UBEPBDXZ
DD FLAT:?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
DD FLAT:?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z
DD FLAT:?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
DD FLAT:?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
CONST ENDS
; COMDAT ??_R4error_category@std@@6B@
rdata$r SEGMENT
??_R4error_category@std@@6B@ DD 00H ; std::error_category::`RTTI Complete Object Locator'
DD 00H
DD 00H
DD FLAT:??_R0?AVerror_category@std@@@8
DD FLAT:??_R3error_category@std@@8
rdata$r ENDS
; COMDAT ??_R4_Generic_error_category@std@@6B@
rdata$r SEGMENT
??_R4_Generic_error_category@std@@6B@ DD 00H ; std::_Generic_error_category::`RTTI Complete Object Locator'
DD 00H
DD 00H
DD FLAT:??_R0?AV_Generic_error_category@std@@@8
DD FLAT:??_R3_Generic_error_category@std@@8
rdata$r ENDS
; COMDAT ??_R4_Iostream_error_category@std@@6B@
rdata$r SEGMENT
??_R4_Iostream_error_category@std@@6B@ DD 00H ; std::_Iostream_error_category::`RTTI Complete Object Locator'
DD 00H
DD 00H
DD FLAT:??_R0?AV_Iostream_error_category@std@@@8
DD FLAT:??_R3_Iostream_error_category@std@@8
rdata$r ENDS
; COMDAT ??_R4_System_error_category@std@@6B@
rdata$r SEGMENT
??_R4_System_error_category@std@@6B@ DD 00H ; std::_System_error_category::`RTTI Complete Object Locator'
DD 00H
DD 00H
DD FLAT:??_R0?AV_System_error_category@std@@@8
DD FLAT:??_R3_System_error_category@std@@8
rdata$r ENDS
; COMDAT ??_R0?AVerror_category@std@@@8
_DATA SEGMENT
??_R0?AVerror_category@std@@@8 DD FLAT:??_7type_info@@6B@ ; std::error_category `RTTI Type Descriptor'
DD 00H
DB '.?AVerror_category@std@@', 00H
_DATA ENDS
; COMDAT ??_R3error_category@std@@8
rdata$r SEGMENT
??_R3error_category@std@@8 DD 00H ; std::error_category::`RTTI Class Hierarchy Descriptor'
DD 00H
DD 01H
DD FLAT:??_R2error_category@std@@8
rdata$r ENDS
; COMDAT ??_R0?AV_Generic_error_category@std@@@8
_DATA SEGMENT
??_R0?AV_Generic_error_category@std@@@8 DD FLAT:??_7type_info@@6B@ ; std::_Generic_error_category `RTTI Type Descriptor'
DD 00H
DB '.?AV_Generic_error_category@std@@', 00H
_DATA ENDS
; COMDAT ??_R3_Generic_error_category@std@@8
rdata$r SEGMENT
??_R3_Generic_error_category@std@@8 DD 00H ; std::_Generic_error_category::`RTTI Class Hierarchy Descriptor'
DD 00H
DD 02H
DD FLAT:??_R2_Generic_error_category@std@@8
rdata$r ENDS
; COMDAT ??_R0?AV_Iostream_error_category@std@@@8
_DATA SEGMENT
??_R0?AV_Iostream_error_category@std@@@8 DD FLAT:??_7type_info@@6B@ ; std::_Iostream_error_category `RTTI Type Descriptor'
DD 00H
DB '.?AV_Iostream_error_category@std@@', 00H
_DATA ENDS
; COMDAT ??_R3_Iostream_error_category@std@@8
rdata$r SEGMENT
??_R3_Iostream_error_category@std@@8 DD 00H ; std::_Iostream_error_category::`RTTI Class Hierarchy Descriptor'
DD 00H
DD 03H
DD FLAT:??_R2_Iostream_error_category@std@@8
rdata$r ENDS
; COMDAT ??_R0?AV_System_error_category@std@@@8
_DATA SEGMENT
??_R0?AV_System_error_category@std@@@8 DD FLAT:??_7type_info@@6B@ ; std::_System_error_category `RTTI Type Descriptor'
DD 00H
DB '.?AV_System_error_category@std@@', 00H
_DATA ENDS
; COMDAT ??_R3_System_error_category@std@@8
rdata$r SEGMENT
??_R3_System_error_category@std@@8 DD 00H ; std::_System_error_category::`RTTI Class Hierarchy Descriptor'
DD 00H
DD 03H
DD FLAT:??_R2_System_error_category@std@@8
rdata$r ENDS
; COMDAT ??_R1A@?0A@EA@error_category@std@@8
rdata$r SEGMENT
??_R1A@?0A@EA@error_category@std@@8 DD FLAT:??_R0?AVerror_category@std@@@8 ; std::error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
DD 00H
DD 00H
DD 0ffffffffH
DD 00H
DD 040H
DD FLAT:??_R3error_category@std@@8
rdata$r ENDS
; COMDAT ??_R1A@?0A@EA@_Generic_error_category@std@@8
rdata$r SEGMENT
??_R1A@?0A@EA@_Generic_error_category@std@@8 DD FLAT:??_R0?AV_Generic_error_category@std@@@8 ; std::_Generic_error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
DD 01H
DD 00H
DD 0ffffffffH
DD 00H
DD 040H
DD FLAT:??_R3_Generic_error_category@std@@8
rdata$r ENDS
; COMDAT ??_R1A@?0A@EA@_Iostream_error_category@std@@8
rdata$r SEGMENT
??_R1A@?0A@EA@_Iostream_error_category@std@@8 DD FLAT:??_R0?AV_Iostream_error_category@std@@@8 ; std::_Iostream_error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
DD 02H
DD 00H
DD 0ffffffffH
DD 00H
DD 040H
DD FLAT:??_R3_Iostream_error_category@std@@8
rdata$r ENDS
; COMDAT ??_R1A@?0A@EA@_System_error_category@std@@8
rdata$r SEGMENT
??_R1A@?0A@EA@_System_error_category@std@@8 DD FLAT:??_R0?AV_System_error_category@std@@@8 ; std::_System_error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
DD 02H
DD 00H
DD 0ffffffffH
DD 00H
DD 040H
DD FLAT:??_R3_System_error_category@std@@8
rdata$r ENDS
; COMDAT ??_R2error_category@std@@8
rdata$r SEGMENT
??_R2error_category@std@@8 DD FLAT:??_R1A@?0A@EA@error_category@std@@8 ; std::error_category::`RTTI Base Class Array'
rdata$r ENDS
; COMDAT ??_R2_Generic_error_category@std@@8
rdata$r SEGMENT
??_R2_Generic_error_category@std@@8 DD FLAT:??_R1A@?0A@EA@_Generic_error_category@std@@8 ; std::_Generic_error_category::`RTTI Base Class Array'
DD FLAT:??_R1A@?0A@EA@error_category@std@@8
rdata$r ENDS
; COMDAT ??_R2_Iostream_error_category@std@@8
rdata$r SEGMENT
??_R2_Iostream_error_category@std@@8 DD FLAT:??_R1A@?0A@EA@_Iostream_error_category@std@@8 ; std::_Iostream_error_category::`RTTI Base Class Array'
DD FLAT:??_R1A@?0A@EA@_Generic_error_category@std@@8
DD FLAT:??_R1A@?0A@EA@error_category@std@@8
rdata$r ENDS
; COMDAT ??_R2_System_error_category@std@@8
rdata$r SEGMENT
??_R2_System_error_category@std@@8 DD FLAT:??_R1A@?0A@EA@_System_error_category@std@@8 ; std::_System_error_category::`RTTI Base Class Array'
DD FLAT:??_R1A@?0A@EA@_Generic_error_category@std@@8
DD FLAT:??_R1A@?0A@EA@error_category@std@@8
rdata$r ENDS
; COMDAT ??_C@_0BD@OLBABOEK@vector?$DMT?$DO?5too?5long?$AA@
CONST SEGMENT
??_C@_0BD@OLBABOEK@vector?$DMT?$DO?5too?5long?$AA@ DB 'vector<T> too long'
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BA@JFNIOLAK@string?5too?5long?$AA@
CONST SEGMENT
??_C@_0BA@JFNIOLAK@string?5too?5long?$AA@ DB 'string too long', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BI@CFPLBAOH@invalid?5string?5position?$AA@
CONST SEGMENT
??_C@_0BI@CFPLBAOH@invalid?5string?5position?$AA@ DB 'invalid string posi'
DB 'tion', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_06FHFOAHML@system?$AA@
CONST SEGMENT
??_C@_06FHFOAHML@system?$AA@ DB 'system', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BG@PADBLCHM@iostream?5stream?5error?$AA@
CONST SEGMENT
??_C@_0BG@PADBLCHM@iostream?5stream?5error?$AA@ DB 'iostream stream error'
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_08LLGCOLLL@iostream?$AA@
CONST SEGMENT
??_C@_08LLGCOLLL@iostream?$AA@ DB 'iostream', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0O@BFJCFAAK@unknown?5error?$AA@
CONST SEGMENT
??_C@_0O@BFJCFAAK@unknown?5error?$AA@ DB 'unknown error', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_07DCLBNMLN@generic?$AA@
CONST SEGMENT
??_C@_07DCLBNMLN@generic?$AA@ DB 'generic', 00H ; `string'
CONST ENDS
PUBLIC ??$_Uninit_move@NNN@std@@YAPANPAN00AAU?$_Wrap_alloc@V?$allocator@N@std@@@0@0U_Scalar_ptr_iterator_tag@0@@Z ; std::_Uninit_move<double,double,double>
PUBLIC ??$_Fill_n@PANIN@std@@YAPANPANIABN@Z ; std::_Fill_n<double *,unsigned int,double>
PUBLIC ??$destroy@PAD@?$allocator@D@std@@QAEXPAPAD@Z ; std::allocator<char>::destroy<char *>
PUBLIC ??$construct@PADAAPAD@?$allocator@D@std@@QAEXPAPADAAPAD@Z ; std::allocator<char>::construct<char *,char * &>
PUBLIC ??$_Uninitialized_move@PANPANU?$_Wrap_alloc@V?$allocator@N@std@@@std@@@std@@YAPANPAN00AAU?$_Wrap_alloc@V?$allocator@N@std@@@0@@Z ; std::_Uninitialized_move<double *,double *,std::_Wrap_alloc<std::allocator<double> > >
PUBLIC ??$_Destroy_range@U?$_Wrap_alloc@V?$allocator@N@std@@@std@@@std@@YAXPAN0AAU?$_Wrap_alloc@V?$allocator@N@std@@@0@U_Scalar_ptr_iterator_tag@0@@Z ; std::_Destroy_range<std::_Wrap_alloc<std::allocator<double> > >
PUBLIC ??$_Move@PANPAN@std@@YAPANPAN00U_Scalar_ptr_iterator_tag@0@@Z ; std::_Move<double *,double *>
PUBLIC ??$_Destroy_range@U?$_Wrap_alloc@V?$allocator@H@std@@@std@@@std@@YAXPAH0AAU?$_Wrap_alloc@V?$allocator@H@std@@@0@U_Scalar_ptr_iterator_tag@0@@Z ; std::_Destroy_range<std::_Wrap_alloc<std::allocator<int> > >
PUBLIC ??$_Ptr_cat@HH@std@@YA?AU_Scalar_ptr_iterator_tag@0@PAH0@Z ; std::_Ptr_cat<int,int>
PUBLIC ??$_Uninit_def_fill_n@NIN@std@@YAXPANIAAU?$_Wrap_alloc@V?$allocator@N@std@@@0@0U_Scalar_ptr_iterator_tag@0@@Z ; std::_Uninit_def_fill_n<double,unsigned int,double>
PUBLIC ??$_Ptr_cat@NN@std@@YA?AU_Scalar_ptr_iterator_tag@0@PAN0@Z ; std::_Ptr_cat<double,double>
PUBLIC ??$_Val_type@PAN@std@@YAPANPAN@Z ; std::_Val_type<double *>
PUBLIC ??$destroy@PAD@?$allocator_traits@V?$allocator@D@std@@@std@@SAXAAV?$allocator@D@1@PAPAD@Z ; std::allocator_traits<std::allocator<char> >::destroy<char *>
PUBLIC ??$construct@PADAAPAD@?$allocator_traits@V?$allocator@D@std@@@std@@SAXAAV?$allocator@D@1@PAPADAAPAD@Z ; std::allocator_traits<std::allocator<char> >::construct<char *,char * &>
PUBLIC ??$forward@AAPAD@std@@YAAAPADAAPAD@Z ; std::forward<char * &>
PUBLIC ??$_Allocate@D@std@@YAPADIPAD@Z ; std::_Allocate<char>
PUBLIC ??$_Allocate@N@std@@YAPANIPAN@Z ; std::_Allocate<double>
PUBLIC ??$_Umove@PAN@?$vector@NV?$allocator@N@std@@@std@@IAEPANPAN00@Z ; std::vector<double,std::allocator<double> >::_Umove<double *>
PUBLIC ??$_Destroy_range@U?$_Wrap_alloc@V?$allocator@N@std@@@std@@@std@@YAXPAN0AAU?$_Wrap_alloc@V?$allocator@N@std@@@0@@Z ; std::_Destroy_range<std::_Wrap_alloc<std::allocator<double> > >
PUBLIC ??$_Move@PANPAN@std@@YAPANPAN00@Z ; std::_Move<double *,double *>
PUBLIC ??$_Destroy_range@U?$_Wrap_alloc@V?$allocator@H@std@@@std@@@std@@YAXPAH0AAU?$_Wrap_alloc@V?$allocator@H@std@@@0@@Z ; std::_Destroy_range<std::_Wrap_alloc<std::allocator<int> > >
PUBLIC ??$_Uninitialized_default_fill_n@PANIU?$_Wrap_alloc@V?$allocator@N@std@@@std@@@std@@YAXPANIAAU?$_Wrap_alloc@V?$allocator@N@std@@@0@@Z ; std::_Uninitialized_default_fill_n<double *,unsigned int,std::_Wrap_alloc<std::allocator<double> > >
PUBLIC ??$addressof@D@std@@YAPADAAD@Z ; std::addressof<char>
PUBLIC ??$destroy@PAD@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAEXPAPAD@Z ; std::_Wrap_alloc<std::allocator<char> >::destroy<char *>
PUBLIC ??$construct@PADAAPAD@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAEXPAPADAAPAD@Z ; std::_Wrap_alloc<std::allocator<char> >::construct<char *,char * &>
PUBLIC ?max_size@?$allocator@D@std@@QBEIXZ ; std::allocator<char>::max_size
PUBLIC ?max_size@?$allocator@N@std@@QBEIXZ ; std::allocator<double>::max_size
PUBLIC ?max_size@?$allocator_traits@V?$allocator@D@std@@@std@@SAIABV?$allocator@D@2@@Z ; std::allocator_traits<std::allocator<char> >::max_size
PUBLIC ?allocate@?$allocator@D@std@@QAEPADI@Z ; std::allocator<char>::allocate
PUBLIC ?max_size@?$allocator_traits@V?$allocator@N@std@@@std@@SAIABV?$allocator@N@2@@Z ; std::allocator_traits<std::allocator<double> >::max_size
PUBLIC ?allocate@?$allocator@N@std@@QAEPANI@Z ; std::allocator<double>::allocate
PUBLIC ?max_size@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QBEIXZ ; std::_Wrap_alloc<std::allocator<char> >::max_size
PUBLIC ?allocate@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAEPADI@Z ; std::_Wrap_alloc<std::allocator<char> >::allocate
PUBLIC ?_Compat@?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@std@@QBEXABV12@@Z ; std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<double> > >::_Compat
PUBLIC ??Y?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@std@@QAEAAV01@H@Z ; std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<double> > >::operator+=
PUBLIC ??0?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@std@@QAE@PANPBU_Container_base0@1@@Z ; std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<double> > >::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<double> > >
PUBLIC ?max_size@?$_Wrap_alloc@V?$allocator@N@std@@@std@@QBEIXZ ; std::_Wrap_alloc<std::allocator<double> >::max_size
PUBLIC ?allocate@?$_Wrap_alloc@V?$allocator@N@std@@@std@@QAEPANI@Z ; std::_Wrap_alloc<std::allocator<double> >::allocate
PUBLIC ?capacity@?$vector@NV?$allocator@N@std@@@std@@QBEIXZ ; std::vector<double,std::allocator<double> >::capacity
PUBLIC ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Copy
PUBLIC ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::max_size
PUBLIC ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::erase
PUBLIC ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@I@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::erase
PUBLIC ??9?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@std@@QBE_NABV01@@Z ; std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<double> > >::operator!=
PUBLIC ??8?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@std@@QBE_NABV01@@Z ; std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<double> > >::operator==
PUBLIC ??Y?$_Vector_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@std@@QAEAAV01@H@Z ; std::_Vector_iterator<std::_Vector_val<std::_Simple_types<double> > >::operator+=
PUBLIC ??0?$_Vector_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@std@@QAE@PANPBU_Container_base0@1@@Z ; std::_Vector_iterator<std::_Vector_val<std::_Simple_types<double> > >::_Vector_iterator<std::_Vector_val<std::_Simple_types<double> > >
PUBLIC ??0?$_Wrap_alloc@V?$allocator@N@std@@@std@@QAE@XZ ; std::_Wrap_alloc<std::allocator<double> >::_Wrap_alloc<std::allocator<double> >
PUBLIC ?deallocate@?$allocator@N@std@@QAEXPANI@Z ; std::allocator<double>::deallocate
PUBLIC ?_Xlen@?$vector@NV?$allocator@N@std@@@std@@IBEXXZ ; std::vector<double,std::allocator<double> >::_Xlen
PUBLIC ?_Reallocate@?$vector@NV?$allocator@N@std@@@std@@IAEXI@Z ; std::vector<double,std::allocator<double> >::_Reallocate
PUBLIC ?_Grow_to@?$vector@NV?$allocator@N@std@@@std@@IBEII@Z ; std::vector<double,std::allocator<double> >::_Grow_to
PUBLIC ?clear@?$vector@NV?$allocator@N@std@@@std@@QAEXXZ ; std::vector<double,std::allocator<double> >::clear
PUBLIC ?max_size@?$vector@NV?$allocator@N@std@@@std@@QBEIXZ ; std::vector<double,std::allocator<double> >::max_size
PUBLIC ?_Make_iter@?$vector@NV?$allocator@N@std@@@std@@QBE?AV?$_Vector_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@2@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@2@@Z ; std::vector<double,std::allocator<double> >::_Make_iter
PUBLIC ?_Unused_capacity@?$vector@NV?$allocator@N@std@@@std@@QBEIXZ ; std::vector<double,std::allocator<double> >::_Unused_capacity
PUBLIC ??0?$_Wrap_alloc@V?$allocator@H@std@@@std@@QAE@XZ ; std::_Wrap_alloc<std::allocator<int> >::_Wrap_alloc<std::allocator<int> >
PUBLIC ?deallocate@?$allocator@H@std@@QAEXPAHI@Z ; std::allocator<int>::deallocate
PUBLIC ?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QAEPADXZ ; std::_String_val<std::_Simple_types<char> >::_Myptr
PUBLIC ?deallocate@?$allocator@D@std@@QAEXPADI@Z ; std::allocator<char>::deallocate
PUBLIC ?_Xlen@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEXXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Xlen
PUBLIC ?_Inside@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE_NPBD@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Inside
PUBLIC ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE_NI_N@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Grow
PUBLIC ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
PUBLIC ??H?$_Vector_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@std@@QBE?AV01@H@Z ; std::_Vector_iterator<std::_Vector_val<std::_Simple_types<double> > >::operator+
PUBLIC ??0?$_Vector_val@U?$_Simple_types@N@std@@@std@@QAE@XZ ; std::_Vector_val<std::_Simple_types<double> >::_Vector_val<std::_Simple_types<double> >
PUBLIC ?deallocate@?$_Wrap_alloc@V?$allocator@N@std@@@std@@QAEXPANI@Z ; std::_Wrap_alloc<std::allocator<double> >::deallocate
PUBLIC ?_Getal@?$_Vector_alloc@$0A@U?$_Vec_base_types@NV?$allocator@N@std@@@std@@@std@@QBE?AU?$_Wrap_alloc@V?$allocator@N@std@@@2@XZ ; std::_Vector_alloc<0,std::_Vec_base_types<double,std::allocator<double> > >::_Getal
PUBLIC ?_Reserve@?$vector@NV?$allocator@N@std@@@std@@IAEXI@Z ; std::vector<double,std::allocator<double> >::_Reserve
PUBLIC ?_Destroy@?$vector@NV?$allocator@N@std@@@std@@IAEXPAN0@Z ; std::vector<double,std::allocator<double> >::_Destroy
PUBLIC ?erase@?$vector@NV?$allocator@N@std@@@std@@QAE?AV?$_Vector_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@2@V?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@2@0@Z ; std::vector<double,std::allocator<double> >::erase
PUBLIC ?size@?$vector@NV?$allocator@N@std@@@std@@QBEIXZ ; std::vector<double,std::allocator<double> >::size
PUBLIC ?end@?$vector@NV?$allocator@N@std@@@std@@QAE?AV?$_Vector_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@2@XZ ; std::vector<double,std::allocator<double> >::end
PUBLIC ?begin@?$vector@NV?$allocator@N@std@@@std@@QAE?AV?$_Vector_iterator@V?$_Vector_val@U?$_Simple_types@N@std@@@std@@@2@XZ ; std::vector<double,std::allocator<double> >::begin
PUBLIC ??0?$_Vector_val@U?$_Simple_types@H@std@@@std@@QAE@XZ ; std::_Vector_val<std::_Simple_types<int> >::_Vector_val<std::_Simple_types<int> >
PUBLIC ?deallocate@?$_Wrap_alloc@V?$allocator@H@std@@@std@@QAEXPAHI@Z ; std::_Wrap_alloc<std::allocator<int> >::deallocate
PUBLIC ?_Getal@?$_Vector_alloc@$0A@U?$_Vec_base_types@HV?$allocator@H@std@@@std@@@std@@QBE?AU?$_Wrap_alloc@V?$allocator@H@std@@@2@XZ ; std::_Vector_alloc<0,std::_Vec_base_types<int,std::allocator<int> > >::_Getal
PUBLIC ?_Destroy@?$vector@HV?$allocator@H@std@@@std@@IAEXPAH0@Z ; std::vector<int,std::allocator<int> >::_Destroy
PUBLIC ??0?$_String_val@U?$_Simple_types@D@std@@@std@@QAE@XZ ; std::_String_val<std::_Simple_types<char> >::_String_val<std::_Simple_types<char> >
PUBLIC ?deallocate@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAEXPADI@Z ; std::_Wrap_alloc<std::allocator<char> >::deallocate
PUBLIC ??0?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAE@XZ ; std::_Wrap_alloc<std::allocator<char> >::_Wrap_alloc<std::allocator<char> >
PUBLIC ?_Xran@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEXXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Xran
PUBLIC ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Eos
PUBLIC ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
PUBLIC ??0?$_Vector_alloc@$0A@U?$_Vec_base_types@NV?$allocator@N@std@@@std@@@std@@QAE@ABV?$allocator@N@1@@Z ; std::_Vector_alloc<0,std::_Vec_base_types<double,std::allocator<double> > >::_Vector_alloc<0,std::_Vec_base_types<double,std::allocator<double> > >
PUBLIC ??0?$allocator@N@std@@QAE@XZ ; std::allocator<double>::allocator<double>
PUBLIC ?_Tidy@?$vector@NV?$allocator@N@std@@@std@@IAEXXZ ; std::vector<double,std::allocator<double> >::_Tidy
PUBLIC ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ; std::vector<double,std::allocator<double> >::resize
PUBLIC ??0?$_Vector_alloc@$0A@U?$_Vec_base_types@HV?$allocator@H@std@@@std@@@std@@QAE@ABV?$allocator@H@1@@Z ; std::_Vector_alloc<0,std::_Vec_base_types<int,std::allocator<int> > >::_Vector_alloc<0,std::_Vec_base_types<int,std::allocator<int> > >
PUBLIC ??0?$allocator@H@std@@QAE@XZ ; std::allocator<int>::allocator<int>
PUBLIC ?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ ; std::vector<int,std::allocator<int> >::_Tidy
PUBLIC ?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QBEPBDXZ ; std::_String_val<std::_Simple_types<char> >::_Myptr
PUBLIC ?_Getal@?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QBE?AU?$_Wrap_alloc@V?$allocator@D@std@@@2@XZ ; std::_String_alloc<0,std::_String_base_types<char,std::allocator<char> > >::_Getal
PUBLIC ??0?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QAE@ABV?$allocator@D@1@@Z ; std::_String_alloc<0,std::_String_base_types<char,std::allocator<char> > >::_String_alloc<0,std::_String_base_types<char,std::allocator<char> > >
PUBLIC ??0?$allocator@D@std@@QAE@XZ ; std::allocator<char>::allocator<char>
PUBLIC ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEX_NI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Tidy
PUBLIC ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::size
PUBLIC ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
PUBLIC ??A?$vector@NV?$allocator@N@std@@@std@@QAEAANI@Z ; std::vector<double,std::allocator<double> >::operator[]
PUBLIC ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >
PUBLIC ??0?$vector@NV?$allocator@N@std@@@std@@QAE@I@Z ; std::vector<double,std::allocator<double> >::vector<double,std::allocator<double> >
PUBLIC ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >
PUBLIC ??0?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ; std::vector<int,std::allocator<int> >::vector<int,std::allocator<int> >
PUBLIC ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >
PUBLIC ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >
PUBLIC _main
PUBLIC ?system_category@std@@YAABVerror_category@1@XZ ; std::system_category
PUBLIC ?generic_category@std@@YAABVerror_category@1@XZ ; std::generic_category
PUBLIC ??1_System_error_category@std@@UAE@XZ ; std::_System_error_category::~_System_error_category
PUBLIC ??_G_System_error_category@std@@UAEPAXI@Z ; std::_System_error_category::`scalar deleting destructor'
PUBLIC ?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z ; std::_System_error_category::default_error_condition
PUBLIC ?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z ; std::_System_error_category::message
PUBLIC ?name@_System_error_category@std@@UBEPBDXZ ; std::_System_error_category::name
PUBLIC ??0_System_error_category@std@@QAE@XZ ; std::_System_error_category::_System_error_category
PUBLIC ??1_Iostream_error_category@std@@UAE@XZ ; std::_Iostream_error_category::~_Iostream_error_category
PUBLIC ??_G_Iostream_error_category@std@@UAEPAXI@Z ; std::_Iostream_error_category::`scalar deleting destructor'
PUBLIC ?message@_Iostream_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z ; std::_Iostream_error_category::message
PUBLIC ?name@_Iostream_error_category@std@@UBEPBDXZ ; std::_Iostream_error_category::name
PUBLIC ??0_Iostream_error_category@std@@QAE@XZ ; std::_Iostream_error_category::_Iostream_error_category
PUBLIC ??1_Generic_error_category@std@@UAE@XZ ; std::_Generic_error_category::~_Generic_error_category
PUBLIC ??_G_Generic_error_category@std@@UAEPAXI@Z ; std::_Generic_error_category::`scalar deleting destructor'
PUBLIC ?message@_Generic_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z ; std::_Generic_error_category::message
PUBLIC ?name@_Generic_error_category@std@@UBEPBDXZ ; std::_Generic_error_category::name
PUBLIC ??0_Generic_error_category@std@@QAE@XZ ; std::_Generic_error_category::_Generic_error_category
PUBLIC ?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z ; std::error_category::equivalent
PUBLIC ?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z ; std::error_category::equivalent
PUBLIC ?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z ; std::error_category::default_error_condition
PUBLIC ??8error_condition@std@@QBE_NABV01@@Z ; std::error_condition::operator==
PUBLIC ?category@error_condition@std@@QBEABVerror_category@2@XZ ; std::error_condition::category
PUBLIC ?value@error_condition@std@@QBEHXZ ; std::error_condition::value
PUBLIC ??0error_condition@std@@QAE@HABVerror_category@1@@Z ; std::error_condition::error_condition
PUBLIC ?category@error_code@std@@QBEABVerror_category@2@XZ ; std::error_code::category
PUBLIC ?value@error_code@std@@QBEHXZ ; std::error_code::value
PUBLIC ??_Gerror_category@std@@UAEPAXI@Z ; std::error_category::`scalar deleting destructor'
PUBLIC ??8error_category@std@@QBE_NABV01@@Z ; std::error_category::operator==
PUBLIC ??1error_category@std@@UAE@XZ ; std::error_category::~error_category
PUBLIC ??0error_category@std@@QAE@XZ ; std::error_category::error_category
PUBLIC ?_Adopt@_Iterator_base0@std@@QAEXPBX@Z ; std::_Iterator_base0::_Adopt
PUBLIC ?assign@?$char_traits@D@std@@SAXAADABD@Z ; std::char_traits<char>::assign
PUBLIC ?move@?$char_traits@D@std@@SAPADPADPBDI@Z ; std::char_traits<char>::move
PUBLIC ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z ; std::char_traits<char>::copy
PUBLIC ?length@?$char_traits@D@std@@SAIPBD@Z ; std::char_traits<char>::length
PUBLIC ??3@YAXPAX0@Z ; operator delete
PUBLIC ??2@YAPAXIPAX@Z ; operator new
PUBLIC ?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A ; std::_Error_objects<int>::_Generic_object
PUBLIC ?_Iostream_object@?$_Error_objects@H@std@@2V_Iostream_error_category@2@A ; std::_Error_objects<int>::_Iostream_object
PUBLIC ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A ; std::_Error_objects<int>::_System_object
PUBLIC __real@3ff0000000000000
EXTRN ??_Eerror_category@std@@UAEPAXI@Z:PROC ; std::error_category::`vector deleting destructor'
EXTRN ??_E_Generic_error_category@std@@UAEPAXI@Z:PROC ; std::_Generic_error_category::`vector deleting destructor'
EXTRN ??_E_Iostream_error_category@std@@UAEPAXI@Z:PROC ; std::_Iostream_error_category::`vector deleting destructor'
EXTRN ??_E_System_error_category@std@@UAEPAXI@Z:PROC ; std::_System_error_category::`vector deleting destructor'
EXTRN __CxxThrowException@8:PROC
EXTRN ___CxxFrameHandler3:PROC
EXTRN __vcomp_barrier:PROC
EXTRN __vcomp_for_static_end:PROC
EXTRN __vcomp_for_static_simple_init:PROC
EXTRN __vcomp_fork:PROC
EXTRN __vcomp_set_num_threads:PROC
EXTRN _memcpy:PROC
EXTRN __You_must_link_with_Microsoft_OpenMP_library:DWORD
EXTRN ___security_cookie:DWORD
EXTRN __fltused:DWORD
_piecewise_construct DB 01H DUP (?)
_allocator_arg DB 01H DUP (?)
_BSS ENDS
; COMDAT CRT$XCU
CRT$XCU SEGMENT
?_Generic_object$initializer$@?$_Error_objects@H@std@@2P6AXXZA DD FLAT:??__E?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A@@YAXXZ ; std::_Error_objects<int>::_Generic_object$initializer$
CRT$XCU ENDS
; COMDAT __real@3ff0000000000000
CONST SEGMENT
__real@3ff0000000000000 DQ 03ff0000000000000r ; 1
CONST ENDS
; COMDAT ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A
_DATA SEGMENT
?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A DD FLAT:??_7_System_error_category@std@@6B@ ; std::_Error_objects<int>::_System_object
_DATA ENDS
; COMDAT ?_Iostream_object@?$_Error_objects@H@std@@2V_Iostream_error_category@2@A
_DATA SEGMENT
?_Iostream_object@?$_Error_objects@H@std@@2V_Iostream_error_category@2@A DD FLAT:??_7_Iostream_error_category@std@@6B@ ; std::_Error_objects<int>::_Iostream_object
_DATA ENDS
; COMDAT ?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A
_DATA SEGMENT
?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A DD FLAT:??_7_Generic_error_category@std@@6B@ ; std::_Error_objects<int>::_Generic_object
_DATA ENDS
; COMDAT xdata$x
xdata$x SEGMENT
__ehfuncinfo$_main DD 019930522H
DD 04H
DD FLAT:__unwindtable$_main
DD 2 DUP(00H)
DD 2 DUP(00H)
DD 00H
DD 01H
__unwindtable$_main DD 0ffffffffH
DD FLAT:__unwindfunclet$_main$0
DD 00H
DD FLAT:__unwindfunclet$_main$1
DD 01H
DD FLAT:__unwindfunclet$_main$2
DD 02H
DD FLAT:__unwindfunclet$_main$3
xdata$x ENDS
; COMDAT xdata$x
xdata$x SEGMENT
__ehfuncinfo$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z DD 019930522H
DD 04H
DD FLAT:__unwindtable$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z
DD 02H
DD FLAT:__tryblocktable$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z
DD 2 DUP(00H)
DD 00H
DD 01H
__unwindtable$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z DD 0ffffffffH
DD 00H
DD 0ffffffffH
DD 00H
DD 01H
DD 00H
DD 01H
DD 00H
__tryblocktable$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z DD 02H
DD 02H
DD 03H
DD 01H
DD FLAT:__catchsym$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$4
DD 00H
DD 00H
DD 03H
DD 01H
DD FLAT:__catchsym$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$5
__catchsym$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$4 DD 040H
DD 00H
DD 00H
DD FLAT:__catch$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$1
__catchsym$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$5 DD 040H
DD 00H
DD 00H
DD FLAT:__catch$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$0
xdata$x ENDS
; COMDAT CRT$XCU
CRT$XCU SEGMENT
?_Iostream_object$initializer$@?$_Error_objects@H@std@@2P6AXXZA DD FLAT:??__E?_Iostream_object@?$_Error_objects@H@std@@2V_Iostream_error_category@2@A@@YAXXZ ; std::_Error_objects<int>::_Iostream_object$initializer$
CRT$XCU ENDS
; COMDAT CRT$XCU
CRT$XCU SEGMENT
?_System_object$initializer$@?$_Error_objects@H@std@@2P6AXXZA DD FLAT:??__E?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A@@YAXXZ ; std::_Error_objects<int>::_System_object$initializer$
CRT$XCU ENDS
; Function compile flags: /Ogtp
; File e:\программирование\any\any\any.cpp
; COMDAT _main$omp$1
_TEXT SEGMENT
_temp$1$ = -16 ; size = 8
$T1 = -8 ; size = 4
$T2 = -4 ; size = 4
_vec1$ = 8 ; size = 4
_main$omp$1 PROC ; COMDAT
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
push esi
; 165 : for( i = 0; i<N1; i++){
lea eax, DWORD PTR $T1[ebp]
push eax
lea eax, DWORD PTR $T2[ebp]
push eax
push 1
push 1
xorps xmm0, xmm0
push 999 ; 000003e7H
push 0
movsd QWORD PTR _temp$1$[ebp], xmm0
call __vcomp_for_static_simple_init
mov ecx, DWORD PTR $T2[ebp]
mov esi, DWORD PTR $T1[ebp]
add esp, 24 ; 00000018H
cmp ecx, esi
jg SHORT $LN20@main$omp$1
; 162 : double temp = 0;
mov eax, DWORD PTR _vec1$[ebp]
movsd xmm2, QWORD PTR _temp$1$[ebp]
mov eax, DWORD PTR [eax]
sub esi, ecx
lea edx, DWORD PTR [eax+ecx*8]
inc esi
$LL2@main$omp$1:
; 166 : for(j = 0; j<N2; j++){
xor ecx, ecx
npad 10
$LL18@main$omp$1:
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
; 167 : for( k = 0; k<dim; k++){
mov eax, 100 ; 00000064H
npad 3
$LL15@main$omp$1:
; 168 : temp+= j;
movapd xmm0, xmm1
addsd xmm2, xmm0
addsd xmm2, xmm1
addsd xmm2, xmm1
addsd xmm2, xmm1
addsd xmm2, xmm1
addsd xmm2, xmm1
addsd xmm2, xmm1
addsd xmm2, xmm1
addsd xmm2, xmm1
addsd xmm2, xmm1
dec eax
jne SHORT $LL15@main$omp$1
; 166 : for(j = 0; j<N2; j++){
inc ecx
cmp ecx, 4000 ; 00000fa0H
jl SHORT $LL18@main$omp$1
; 169 : }
; 170 : }
; 171 : vec1[i]+=temp;
movsd xmm0, QWORD PTR [edx]
addsd xmm0, xmm2
add edx, 8
xorps xmm2, xmm2
movsd QWORD PTR [edx-8], xmm0
dec esi
jne SHORT $LL2@main$omp$1
$LN20@main$omp$1:
; 165 : for( i = 0; i<N1; i++){
call __vcomp_for_static_end
call __vcomp_barrier
pop esi
; 172 : temp = 0;
mov esp, ebp
pop ebp
ret 0
_main$omp$1 ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\new
; COMDAT ??2@YAPAXIPAX@Z
_TEXT SEGMENT
??2@YAPAXIPAX@Z PROC ; operator new, COMDAT
; ___formal$dead$ = ecx
; __Where$ = edx
; 60 : return (_Where);
mov eax, edx
; 61 : }
ret 0
??2@YAPAXIPAX@Z ENDP ; operator new
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\new
; COMDAT ??3@YAXPAX0@Z
_TEXT SEGMENT
??3@YAXPAX0@Z PROC ; operator delete, COMDAT
; ___formal$dead$ = ecx
; ___formal$dead$ = edx
; 65 : }
ret 0
??3@YAXPAX0@Z ENDP ; operator delete
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; COMDAT ?length@?$char_traits@D@std@@SAIPBD@Z
_TEXT SEGMENT
?length@?$char_traits@D@std@@SAIPBD@Z PROC ; std::char_traits<char>::length, COMDAT
; __First$ = ecx
; 522 : return (*_First == 0 ? 0
; 523 : : _CSTD strlen(_First));
cmp BYTE PTR [ecx], 0
jne SHORT $LN3@length
xor eax, eax
; 524 : }
ret 0
$LN3@length:
; 522 : return (*_First == 0 ? 0
; 523 : : _CSTD strlen(_First));
lea edx, DWORD PTR [ecx+1]
npad 5
$LL5@length:
mov al, BYTE PTR [ecx]
inc ecx
test al, al
jne SHORT $LL5@length
sub ecx, edx
mov eax, ecx
; 524 : }
ret 0
?length@?$char_traits@D@std@@SAIPBD@Z ENDP ; std::char_traits<char>::length
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; COMDAT ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z
_TEXT SEGMENT
__Count$ = 8 ; size = 4
?copy@?$char_traits@D@std@@SAPADPADPBDI@Z PROC ; std::char_traits<char>::copy, COMDAT
; __First1$ = ecx
; __First2$ = edx
; 528 : { // copy [_First2, _First2 + _Count) to [_First1, ...)
push ebp
mov ebp, esp
; 529 : return (_Count == 0 ? _First1
; 530 : : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
mov eax, DWORD PTR __Count$[ebp]
test eax, eax
jne SHORT $LN3@copy
mov eax, ecx
; 531 : }
pop ebp
ret 0
$LN3@copy:
; 529 : return (_Count == 0 ? _First1
; 530 : : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
push eax
push edx
push ecx
call _memcpy
add esp, 12 ; 0000000cH
; 531 : }
pop ebp
ret 0
?copy@?$char_traits@D@std@@SAPADPADPBDI@Z ENDP ; std::char_traits<char>::copy
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; COMDAT ?move@?$char_traits@D@std@@SAPADPADPBDI@Z
_TEXT SEGMENT
__Count$ = 8 ; size = 4
?move@?$char_traits@D@std@@SAPADPADPBDI@Z PROC ; std::char_traits<char>::move, COMDAT
; __First1$ = ecx
; __First2$ = edx
; 551 : { // copy [_First2, _First2 + _Count) to [_First1, ...)
push ebp
mov ebp, esp
; 552 : return (_Count == 0 ? _First1
; 553 : : (_Elem *)_CSTD memmove(_First1, _First2, _Count));
mov eax, DWORD PTR __Count$[ebp]
test eax, eax
jne SHORT $LN3@move
mov eax, ecx
; 554 : }
pop ebp
ret 0
$LN3@move:
; 552 : return (_Count == 0 ? _First1
; 553 : : (_Elem *)_CSTD memmove(_First1, _First2, _Count));
push eax
push edx
push ecx
call DWORD PTR __imp__memmove
add esp, 12 ; 0000000cH
; 554 : }
pop ebp
ret 0
?move@?$char_traits@D@std@@SAPADPADPBDI@Z ENDP ; std::char_traits<char>::move
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; COMDAT ?assign@?$char_traits@D@std@@SAXAADABD@Z
_TEXT SEGMENT
?assign@?$char_traits@D@std@@SAXAADABD@Z PROC ; std::char_traits<char>::assign, COMDAT
; __Left$ = ecx
; __Right$ = edx
; 564 : _Left = _Right;
mov al, BYTE PTR [edx]
mov BYTE PTR [ecx], al
; 565 : }
ret 0
?assign@?$char_traits@D@std@@SAXAADABD@Z ENDP ; std::char_traits<char>::assign
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
; COMDAT ?_Adopt@_Iterator_base0@std@@QAEXPBX@Z
_TEXT SEGMENT
___formal$dead$ = 8 ; size = 4
?_Adopt@_Iterator_base0@std@@QAEXPBX@Z PROC ; std::_Iterator_base0::_Adopt, COMDAT
; _this$dead$ = ecx
; 51 : }
ret 4
?_Adopt@_Iterator_base0@std@@QAEXPBX@Z ENDP ; std::_Iterator_base0::_Adopt
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??0error_category@std@@QAE@XZ
_TEXT SEGMENT
??0error_category@std@@QAE@XZ PROC ; std::error_category::error_category, COMDAT
; _this$ = ecx
; 162 : error_category()
mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
; 163 : { // default constructor
; 164 : }
mov eax, ecx
ret 0
??0error_category@std@@QAE@XZ ENDP ; std::error_category::error_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??1error_category@std@@UAE@XZ
_TEXT SEGMENT
??1error_category@std@@UAE@XZ PROC ; std::error_category::~error_category, COMDAT
; _this$ = ecx
; 167 : { // destroy the object
mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
; 168 : }
ret 0
??1error_category@std@@UAE@XZ ENDP ; std::error_category::~error_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??8error_category@std@@QBE_NABV01@@Z
_TEXT SEGMENT
__Right$ = 8 ; size = 4
??8error_category@std@@QBE_NABV01@@Z PROC ; std::error_category::operator==, COMDAT
; _this$ = ecx
; 184 : { // compare categories for equality
push ebp
mov ebp, esp
; 185 : return (this == &_Right);
xor eax, eax
cmp ecx, DWORD PTR __Right$[ebp]
sete al
; 186 : }
pop ebp
ret 4
??8error_category@std@@QBE_NABV01@@Z ENDP ; std::error_category::operator==
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??_Gerror_category@std@@UAEPAXI@Z
_TEXT SEGMENT
___flags$ = 8 ; size = 4
??_Gerror_category@std@@UAEPAXI@Z PROC ; std::error_category::`scalar deleting destructor', COMDAT
; _this$ = ecx
push ebp
mov ebp, esp
test BYTE PTR ___flags$[ebp], 1
push esi
mov esi, ecx
; 167 : { // destroy the object
mov DWORD PTR [esi], OFFSET ??_7error_category@std@@6B@
je SHORT $LN6@scalar
push esi
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
$LN6@scalar:
mov eax, esi
pop esi
pop ebp
ret 4
??_Gerror_category@std@@UAEPAXI@Z ENDP ; std::error_category::`scalar deleting destructor'
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?value@error_code@std@@QBEHXZ
_TEXT SEGMENT
?value@error_code@std@@QBEHXZ PROC ; std::error_code::value, COMDAT
; _this$ = ecx
; 252 : return (_Myval);
mov eax, DWORD PTR [ecx]
; 253 : }
ret 0
?value@error_code@std@@QBEHXZ ENDP ; std::error_code::value
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?category@error_code@std@@QBEABVerror_category@2@XZ
_TEXT SEGMENT
?category@error_code@std@@QBEABVerror_category@2@XZ PROC ; std::error_code::category, COMDAT
; _this$ = ecx
; 257 : return (*_Mycat);
mov eax, DWORD PTR [ecx+4]
; 258 : }
ret 0
?category@error_code@std@@QBEABVerror_category@2@XZ ENDP ; std::error_code::category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??0error_condition@std@@QAE@HABVerror_category@1@@Z
_TEXT SEGMENT
__Val$ = 8 ; size = 4
__Cat$ = 12 ; size = 4
??0error_condition@std@@QAE@HABVerror_category@1@@Z PROC ; std::error_condition::error_condition, COMDAT
; _this$ = ecx
; 316 : { // construct from error code and category
push ebp
mov ebp, esp
mov eax, DWORD PTR __Val$[ebp]
mov DWORD PTR [ecx], eax
mov eax, DWORD PTR __Cat$[ebp]
mov DWORD PTR [ecx+4], eax
; 317 : }
mov eax, ecx
pop ebp
ret 8
??0error_condition@std@@QAE@HABVerror_category@1@@Z ENDP ; std::error_condition::error_condition
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?value@error_condition@std@@QBEHXZ
_TEXT SEGMENT
?value@error_condition@std@@QBEHXZ PROC ; std::error_condition::value, COMDAT
; _this$ = ecx
; 350 : return (_Myval);
mov eax, DWORD PTR [ecx]
; 351 : }
ret 0
?value@error_condition@std@@QBEHXZ ENDP ; std::error_condition::value
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?category@error_condition@std@@QBEABVerror_category@2@XZ
_TEXT SEGMENT
?category@error_condition@std@@QBEABVerror_category@2@XZ PROC ; std::error_condition::category, COMDAT
; _this$ = ecx
; 355 : return (*_Mycat);
mov eax, DWORD PTR [ecx+4]
; 356 : }
ret 0
?category@error_condition@std@@QBEABVerror_category@2@XZ ENDP ; std::error_condition::category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??8error_condition@std@@QBE_NABV01@@Z
_TEXT SEGMENT
__Right$ = 8 ; size = 4
??8error_condition@std@@QBE_NABV01@@Z PROC ; std::error_condition::operator==, COMDAT
; _this$ = ecx
; 376 : { // test if *this == _Right
push ebp
mov ebp, esp
; 185 : return (this == &_Right);
mov edx, DWORD PTR __Right$[ebp]
mov eax, DWORD PTR [ecx+4]
cmp eax, DWORD PTR [edx+4]
; 377 : return (category() == _Right.category()
; 378 : && value() == _Right.value());
jne SHORT $LN3@operator
mov eax, DWORD PTR [ecx]
cmp eax, DWORD PTR [edx]
jne SHORT $LN3@operator
mov al, 1
; 379 : }
pop ebp
ret 4
$LN3@operator:
; 377 : return (category() == _Right.category()
; 378 : && value() == _Right.value());
xor al, al
; 379 : }
pop ebp
ret 4
??8error_condition@std@@QBE_NABV01@@Z ENDP ; std::error_condition::operator==
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z
_TEXT SEGMENT
___$ReturnUdt$ = 8 ; size = 4
__Errval$ = 12 ; size = 4
?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z PROC ; std::error_category::default_error_condition, COMDAT
; _this$ = ecx
; 401 : { // make error_condition for error code
push ebp
mov ebp, esp
; 316 : { // construct from error code and category
mov eax, DWORD PTR ___$ReturnUdt$[ebp]
mov edx, DWORD PTR __Errval$[ebp]
mov DWORD PTR [eax], edx
mov DWORD PTR [eax+4], ecx
; 402 : return (error_condition(_Errval, *this));
; 403 : }
pop ebp
ret 8
?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z ENDP ; std::error_category::default_error_condition
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
_TEXT SEGMENT
$T1 = -8 ; size = 8
__Errval$ = 8 ; size = 4
__Cond$ = 12 ; size = 4
?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z PROC ; std::error_category::equivalent, COMDAT
; _this$ = ecx
; 408 : { // test if error code same condition
push ebp
mov ebp, esp
; 409 : return (default_error_condition(_Errval) == _Cond);
mov eax, DWORD PTR [ecx]
sub esp, 8
lea edx, DWORD PTR $T1[ebp]
push DWORD PTR __Errval$[ebp]
push edx
call DWORD PTR [eax+12]
; 185 : return (this == &_Right);
mov edx, DWORD PTR __Cond$[ebp]
mov ecx, DWORD PTR [eax+4]
cmp ecx, DWORD PTR [edx+4]
; 186 : }
; 187 :
; 188 : bool operator!=(const error_category& _Right) const _NOEXCEPT
; 189 : { // compare categories for inequality
; 190 : return (!(*this == _Right));
; 191 : }
; 192 :
; 193 : bool operator<(const error_category& _Right) const _NOEXCEPT
; 194 : { // compare categories for order
; 195 : return (this < &_Right);
; 196 : }
; 197 :
; 198 : private:
; 199 : error_category(const error_category&); // not defined
; 200 :
; 201 : error_category& operator=(const error_category&); // not defined
; 202 : };
; 203 :
; 204 : // CLASS error_code
; 205 : class error_code
; 206 : { // store an implementation-specific error code and category
; 207 : public:
; 208 : typedef error_code _Myt;
; 209 :
; 210 : error_code()
; 211 : : _Myval(0),
; 212 : _Mycat(&system_category())
; 213 : { // construct non-error
; 214 : }
; 215 :
; 216 : error_code(int _Val, const error_category& _Cat)
; 217 : : _Myval(_Val), _Mycat(&_Cat)
; 218 : { // construct from error code and category
; 219 : }
; 220 :
; 221 : template<class _Enum>
; 222 : error_code(_Enum _Errcode,
; 223 : typename enable_if<is_error_code_enum<_Enum>::value,
; 224 : void>::type ** = 0)
; 225 : : _Myval(0), _Mycat(0)
; 226 : { // construct from enumerated error code
; 227 : *this = make_error_code(_Errcode); // using ADL
; 228 : }
; 229 :
; 230 : void assign(int _Val, const error_category& _Cat)
; 231 : { // assign error code and category
; 232 : _Myval = _Val;
; 233 : _Mycat = &_Cat;
; 234 : }
; 235 :
; 236 : template<class _Enum>
; 237 : typename enable_if<is_error_code_enum<_Enum>::value,
; 238 : error_code>::type& operator=(_Enum _Errcode)
; 239 : { // assign enumerated error code
; 240 : *this = make_error_code(_Errcode); // using ADL
; 241 : return (*this);
; 242 : }
; 243 :
; 244 : void clear() _NOEXCEPT
; 245 : { // assign non-error
; 246 : _Myval = 0;
; 247 : _Mycat = &system_category();
; 248 : }
; 249 :
; 250 : int value() const
; 251 : { // get error code
; 252 : return (_Myval);
; 253 : }
; 254 :
; 255 : const error_category& category() const
; 256 : { // get category
; 257 : return (*_Mycat);
; 258 : }
; 259 :
; 260 : error_condition default_error_condition() const;
; 261 :
; 262 : string message() const
; 263 : { // get name of error code
; 264 : return (category().message(value()));
; 265 : }
; 266 :
; 267 : _TYPEDEF_BOOL_TYPE;
; 268 :
; 269 : _OPERATOR_BOOL() const _NOEXCEPT
; 270 : { // test for actual error
; 271 : return (value() != 0 ? _CONVERTIBLE_TO_TRUE : 0);
; 272 : }
; 273 :
; 274 : bool operator!() const _NOEXCEPT
; 275 : { // test for actual error
; 276 : return (value() == 0);
; 277 : }
; 278 :
; 279 : bool operator==(const error_code& _Right) const _NOEXCEPT
; 280 : { // test if *this == _Right
; 281 : return (category() == _Right.category()
; 282 : && value() == _Right.value());
; 283 : }
; 284 :
; 285 : bool operator!=(const error_code& _Right) const _NOEXCEPT
; 286 : { // test if *this != _Right
; 287 : return (!(*this == _Right));
; 288 : }
; 289 :
; 290 : bool operator<(const error_code& _Right) const _NOEXCEPT
; 291 : { // test if *this == _Right
; 292 : return (category() < _Right.category()
; 293 : || category() == _Right.category()
; 294 : && value() < _Right.value());
; 295 : }
; 296 :
; 297 : private:
; 298 : int _Myval; // the stored error number
; 299 : const error_category *_Mycat; // pointer to error category
; 300 : };
; 301 :
; 302 : // CLASS error_condition
; 303 : class error_condition
; 304 : { // store an abstract error code and category
; 305 : public:
; 306 : typedef error_condition _Myt;
; 307 :
; 308 : error_condition() _NOEXCEPT
; 309 : : _Myval(0),
; 310 : _Mycat(&generic_category())
; 311 : { // construct non-error
; 312 : }
; 313 :
; 314 : error_condition(int _Val, const error_category& _Cat) _NOEXCEPT
; 315 : : _Myval(_Val), _Mycat(&_Cat)
; 316 : { // construct from error code and category
; 317 : }
; 318 :
; 319 : template<class _Enum>
; 320 : error_condition(_Enum _Errcode,
; 321 : typename enable_if<is_error_condition_enum<_Enum>::value,
; 322 : void>::type ** = 0) _NOEXCEPT
; 323 : : _Myval(0), _Mycat(0)
; 324 : { // construct from enumerated error code
; 325 : *this = make_error_condition(_Errcode); // using ADL
; 326 : }
; 327 :
; 328 : void assign(int _Val, const error_category& _Cat) _NOEXCEPT
; 329 : { // assign error code and category
; 330 : _Myval = _Val;
; 331 : _Mycat = &_Cat;
; 332 : }
; 333 :
; 334 : template<class _Enum>
; 335 : typename enable_if<is_error_condition_enum<_Enum>::value,
; 336 : error_condition>::type& operator=(_Enum _Errcode) _NOEXCEPT
; 337 : { // assign enumerated error code
; 338 : *this = make_error_condition(_Errcode); // using ADL
; 339 : return (*this);
; 340 : }
; 341 :
; 342 : void clear() _NOEXCEPT
; 343 : { // assign non-error
; 344 : _Myval = 0;
; 345 : _Mycat = &generic_category();
; 346 : }
; 347 :
; 348 : int value() const _NOEXCEPT
; 349 : { // get error code
; 350 : return (_Myval);
; 351 : }
; 352 :
; 353 : const error_category& category() const _NOEXCEPT
; 354 : { // get category
; 355 : return (*_Mycat);
; 356 : }
; 357 :
; 358 : string message() const
; 359 : { // get name of error code
; 360 : return (category().message(value()));
; 361 : }
; 362 :
; 363 : _TYPEDEF_BOOL_TYPE;
; 364 :
; 365 : _OPERATOR_BOOL() const _NOEXCEPT
; 366 : { // test for actual error
; 367 : return (value() != 0 ? _CONVERTIBLE_TO_TRUE : 0);
; 368 : }
; 369 :
; 370 : bool operator!() const _NOEXCEPT
; 371 : { // test for actual error
; 372 : return (value() == 0);
; 373 : }
; 374 :
; 375 : bool operator==(const error_condition& _Right) const _NOEXCEPT
; 376 : { // test if *this == _Right
; 377 : return (category() == _Right.category()
; 378 : && value() == _Right.value());
jne SHORT $LN5@equivalent
mov eax, DWORD PTR [eax]
cmp eax, DWORD PTR [edx]
jne SHORT $LN5@equivalent
; 409 : return (default_error_condition(_Errval) == _Cond);
mov al, 1
; 410 : }
mov esp, ebp
pop ebp
ret 8
$LN5@equivalent:
; 409 : return (default_error_condition(_Errval) == _Cond);
xor al, al
; 410 : }
mov esp, ebp
pop ebp
ret 8
?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z ENDP ; std::error_category::equivalent
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
_TEXT SEGMENT
__Code$ = 8 ; size = 4
__Errval$ = 12 ; size = 4
?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z PROC ; std::error_category::equivalent, COMDAT
; _this$ = ecx
; 415 : { // test if conditions same for this category
push ebp
mov ebp, esp
; 185 : return (this == &_Right);
mov eax, DWORD PTR __Code$[ebp]
cmp ecx, DWORD PTR [eax+4]
; 416 : return (*this == _Code.category() && _Code.value() == _Errval);
jne SHORT $LN3@equivalent
mov eax, DWORD PTR [eax]
cmp eax, DWORD PTR __Errval$[ebp]
jne SHORT $LN3@equivalent
mov al, 1
; 417 : }
pop ebp
ret 8
$LN3@equivalent:
; 416 : return (*this == _Code.category() && _Code.value() == _Errval);
xor al, al
; 417 : }
pop ebp
ret 8
?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z ENDP ; std::error_category::equivalent
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??0_Generic_error_category@std@@QAE@XZ
_TEXT SEGMENT
??0_Generic_error_category@std@@QAE@XZ PROC ; std::_Generic_error_category::_Generic_error_category, COMDAT
; _this$ = ecx
; 580 : _Generic_error_category()
mov DWORD PTR [ecx], OFFSET ??_7_Generic_error_category@std@@6B@
; 581 : { // default constructor
; 582 : }
mov eax, ecx
ret 0
??0_Generic_error_category@std@@QAE@XZ ENDP ; std::_Generic_error_category::_Generic_error_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?name@_Generic_error_category@std@@UBEPBDXZ
_TEXT SEGMENT
?name@_Generic_error_category@std@@UBEPBDXZ PROC ; std::_Generic_error_category::name, COMDAT
; _this$ = ecx
; 586 : return ("generic");
mov eax, OFFSET ??_C@_07DCLBNMLN@generic?$AA@
; 587 : }
ret 0
?name@_Generic_error_category@std@@UBEPBDXZ ENDP ; std::_Generic_error_category::name
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?message@_Generic_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
_TEXT SEGMENT
$T1 = -4 ; size = 4
___$ReturnUdt$ = 8 ; size = 4
__Errcode$ = 12 ; size = 4
?message@_Generic_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z PROC ; std::_Generic_error_category::message, COMDAT
; _this$ = ecx
; 590 : { // convert to name of error
push ebp
mov ebp, esp
push ecx
push esi
; 591 : const char *_Name = _Syserror_map(_Errcode);
push DWORD PTR __Errcode$[ebp]
mov DWORD PTR $T1[ebp], 0
call DWORD PTR __imp_?_Syserror_map@std@@YAPBDH@Z
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
mov esi, DWORD PTR ___$ReturnUdt$[ebp]
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; 591 : const char *_Name = _Syserror_map(_Errcode);
add esp, 4
; 592 : return (string(_Name != 0 ? _Name : "unknown error"));
test eax, eax
mov edx, OFFSET ??_C@_0O@BFJCFAAK@unknown?5error?$AA@
cmovne edx, eax
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
mov DWORD PTR [esi+20], 15 ; 0000000fH
; 1145 : }
; 1146 :
; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
; 1148 : { // assign _Count * _Ch
; 1149 : if (_Count == npos)
; 1150 : _Xlen(); // result too long
; 1151 :
; 1152 : if (_Grow(_Count))
; 1153 : { // make room and assign new stuff
; 1154 : _Chassign(0, _Count, _Ch);
; 1155 : _Eos(_Count);
; 1156 : }
; 1157 : return (*this);
; 1158 : }
; 1159 :
; 1160 : template<class _Iter>
; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
; 1162 : _Myt&>::type
; 1163 : assign(_Iter _First, _Iter _Last)
; 1164 : { // assign [First, _Last), input iterators
; 1165 : return (replace(begin(), end(), _First, _Last));
; 1166 : }
; 1167 :
; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
; 1169 : { // assign [First, _Last), const pointers
; 1170 : return (replace(begin(), end(), _First, _Last));
; 1171 : }
; 1172 :
; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
; 1174 : { // assign [First, _Last), const_iterators
; 1175 : return (replace(begin(), end(), _First, _Last));
; 1176 : }
; 1177 :
; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
; 1179 : { // insert _Right at _Off
; 1180 : return (insert(_Off, _Right, 0, npos));
; 1181 : }
; 1182 :
; 1183 : _Myt& insert(size_type _Off,
; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1187 : _Xran(); // _Off or _Roff off end
; 1188 : size_type _Num = _Right.size() - _Roff;
; 1189 : if (_Num < _Count)
; 1190 : _Count = _Num; // trim _Count to size
; 1191 : if (npos - this->_Mysize <= _Count)
; 1192 : _Xlen(); // result too long
; 1193 :
; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1195 : { // make room and insert new stuff
; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1197 : this->_Myptr() + _Off,
; 1198 : this->_Mysize - _Off); // empty out hole
; 1199 : if (this == &_Right)
; 1200 : _Traits::move(this->_Myptr() + _Off,
; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
; 1202 : _Count); // substring
; 1203 : else
; 1204 : _Traits::copy(this->_Myptr() + _Off,
; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1206 : _Eos(_Num);
; 1207 : }
; 1208 : return (*this);
; 1209 : }
; 1210 :
; 1211 : _Myt& insert(size_type _Off,
; 1212 : const _Elem *_Ptr, size_type _Count)
; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1215 : if (_Count != 0)
; 1216 : _DEBUG_POINTER(_Ptr);
; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1218 :
; 1219 : if (_Inside(_Ptr))
; 1220 : return (insert(_Off, *this,
; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
; 1222 : if (this->_Mysize < _Off)
; 1223 : _Xran(); // _Off off end
; 1224 : if (npos - this->_Mysize <= _Count)
; 1225 : _Xlen(); // result too long
; 1226 : size_type _Num;
; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1228 : { // make room and insert new stuff
; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1230 : this->_Myptr() + _Off,
; 1231 : this->_Mysize - _Off); // empty out hole
; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1233 : _Eos(_Num);
; 1234 : }
; 1235 : return (*this);
; 1236 : }
; 1237 :
; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
; 1239 : { // insert [_Ptr, <null>) at _Off
; 1240 : _DEBUG_POINTER(_Ptr);
; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
; 1242 : }
; 1243 :
; 1244 : _Myt& insert(size_type _Off,
; 1245 : size_type _Count, _Elem _Ch)
; 1246 : { // insert _Count * _Ch at _Off
; 1247 : if (this->_Mysize < _Off)
; 1248 : _Xran(); // _Off off end
; 1249 : if (npos - this->_Mysize <= _Count)
; 1250 : _Xlen(); // result too long
; 1251 : size_type _Num;
; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1253 : { // make room and insert new stuff
; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1255 : this->_Myptr() + _Off,
; 1256 : this->_Mysize - _Off); // empty out hole
; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1258 : _Eos(_Num);
; 1259 : }
; 1260 : return (*this);
; 1261 : }
; 1262 :
; 1263 : iterator insert(const_iterator _Where)
; 1264 : { // insert <null> at _Where
; 1265 : return (insert(_Where, _Elem()));
; 1266 : }
; 1267 :
; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
; 1269 : { // insert _Ch at _Where
; 1270 : size_type _Off = _Pdif(_Where, begin());
; 1271 : insert(_Off, 1, _Ch);
; 1272 : return (begin() + _Off);
; 1273 : }
; 1274 :
; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
; 1276 : { // insert _Count * _Elem at _Where
; 1277 : size_type _Off = _Pdif(_Where, begin());
; 1278 : insert(_Off, _Count, _Ch);
; 1279 : return (begin() + _Off);
; 1280 : }
; 1281 :
; 1282 : template<class _Iter>
; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
; 1284 : iterator>::type
; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1286 : { // insert [_First, _Last) at _Where, input iterators
; 1287 : size_type _Off = _Pdif(_Where, begin());
; 1288 : replace(_Where, _Where, _First, _Last);
; 1289 : return (begin() + _Off);
; 1290 : }
; 1291 :
; 1292 : iterator insert(const_iterator _Where,
; 1293 : const_pointer _First, const_pointer _Last)
; 1294 : { // insert [_First, _Last) at _Where, const pointers
; 1295 : size_type _Off = _Pdif(_Where, begin());
; 1296 : replace(_Where, _Where, _First, _Last);
; 1297 : return (begin() + _Off);
; 1298 : }
; 1299 :
; 1300 : iterator insert(const_iterator _Where,
; 1301 : const_iterator _First, const_iterator _Last)
; 1302 : { // insert [_First, _Last) at _Where, const_iterators
; 1303 : size_type _Off = _Pdif(_Where, begin());
; 1304 : replace(_Where, _Where, _First, _Last);
; 1305 : return (begin() + _Off);
; 1306 : }
; 1307 :
; 1308 : _Myt& erase(size_type _Off = 0)
; 1309 : { // erase elements [_Off, ...)
; 1310 : if (this->_Mysize < _Off)
; 1311 : _Xran(); // _Off off end
; 1312 : _Eos(_Off);
; 1313 : return (*this);
; 1314 : }
; 1315 :
; 1316 : _Myt& erase(size_type _Off, size_type _Count)
; 1317 : { // erase elements [_Off, _Off + _Count)
; 1318 : if (this->_Mysize < _Off)
; 1319 : _Xran(); // _Off off end
; 1320 : if (this->_Mysize - _Off <= _Count)
; 1321 : _Eos(_Off); // erase elements [_Off, ...)
; 1322 : else if (0 < _Count)
; 1323 : { // move elements down
; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
; 1325 : size_type _Newsize = this->_Mysize - _Count;
; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
; 1327 : _Eos(_Newsize);
; 1328 : }
; 1329 : return (*this);
; 1330 : }
; 1331 :
; 1332 : iterator erase(const_iterator _Where)
; 1333 : { // erase element at _Where
; 1334 : size_type _Count = _Pdif(_Where, begin());
; 1335 : erase(_Count, 1);
; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1337 : }
; 1338 :
; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
; 1340 : { // erase substring [_First, _Last)
; 1341 : _DEBUG_RANGE(_First, _Last);
; 1342 : size_type _Count = _Pdif(_First, begin());
; 1343 : erase(_Count, _Pdif(_Last, _First));
; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1345 : }
; 1346 :
; 1347 : void clear() _NOEXCEPT
; 1348 : { // erase all
; 1349 : _Eos(0);
; 1350 : }
; 1351 :
; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
; 1353 : { // replace [_Off, _Off + _N0) with _Right
; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
; 1355 : }
; 1356 :
; 1357 : _Myt& replace(size_type _Off,
; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1361 : _Xran(); // _Off or _Roff off end
; 1362 : if (this->_Mysize - _Off < _N0)
; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1364 : size_type _Num = _Right.size() - _Roff;
; 1365 : if (_Num < _Count)
; 1366 : _Count = _Num; // trim _Count to size
; 1367 : if (npos - _Count <= this->_Mysize - _N0)
; 1368 : _Xlen(); // result too long
; 1369 :
; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
; 1372 : if (this->_Mysize < _Newsize)
; 1373 : _Grow(_Newsize);
; 1374 :
; 1375 : if (this != &_Right)
; 1376 : { // no overlap, just move down and copy in new stuff
; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
; 1379 : _Traits::copy(this->_Myptr() + _Off,
; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1381 : }
; 1382 : else if (_Count <= _N0)
; 1383 : { // hole doesn't get larger, just copy in substring
; 1384 : _Traits::move(this->_Myptr() + _Off,
; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1388 : }
; 1389 : else if (_Roff <= _Off)
; 1390 : { // hole gets larger, substring begins before hole
; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1393 : _Traits::move(this->_Myptr() + _Off,
; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
; 1395 : }
; 1396 : else if (_Off + _N0 <= _Roff)
; 1397 : { // hole gets larger, substring begins after hole
; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1400 : _Traits::move(this->_Myptr() + _Off,
; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
; 1402 : _Count); // fill hole
; 1403 : }
; 1404 : else
; 1405 : { // hole gets larger, substring begins in hole
; 1406 : _Traits::move(this->_Myptr() + _Off,
; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
; 1411 : this->_Myptr() + _Roff + _Count,
; 1412 : _Count - _N0); // fill rest of new hole
; 1413 : }
; 1414 :
; 1415 : _Eos(_Newsize);
; 1416 : return (*this);
; 1417 : }
; 1418 :
; 1419 : _Myt& replace(size_type _Off,
; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1423 : if (_Count != 0)
; 1424 : _DEBUG_POINTER(_Ptr);
; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1426 :
; 1427 : if (_Inside(_Ptr))
; 1428 : return (replace(_Off, _N0, *this,
; 1429 : _Ptr - this->_Myptr(),
; 1430 : _Count)); // substring, replace carefully
; 1431 : if (this->_Mysize < _Off)
; 1432 : _Xran(); // _Off off end
; 1433 : if (this->_Mysize - _Off < _N0)
; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1435 : if (npos - _Count <= this->_Mysize - _N0)
; 1436 : _Xlen(); // result too long
; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1438 :
; 1439 : if (_Count < _N0)
; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1441 : this->_Myptr() + _Off + _N0,
; 1442 : _Nm); // smaller hole, move tail up
; 1443 : size_type _Num;
; 1444 : if ((0 < _Count || 0 < _N0)
; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1446 : { // make room and rearrange
; 1447 : if (_N0 < _Count)
; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1451 : _Eos(_Num);
; 1452 : }
; 1453 : return (*this);
; 1454 : }
; 1455 :
; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
; 1458 : _DEBUG_POINTER(_Ptr);
; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 1460 : }
; 1461 :
; 1462 : _Myt& replace(size_type _Off,
; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
; 1465 : if (this->_Mysize < _Off)
; 1466 : _Xran(); // _Off off end
; 1467 : if (this->_Mysize - _Off < _N0)
; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1469 : if (npos - _Count <= this->_Mysize - _N0)
; 1470 : _Xlen(); // result too long
; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1472 :
; 1473 : if (_Count < _N0)
; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1475 : this->_Myptr() + _Off + _N0,
; 1476 : _Nm); // smaller hole, move tail up
; 1477 : size_type _Num;
; 1478 : if ((0 < _Count || 0 < _N0)
; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1480 : { // make room and rearrange
; 1481 : if (_N0 < _Count)
; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1485 : _Eos(_Num);
; 1486 : }
; 1487 : return (*this);
; 1488 : }
; 1489 :
; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1491 : const _Myt& _Right)
; 1492 : { // replace [_First, _Last) with _Right
; 1493 : return (replace(
; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
; 1495 : }
; 1496 :
; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1498 : const _Elem *_Ptr, size_type _Count)
; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
; 1500 : return (replace(
; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
; 1502 : }
; 1503 :
; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1505 : const _Elem *_Ptr)
; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
; 1507 : return (replace(
; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
; 1509 : }
; 1510 :
; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1512 : size_type _Count, _Elem _Ch)
; 1513 : { // replace [_First, _Last) with _Count * _Ch
; 1514 : return (replace(
; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
; 1516 : }
; 1517 :
; 1518 : template<class _Iter>
; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
; 1520 : _Myt&>::type
; 1521 : replace(const_iterator _First, const_iterator _Last,
; 1522 : _Iter _First2, _Iter _Last2)
; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
; 1524 : _Myt _Right(_First2, _Last2);
; 1525 : replace(_First, _Last, _Right);
; 1526 : return (*this);
; 1527 : }
; 1528 :
; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1530 : const_pointer _First2, const_pointer _Last2)
; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1532 : if (_First2 == _Last2)
; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1534 : else
; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1536 : &*_First2, _Last2 - _First2);
; 1537 : return (*this);
; 1538 : }
; 1539 :
; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1541 : pointer _First2, pointer _Last2)
; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1543 : if (_First2 == _Last2)
; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1545 : else
; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1547 : &*_First2, _Last2 - _First2);
; 1548 : return (*this);
; 1549 : }
; 1550 :
; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1552 : const_iterator _First2, const_iterator _Last2)
; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1554 : if (_First2 == _Last2)
; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1556 : else
; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1558 : &*_First2, _Last2 - _First2);
; 1559 : return (*this);
; 1560 : }
; 1561 :
; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1563 : iterator _First2, iterator _Last2)
; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1565 : if (_First2 == _Last2)
; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1567 : else
; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1569 : &*_First2, _Last2 - _First2);
; 1570 : return (*this);
; 1571 : }
; 1572 :
; 1573 : iterator begin() _NOEXCEPT
; 1574 : { // return iterator for beginning of mutable sequence
; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
; 1576 : }
; 1577 :
; 1578 : const_iterator begin() const _NOEXCEPT
; 1579 : { // return iterator for beginning of nonmutable sequence
; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
; 1581 : }
; 1582 :
; 1583 : iterator end() _NOEXCEPT
; 1584 : { // return iterator for end of mutable sequence
; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
; 1586 : }
; 1587 :
; 1588 : const_iterator end() const _NOEXCEPT
; 1589 : { // return iterator for end of nonmutable sequence
; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
; 1591 : }
; 1592 :
; 1593 : reverse_iterator rbegin() _NOEXCEPT
; 1594 : { // return iterator for beginning of reversed mutable sequence
; 1595 : return (reverse_iterator(end()));
; 1596 : }
; 1597 :
; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
; 1599 : { // return iterator for beginning of reversed nonmutable sequence
; 1600 : return (const_reverse_iterator(end()));
; 1601 : }
; 1602 :
; 1603 : reverse_iterator rend() _NOEXCEPT
; 1604 : { // return iterator for end of reversed mutable sequence
; 1605 : return (reverse_iterator(begin()));
; 1606 : }
; 1607 :
; 1608 : const_reverse_iterator rend() const _NOEXCEPT
; 1609 : { // return iterator for end of reversed nonmutable sequence
; 1610 : return (const_reverse_iterator(begin()));
; 1611 : }
; 1612 :
; 1613 : #if _HAS_CPP0X
; 1614 : const_iterator cbegin() const _NOEXCEPT
; 1615 : { // return iterator for beginning of nonmutable sequence
; 1616 : return (((const _Myt *)this)->begin());
; 1617 : }
; 1618 :
; 1619 : const_iterator cend() const _NOEXCEPT
; 1620 : { // return iterator for end of nonmutable sequence
; 1621 : return (((const _Myt *)this)->end());
; 1622 : }
; 1623 :
; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
; 1625 : { // return iterator for beginning of reversed nonmutable sequence
; 1626 : return (((const _Myt *)this)->rbegin());
; 1627 : }
; 1628 :
; 1629 : const_reverse_iterator crend() const _NOEXCEPT
; 1630 : { // return iterator for end of reversed nonmutable sequence
; 1631 : return (((const _Myt *)this)->rend());
; 1632 : }
; 1633 :
; 1634 : void shrink_to_fit()
; 1635 : { // reduce capacity
; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
; 1637 : { // worth shrinking, do it
; 1638 : _Myt _Tmp(*this);
; 1639 : swap(_Tmp);
; 1640 : }
; 1641 : }
; 1642 : #endif /* _HAS_CPP0X */
; 1643 :
; 1644 : reference at(size_type _Off)
; 1645 : { // subscript mutable sequence with checking
; 1646 : if (this->_Mysize <= _Off)
; 1647 : _Xran(); // _Off off end
; 1648 : return (this->_Myptr()[_Off]);
; 1649 : }
; 1650 :
; 1651 : const_reference at(size_type _Off) const
; 1652 : { // subscript nonmutable sequence with checking
; 1653 : if (this->_Mysize <= _Off)
; 1654 : _Xran(); // _Off off end
; 1655 : return (this->_Myptr()[_Off]);
; 1656 : }
; 1657 :
; 1658 : reference operator[](size_type _Off)
; 1659 : { // subscript mutable sequence
; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1661 : if (this->_Mysize < _Off) // sic
; 1662 : _DEBUG_ERROR("string subscript out of range");
; 1663 :
; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1667 :
; 1668 : return (this->_Myptr()[_Off]);
; 1669 : }
; 1670 :
; 1671 : const_reference operator[](size_type _Off) const
; 1672 : { // subscript nonmutable sequence
; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1674 : if (this->_Mysize < _Off) // sic
; 1675 : _DEBUG_ERROR("string subscript out of range");
; 1676 :
; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1680 :
; 1681 : return (this->_Myptr()[_Off]);
; 1682 : }
; 1683 :
; 1684 : void push_back(_Elem _Ch)
; 1685 : { // insert element at end
; 1686 : insert(end(), _Ch);
; 1687 : }
; 1688 :
; 1689 : #if _HAS_CPP0X
; 1690 : void pop_back()
; 1691 : { // erase element at end
; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
; 1693 : }
; 1694 :
; 1695 : reference front()
; 1696 : { // return first element of mutable sequence
; 1697 : return (*begin());
; 1698 : }
; 1699 :
; 1700 : const_reference front() const
; 1701 : { // return first element of nonmutable sequence
; 1702 : return (*begin());
; 1703 : }
; 1704 :
; 1705 : reference back()
; 1706 : { // return last element of mutable sequence
; 1707 : return (*(end() - 1));
; 1708 : }
; 1709 :
; 1710 : const_reference back() const
; 1711 : { // return last element of nonmutable sequence
; 1712 : return (*(end() - 1));
; 1713 : }
; 1714 : #endif /* _HAS_CPP0X */
; 1715 :
; 1716 : const _Elem *c_str() const _NOEXCEPT
; 1717 : { // return pointer to null-terminated nonmutable array
; 1718 : return (this->_Myptr());
; 1719 : }
; 1720 :
; 1721 : const _Elem *data() const _NOEXCEPT
; 1722 : { // return pointer to nonmutable array
; 1723 : return (c_str());
; 1724 : }
; 1725 :
; 1726 : size_type length() const _NOEXCEPT
; 1727 : { // return length of sequence
; 1728 : return (this->_Mysize);
; 1729 : }
; 1730 :
; 1731 : size_type size() const _NOEXCEPT
; 1732 : { // return length of sequence
; 1733 : return (this->_Mysize);
; 1734 : }
; 1735 :
; 1736 : size_type max_size() const _NOEXCEPT
; 1737 : { // return maximum possible length of sequence
; 1738 : size_type _Num = this->_Getal().max_size();
; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
; 1740 : }
; 1741 :
; 1742 : void resize(size_type _Newsize)
; 1743 : { // determine new length, padding with null elements as needed
; 1744 : resize(_Newsize, _Elem());
; 1745 : }
; 1746 :
; 1747 : void resize(size_type _Newsize, _Elem _Ch)
; 1748 : { // determine new length, padding with _Ch elements as needed
; 1749 : if (_Newsize <= this->_Mysize)
; 1750 : _Eos(_Newsize);
; 1751 : else
; 1752 : append(_Newsize - this->_Mysize, _Ch);
; 1753 : }
; 1754 :
; 1755 : size_type capacity() const _NOEXCEPT
; 1756 : { // return current length of allocated storage
; 1757 : return (this->_Myres);
; 1758 : }
; 1759 :
; 1760 : void reserve(size_type _Newcap = 0)
; 1761 : { // determine new minimum length of allocated storage
; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
; 1763 : { // change reservation
; 1764 : size_type _Size = this->_Mysize;
; 1765 : if (_Grow(_Newcap, true))
; 1766 : _Eos(_Size);
; 1767 : }
; 1768 : }
; 1769 :
; 1770 : bool empty() const _NOEXCEPT
; 1771 : { // test if sequence is empty
; 1772 : return (this->_Mysize == 0);
; 1773 : }
; 1774 :
; 1775 : _SCL_INSECURE_DEPRECATE
; 1776 :
; 1777 : size_type copy(_Elem *_Ptr,
; 1778 : size_type _Count, size_type _Off = 0) const
; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1781 : if (_Count != 0)
; 1782 : _DEBUG_POINTER(_Ptr);
; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1784 :
; 1785 : if (this->_Mysize < _Off)
; 1786 : _Xran(); // _Off off end
; 1787 : if (this->_Mysize - _Off < _Count)
; 1788 : _Count = this->_Mysize - _Off;
; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
; 1790 : return (_Count);
; 1791 : }
; 1792 :
; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
; 1794 : size_type _Count, size_type _Off = 0) const
; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1797 : if (_Count != 0)
; 1798 : _DEBUG_POINTER(_Dest);
; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1800 :
; 1801 : if (this->_Mysize < _Off)
; 1802 : _Xran(); // _Off off end
; 1803 : if (this->_Mysize - _Off < _Count)
; 1804 : _Count = this->_Mysize - _Off;
; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
; 1806 : return (_Count);
; 1807 : }
; 1808 :
; 1809 : void _Swap_bx(_Myt& _Right)
; 1810 : { // exchange _Bx with _Right._Bx
; 1811 : if (this->_BUF_SIZE <= this->_Myres)
; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
; 1814 : else
; 1815 : { // swap large with small
; 1816 : pointer _Ptr = this->_Bx._Ptr;
; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
; 1818 : _Traits::copy(this->_Bx._Buf,
; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
; 1821 : }
; 1822 : else
; 1823 : if (_Right._Myres < this->_BUF_SIZE)
; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
; 1825 : else
; 1826 : { // swap small with large
; 1827 : pointer _Ptr = _Right._Bx._Ptr;
; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
; 1829 : _Traits::copy(_Right._Bx._Buf,
; 1830 : this->_Bx._Buf, this->_Mysize + 1);
; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 1832 : }
; 1833 : }
; 1834 :
; 1835 : void swap(_Myt& _Right)
; 1836 : { // exchange contents with _Right
; 1837 : if (this == &_Right)
; 1838 : ; // same object, do nothing
; 1839 : else if (this->_Getal() == _Right._Getal())
; 1840 : { // same allocator, swap control information
; 1841 : this->_Swap_all(_Right);
; 1842 : _Swap_bx(_Right);
; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
; 1844 : _STD swap(this->_Myres, _Right._Myres);
; 1845 : }
; 1846 :
; 1847 : #if _HAS_CPP0X
; 1848 : else if (_Alty::propagate_on_container_swap::value)
; 1849 : { // swap allocators and control information
; 1850 : this->_Swap_alloc(_Right);
; 1851 : _Swap_bx(_Right);
; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
; 1854 : _STD swap(this->_Myres, _Right._Myres);
; 1855 : }
; 1856 : #endif /* _HAS_CPP0X */
; 1857 :
; 1858 : else
; 1859 : { // different allocator, do multiple assigns
; 1860 : _Myt _Tmp = *this;
; 1861 :
; 1862 : *this = _Right;
; 1863 : _Right = _Tmp;
; 1864 : }
; 1865 : }
; 1866 :
; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
; 1868 : { // look for _Right beginning at or after _Off
; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
; 1870 : }
; 1871 :
; 1872 : size_type find(const _Elem *_Ptr,
; 1873 : size_type _Off, size_type _Count) const
; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1876 : if (_Count != 0)
; 1877 : _DEBUG_POINTER(_Ptr);
; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1879 :
; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
; 1881 : return (_Off); // null string always matches (if inside string)
; 1882 :
; 1883 : size_type _Nm;
; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
; 1885 : { // room for match, look for it
; 1886 : const _Elem *_Uptr, *_Vptr;
; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1891 : return (_Uptr - this->_Myptr()); // found a match
; 1892 : }
; 1893 :
; 1894 : return (npos); // no match
; 1895 : }
; 1896 :
; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
; 1899 : _DEBUG_POINTER(_Ptr);
; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
; 1901 : }
; 1902 :
; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
; 1904 : { // look for _Ch at or after _Off
; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1906 : }
; 1907 :
; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
; 1909 : { // look for _Right beginning before _Off
; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
; 1911 : }
; 1912 :
; 1913 : size_type rfind(const _Elem *_Ptr,
; 1914 : size_type _Off, size_type _Count) const
; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1917 : if (_Count != 0)
; 1918 : _DEBUG_POINTER(_Ptr);
; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1920 :
; 1921 : if (_Count == 0)
; 1922 : return (_Off < this->_Mysize ? _Off
; 1923 : : this->_Mysize); // null always matches
; 1924 : if (_Count <= this->_Mysize)
; 1925 : { // room for match, look for it
; 1926 : const _Elem *_Uptr = this->_Myptr() +
; 1927 : (_Off < this->_Mysize - _Count ? _Off
; 1928 : : this->_Mysize - _Count);
; 1929 : for (; ; --_Uptr)
; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1932 : return (_Uptr - this->_Myptr()); // found a match
; 1933 : else if (_Uptr == this->_Myptr())
; 1934 : break; // at beginning, no more chance for match
; 1935 : }
; 1936 :
; 1937 : return (npos); // no match
; 1938 : }
; 1939 :
; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
; 1941 : { // look for [_Ptr, <null>) beginning before _Off
; 1942 : _DEBUG_POINTER(_Ptr);
; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
; 1944 : }
; 1945 :
; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
; 1947 : { // look for _Ch before _Off
; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 1949 : }
; 1950 :
; 1951 : size_type find_first_of(const _Myt& _Right,
; 1952 : size_type _Off = 0) const _NOEXCEPT
; 1953 : { // look for one of _Right at or after _Off
; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
; 1955 : }
; 1956 :
; 1957 : size_type find_first_of(const _Elem *_Ptr,
; 1958 : size_type _Off, size_type _Count) const
; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1961 : if (_Count != 0)
; 1962 : _DEBUG_POINTER(_Ptr);
; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1964 :
; 1965 : if (0 < _Count && _Off < this->_Mysize)
; 1966 : { // room for match, look for it
; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 1969 : _Uptr < _Vptr; ++_Uptr)
; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 1971 : return (_Uptr - this->_Myptr()); // found a match
; 1972 : }
; 1973 :
; 1974 : return (npos); // no match
; 1975 : }
; 1976 :
; 1977 : size_type find_first_of(const _Elem *_Ptr,
; 1978 : size_type _Off = 0) const
; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
; 1980 : _DEBUG_POINTER(_Ptr);
; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 1982 : }
; 1983 :
; 1984 : size_type find_first_of(_Elem _Ch,
; 1985 : size_type _Off = 0) const
; 1986 : { // look for _Ch at or after _Off
; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1988 : }
; 1989 :
; 1990 : size_type find_last_of(const _Myt& _Right,
; 1991 : size_type _Off = npos) const _NOEXCEPT
; 1992 : { // look for one of _Right before _Off
; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
; 1994 : }
; 1995 :
; 1996 : size_type find_last_of(const _Elem *_Ptr,
; 1997 : size_type _Off, size_type _Count) const
; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2000 : if (_Count != 0)
; 2001 : _DEBUG_POINTER(_Ptr);
; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2003 :
; 2004 : if (0 < _Count && 0 < this->_Mysize)
; 2005 : { // worth searching, do it
; 2006 : const _Elem *_Uptr = this->_Myptr()
; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2008 : for (; ; --_Uptr)
; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 2010 : return (_Uptr - this->_Myptr()); // found a match
; 2011 : else if (_Uptr == this->_Myptr())
; 2012 : break; // at beginning, no more chance for match
; 2013 : }
; 2014 :
; 2015 : return (npos); // no match
; 2016 : }
; 2017 :
; 2018 : size_type find_last_of(const _Elem *_Ptr,
; 2019 : size_type _Off = npos) const
; 2020 : { // look for one of [_Ptr, <null>) before _Off
; 2021 : _DEBUG_POINTER(_Ptr);
; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2023 : }
; 2024 :
; 2025 : size_type find_last_of(_Elem _Ch,
; 2026 : size_type _Off = npos) const
; 2027 : { // look for _Ch before _Off
; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 2029 : }
; 2030 :
; 2031 : size_type find_first_not_of(const _Myt& _Right,
; 2032 : size_type _Off = 0) const _NOEXCEPT
; 2033 : { // look for none of _Right at or after _Off
; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
; 2035 : _Right.size()));
; 2036 : }
; 2037 :
; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
; 2039 : size_type _Off, size_type _Count) const
; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2042 : if (_Count != 0)
; 2043 : _DEBUG_POINTER(_Ptr);
; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2045 :
; 2046 : if (_Off < this->_Mysize)
; 2047 : { // room for match, look for it
; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 2050 : _Uptr < _Vptr; ++_Uptr)
; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2052 : return (_Uptr - this->_Myptr());
; 2053 : }
; 2054 : return (npos);
; 2055 : }
; 2056 :
; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
; 2058 : size_type _Off = 0) const
; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
; 2060 : _DEBUG_POINTER(_Ptr);
; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2062 : }
; 2063 :
; 2064 : size_type find_first_not_of(_Elem _Ch,
; 2065 : size_type _Off = 0) const
; 2066 : { // look for non _Ch at or after _Off
; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
; 2068 : }
; 2069 :
; 2070 : size_type find_last_not_of(const _Myt& _Right,
; 2071 : size_type _Off = npos) const _NOEXCEPT
; 2072 : { // look for none of _Right before _Off
; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
; 2074 : }
; 2075 :
; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
; 2077 : size_type _Off, size_type _Count) const
; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2080 : if (_Count != 0)
; 2081 : _DEBUG_POINTER(_Ptr);
; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2083 :
; 2084 : if (0 < this->_Mysize)
; 2085 : { // worth searching, do it
; 2086 : const _Elem *_Uptr = this->_Myptr()
; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2088 : for (; ; --_Uptr)
; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2090 : return (_Uptr - this->_Myptr());
; 2091 : else if (_Uptr == this->_Myptr())
; 2092 : break;
; 2093 : }
; 2094 : return (npos);
; 2095 : }
; 2096 :
; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
; 2098 : size_type _Off = npos) const
; 2099 : { // look for none of [_Ptr, <null>) before _Off
; 2100 : _DEBUG_POINTER(_Ptr);
; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2102 : }
; 2103 :
; 2104 : size_type find_last_not_of(_Elem _Ch,
; 2105 : size_type _Off = npos) const
; 2106 : { // look for non _Ch before _Off
; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
; 2108 : }
; 2109 :
; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
; 2111 : { // return [_Off, _Off + _Count) as new string
; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
; 2113 : }
; 2114 :
; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
; 2116 : { // compare [0, _Mysize) with _Right
; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
; 2118 : }
; 2119 :
; 2120 : int compare(size_type _Off, size_type _N0,
; 2121 : const _Myt& _Right) const
; 2122 : { // compare [_Off, _Off + _N0) with _Right
; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
; 2124 : }
; 2125 :
; 2126 : int compare(size_type _Off,
; 2127 : size_type _N0, const _Myt& _Right,
; 2128 : size_type _Roff, size_type _Count) const
; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 2130 : if (_Right.size() < _Roff)
; 2131 : _Xran(); // _Off off end
; 2132 : if (_Right._Mysize - _Roff < _Count)
; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
; 2135 : }
; 2136 :
; 2137 : int compare(const _Elem *_Ptr) const
; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
; 2139 : _DEBUG_POINTER(_Ptr);
; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
; 2141 : }
; 2142 :
; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
; 2145 : _DEBUG_POINTER(_Ptr);
; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 2147 : }
; 2148 :
; 2149 : int compare(size_type _Off,
; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2153 : if (_Count != 0)
; 2154 : _DEBUG_POINTER(_Ptr);
; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2156 :
; 2157 : if (this->_Mysize < _Off)
; 2158 : _Xran(); // _Off off end
; 2159 : if (this->_Mysize - _Off < _N0)
; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 2161 :
; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
; 2163 : _N0 < _Count ? _N0 : _Count);
; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
; 2165 : : _N0 == _Count ? 0 : +1);
; 2166 : }
; 2167 :
; 2168 : allocator_type get_allocator() const _NOEXCEPT
; 2169 : { // return allocator object for values
; 2170 : return (this->_Getal());
; 2171 : }
; 2172 :
; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
; 2174 : { // assign _Count copies of _Ch beginning at _Off
; 2175 : if (_Count == 1)
; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
; 2177 : else
; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
; 2179 : }
; 2180 :
; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
; 2182 : { // copy _Oldlen elements to newly allocated buffer
; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
; 2184 : if (max_size() < _Newres)
; 2185 : _Newres = _Newsize; // undo roundup if too big
; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
; 2187 : ;
; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
; 2189 : _Newres = this->_Myres
; 2190 : + this->_Myres / 2; // grow exponentially if possible
; 2191 : else
; 2192 : _Newres = max_size(); // settle for max_size()
; 2193 :
; 2194 : _Elem *_Ptr;
; 2195 : _TRY_BEGIN
; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2197 : _CATCH_ALL
; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
; 2199 : _TRY_BEGIN
; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2201 : _CATCH_ALL
; 2202 : _Tidy(true); // failed again, discard storage and reraise
; 2203 : _RERAISE;
; 2204 : _CATCH_END
; 2205 : _CATCH_END
; 2206 :
; 2207 : if (0 < _Oldlen)
; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
; 2209 : _Oldlen); // copy existing elements
; 2210 : _Tidy(true);
; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 2212 : this->_Myres = _Newres;
; 2213 : _Eos(_Oldlen);
; 2214 : }
; 2215 :
; 2216 : void _Eos(size_type _Newsize)
; 2217 : { // set new length and null terminator
; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
mov DWORD PTR [esi+16], 0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 564 : _Left = _Right;
mov BYTE PTR [esi], 0
; 523 : : _CSTD strlen(_First));
cmp BYTE PTR [edx], 0
jne SHORT $LN47@message
xor ecx, ecx
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push ecx
push edx
mov ecx, esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; 592 : return (string(_Name != 0 ? _Name : "unknown error"));
mov eax, esi
pop esi
; 593 : }
mov esp, ebp
pop ebp
ret 8
$LN47@message:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 523 : : _CSTD strlen(_First));
mov ecx, edx
push edi
lea edi, DWORD PTR [ecx+1]
$LL49@message:
mov al, BYTE PTR [ecx]
inc ecx
test al, al
jne SHORT $LL49@message
sub ecx, edi
pop edi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push ecx
push edx
mov ecx, esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; 592 : return (string(_Name != 0 ? _Name : "unknown error"));
mov eax, esi
pop esi
; 593 : }
mov esp, ebp
pop ebp
ret 8
?message@_Generic_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z ENDP ; std::_Generic_error_category::message
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??_G_Generic_error_category@std@@UAEPAXI@Z
_TEXT SEGMENT
___flags$ = 8 ; size = 4
??_G_Generic_error_category@std@@UAEPAXI@Z PROC ; std::_Generic_error_category::`scalar deleting destructor', COMDAT
; _this$ = ecx
push ebp
mov ebp, esp
test BYTE PTR ___flags$[ebp], 1
push esi
mov esi, ecx
; 167 : { // destroy the object
mov DWORD PTR [esi], OFFSET ??_7error_category@std@@6B@
je SHORT $LN8@scalar
push esi
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
$LN8@scalar:
mov eax, esi
pop esi
pop ebp
ret 4
??_G_Generic_error_category@std@@UAEPAXI@Z ENDP ; std::_Generic_error_category::`scalar deleting destructor'
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??1_Generic_error_category@std@@UAE@XZ
_TEXT SEGMENT
??1_Generic_error_category@std@@UAE@XZ PROC ; std::_Generic_error_category::~_Generic_error_category, COMDAT
; _this$ = ecx
; 167 : { // destroy the object
mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
ret 0
??1_Generic_error_category@std@@UAE@XZ ENDP ; std::_Generic_error_category::~_Generic_error_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??0_Iostream_error_category@std@@QAE@XZ
_TEXT SEGMENT
??0_Iostream_error_category@std@@QAE@XZ PROC ; std::_Iostream_error_category::_Iostream_error_category, COMDAT
; _this$dead$ = ecx
; 601 : _Iostream_error_category()
mov DWORD PTR ?_Iostream_object@?$_Error_objects@H@std@@2V_Iostream_error_category@2@A, OFFSET ??_7_Iostream_error_category@std@@6B@ ; std::_Error_objects<int>::_Iostream_object
; 602 : { // default constructor
; 603 : }
mov eax, OFFSET ?_Iostream_object@?$_Error_objects@H@std@@2V_Iostream_error_category@2@A ; std::_Error_objects<int>::_Iostream_object
ret 0
??0_Iostream_error_category@std@@QAE@XZ ENDP ; std::_Iostream_error_category::_Iostream_error_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?name@_Iostream_error_category@std@@UBEPBDXZ
_TEXT SEGMENT
?name@_Iostream_error_category@std@@UBEPBDXZ PROC ; std::_Iostream_error_category::name, COMDAT
; _this$ = ecx
; 607 : return ("iostream");
mov eax, OFFSET ??_C@_08LLGCOLLL@iostream?$AA@
; 608 : }
ret 0
?name@_Iostream_error_category@std@@UBEPBDXZ ENDP ; std::_Iostream_error_category::name
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?message@_Iostream_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
_TEXT SEGMENT
$T1 = -4 ; size = 4
___$ReturnUdt$ = 8 ; size = 4
__Errcode$ = 12 ; size = 4
?message@_Iostream_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z PROC ; std::_Iostream_error_category::message, COMDAT
; _this$ = ecx
; 611 : { // convert to name of error
push ebp
mov ebp, esp
push ecx
; 612 : if (_Errcode == (int)io_errc::stream)
mov eax, DWORD PTR __Errcode$[ebp]
push esi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
mov esi, DWORD PTR ___$ReturnUdt$[ebp]
mov DWORD PTR $T1[ebp], 0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; 612 : if (_Errcode == (int)io_errc::stream)
cmp eax, 1
jne SHORT $LN2@message
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push 21 ; 00000015H
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
mov DWORD PTR [esi+20], 15 ; 0000000fH
; 1145 : }
; 1146 :
; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
; 1148 : { // assign _Count * _Ch
; 1149 : if (_Count == npos)
; 1150 : _Xlen(); // result too long
; 1151 :
; 1152 : if (_Grow(_Count))
; 1153 : { // make room and assign new stuff
; 1154 : _Chassign(0, _Count, _Ch);
; 1155 : _Eos(_Count);
; 1156 : }
; 1157 : return (*this);
; 1158 : }
; 1159 :
; 1160 : template<class _Iter>
; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
; 1162 : _Myt&>::type
; 1163 : assign(_Iter _First, _Iter _Last)
; 1164 : { // assign [First, _Last), input iterators
; 1165 : return (replace(begin(), end(), _First, _Last));
; 1166 : }
; 1167 :
; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
; 1169 : { // assign [First, _Last), const pointers
; 1170 : return (replace(begin(), end(), _First, _Last));
; 1171 : }
; 1172 :
; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
; 1174 : { // assign [First, _Last), const_iterators
; 1175 : return (replace(begin(), end(), _First, _Last));
; 1176 : }
; 1177 :
; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
; 1179 : { // insert _Right at _Off
; 1180 : return (insert(_Off, _Right, 0, npos));
; 1181 : }
; 1182 :
; 1183 : _Myt& insert(size_type _Off,
; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1187 : _Xran(); // _Off or _Roff off end
; 1188 : size_type _Num = _Right.size() - _Roff;
; 1189 : if (_Num < _Count)
; 1190 : _Count = _Num; // trim _Count to size
; 1191 : if (npos - this->_Mysize <= _Count)
; 1192 : _Xlen(); // result too long
; 1193 :
; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1195 : { // make room and insert new stuff
; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1197 : this->_Myptr() + _Off,
; 1198 : this->_Mysize - _Off); // empty out hole
; 1199 : if (this == &_Right)
; 1200 : _Traits::move(this->_Myptr() + _Off,
; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
; 1202 : _Count); // substring
; 1203 : else
; 1204 : _Traits::copy(this->_Myptr() + _Off,
; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1206 : _Eos(_Num);
; 1207 : }
; 1208 : return (*this);
; 1209 : }
; 1210 :
; 1211 : _Myt& insert(size_type _Off,
; 1212 : const _Elem *_Ptr, size_type _Count)
; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1215 : if (_Count != 0)
; 1216 : _DEBUG_POINTER(_Ptr);
; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1218 :
; 1219 : if (_Inside(_Ptr))
; 1220 : return (insert(_Off, *this,
; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
; 1222 : if (this->_Mysize < _Off)
; 1223 : _Xran(); // _Off off end
; 1224 : if (npos - this->_Mysize <= _Count)
; 1225 : _Xlen(); // result too long
; 1226 : size_type _Num;
; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1228 : { // make room and insert new stuff
; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1230 : this->_Myptr() + _Off,
; 1231 : this->_Mysize - _Off); // empty out hole
; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1233 : _Eos(_Num);
; 1234 : }
; 1235 : return (*this);
; 1236 : }
; 1237 :
; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
; 1239 : { // insert [_Ptr, <null>) at _Off
; 1240 : _DEBUG_POINTER(_Ptr);
; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
; 1242 : }
; 1243 :
; 1244 : _Myt& insert(size_type _Off,
; 1245 : size_type _Count, _Elem _Ch)
; 1246 : { // insert _Count * _Ch at _Off
; 1247 : if (this->_Mysize < _Off)
; 1248 : _Xran(); // _Off off end
; 1249 : if (npos - this->_Mysize <= _Count)
; 1250 : _Xlen(); // result too long
; 1251 : size_type _Num;
; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1253 : { // make room and insert new stuff
; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1255 : this->_Myptr() + _Off,
; 1256 : this->_Mysize - _Off); // empty out hole
; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1258 : _Eos(_Num);
; 1259 : }
; 1260 : return (*this);
; 1261 : }
; 1262 :
; 1263 : iterator insert(const_iterator _Where)
; 1264 : { // insert <null> at _Where
; 1265 : return (insert(_Where, _Elem()));
; 1266 : }
; 1267 :
; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
; 1269 : { // insert _Ch at _Where
; 1270 : size_type _Off = _Pdif(_Where, begin());
; 1271 : insert(_Off, 1, _Ch);
; 1272 : return (begin() + _Off);
; 1273 : }
; 1274 :
; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
; 1276 : { // insert _Count * _Elem at _Where
; 1277 : size_type _Off = _Pdif(_Where, begin());
; 1278 : insert(_Off, _Count, _Ch);
; 1279 : return (begin() + _Off);
; 1280 : }
; 1281 :
; 1282 : template<class _Iter>
; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
; 1284 : iterator>::type
; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1286 : { // insert [_First, _Last) at _Where, input iterators
; 1287 : size_type _Off = _Pdif(_Where, begin());
; 1288 : replace(_Where, _Where, _First, _Last);
; 1289 : return (begin() + _Off);
; 1290 : }
; 1291 :
; 1292 : iterator insert(const_iterator _Where,
; 1293 : const_pointer _First, const_pointer _Last)
; 1294 : { // insert [_First, _Last) at _Where, const pointers
; 1295 : size_type _Off = _Pdif(_Where, begin());
; 1296 : replace(_Where, _Where, _First, _Last);
; 1297 : return (begin() + _Off);
; 1298 : }
; 1299 :
; 1300 : iterator insert(const_iterator _Where,
; 1301 : const_iterator _First, const_iterator _Last)
; 1302 : { // insert [_First, _Last) at _Where, const_iterators
; 1303 : size_type _Off = _Pdif(_Where, begin());
; 1304 : replace(_Where, _Where, _First, _Last);
; 1305 : return (begin() + _Off);
; 1306 : }
; 1307 :
; 1308 : _Myt& erase(size_type _Off = 0)
; 1309 : { // erase elements [_Off, ...)
; 1310 : if (this->_Mysize < _Off)
; 1311 : _Xran(); // _Off off end
; 1312 : _Eos(_Off);
; 1313 : return (*this);
; 1314 : }
; 1315 :
; 1316 : _Myt& erase(size_type _Off, size_type _Count)
; 1317 : { // erase elements [_Off, _Off + _Count)
; 1318 : if (this->_Mysize < _Off)
; 1319 : _Xran(); // _Off off end
; 1320 : if (this->_Mysize - _Off <= _Count)
; 1321 : _Eos(_Off); // erase elements [_Off, ...)
; 1322 : else if (0 < _Count)
; 1323 : { // move elements down
; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
; 1325 : size_type _Newsize = this->_Mysize - _Count;
; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
; 1327 : _Eos(_Newsize);
; 1328 : }
; 1329 : return (*this);
; 1330 : }
; 1331 :
; 1332 : iterator erase(const_iterator _Where)
; 1333 : { // erase element at _Where
; 1334 : size_type _Count = _Pdif(_Where, begin());
; 1335 : erase(_Count, 1);
; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1337 : }
; 1338 :
; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
; 1340 : { // erase substring [_First, _Last)
; 1341 : _DEBUG_RANGE(_First, _Last);
; 1342 : size_type _Count = _Pdif(_First, begin());
; 1343 : erase(_Count, _Pdif(_Last, _First));
; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1345 : }
; 1346 :
; 1347 : void clear() _NOEXCEPT
; 1348 : { // erase all
; 1349 : _Eos(0);
; 1350 : }
; 1351 :
; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
; 1353 : { // replace [_Off, _Off + _N0) with _Right
; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
; 1355 : }
; 1356 :
; 1357 : _Myt& replace(size_type _Off,
; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1361 : _Xran(); // _Off or _Roff off end
; 1362 : if (this->_Mysize - _Off < _N0)
; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1364 : size_type _Num = _Right.size() - _Roff;
; 1365 : if (_Num < _Count)
; 1366 : _Count = _Num; // trim _Count to size
; 1367 : if (npos - _Count <= this->_Mysize - _N0)
; 1368 : _Xlen(); // result too long
; 1369 :
; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
; 1372 : if (this->_Mysize < _Newsize)
; 1373 : _Grow(_Newsize);
; 1374 :
; 1375 : if (this != &_Right)
; 1376 : { // no overlap, just move down and copy in new stuff
; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
; 1379 : _Traits::copy(this->_Myptr() + _Off,
; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1381 : }
; 1382 : else if (_Count <= _N0)
; 1383 : { // hole doesn't get larger, just copy in substring
; 1384 : _Traits::move(this->_Myptr() + _Off,
; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1388 : }
; 1389 : else if (_Roff <= _Off)
; 1390 : { // hole gets larger, substring begins before hole
; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1393 : _Traits::move(this->_Myptr() + _Off,
; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
; 1395 : }
; 1396 : else if (_Off + _N0 <= _Roff)
; 1397 : { // hole gets larger, substring begins after hole
; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1400 : _Traits::move(this->_Myptr() + _Off,
; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
; 1402 : _Count); // fill hole
; 1403 : }
; 1404 : else
; 1405 : { // hole gets larger, substring begins in hole
; 1406 : _Traits::move(this->_Myptr() + _Off,
; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
; 1411 : this->_Myptr() + _Roff + _Count,
; 1412 : _Count - _N0); // fill rest of new hole
; 1413 : }
; 1414 :
; 1415 : _Eos(_Newsize);
; 1416 : return (*this);
; 1417 : }
; 1418 :
; 1419 : _Myt& replace(size_type _Off,
; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1423 : if (_Count != 0)
; 1424 : _DEBUG_POINTER(_Ptr);
; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1426 :
; 1427 : if (_Inside(_Ptr))
; 1428 : return (replace(_Off, _N0, *this,
; 1429 : _Ptr - this->_Myptr(),
; 1430 : _Count)); // substring, replace carefully
; 1431 : if (this->_Mysize < _Off)
; 1432 : _Xran(); // _Off off end
; 1433 : if (this->_Mysize - _Off < _N0)
; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1435 : if (npos - _Count <= this->_Mysize - _N0)
; 1436 : _Xlen(); // result too long
; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1438 :
; 1439 : if (_Count < _N0)
; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1441 : this->_Myptr() + _Off + _N0,
; 1442 : _Nm); // smaller hole, move tail up
; 1443 : size_type _Num;
; 1444 : if ((0 < _Count || 0 < _N0)
; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1446 : { // make room and rearrange
; 1447 : if (_N0 < _Count)
; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1451 : _Eos(_Num);
; 1452 : }
; 1453 : return (*this);
; 1454 : }
; 1455 :
; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
; 1458 : _DEBUG_POINTER(_Ptr);
; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 1460 : }
; 1461 :
; 1462 : _Myt& replace(size_type _Off,
; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
; 1465 : if (this->_Mysize < _Off)
; 1466 : _Xran(); // _Off off end
; 1467 : if (this->_Mysize - _Off < _N0)
; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1469 : if (npos - _Count <= this->_Mysize - _N0)
; 1470 : _Xlen(); // result too long
; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1472 :
; 1473 : if (_Count < _N0)
; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1475 : this->_Myptr() + _Off + _N0,
; 1476 : _Nm); // smaller hole, move tail up
; 1477 : size_type _Num;
; 1478 : if ((0 < _Count || 0 < _N0)
; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1480 : { // make room and rearrange
; 1481 : if (_N0 < _Count)
; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1485 : _Eos(_Num);
; 1486 : }
; 1487 : return (*this);
; 1488 : }
; 1489 :
; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1491 : const _Myt& _Right)
; 1492 : { // replace [_First, _Last) with _Right
; 1493 : return (replace(
; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
; 1495 : }
; 1496 :
; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1498 : const _Elem *_Ptr, size_type _Count)
; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
; 1500 : return (replace(
; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
; 1502 : }
; 1503 :
; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1505 : const _Elem *_Ptr)
; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
; 1507 : return (replace(
; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
; 1509 : }
; 1510 :
; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1512 : size_type _Count, _Elem _Ch)
; 1513 : { // replace [_First, _Last) with _Count * _Ch
; 1514 : return (replace(
; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
; 1516 : }
; 1517 :
; 1518 : template<class _Iter>
; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
; 1520 : _Myt&>::type
; 1521 : replace(const_iterator _First, const_iterator _Last,
; 1522 : _Iter _First2, _Iter _Last2)
; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
; 1524 : _Myt _Right(_First2, _Last2);
; 1525 : replace(_First, _Last, _Right);
; 1526 : return (*this);
; 1527 : }
; 1528 :
; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1530 : const_pointer _First2, const_pointer _Last2)
; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1532 : if (_First2 == _Last2)
; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1534 : else
; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1536 : &*_First2, _Last2 - _First2);
; 1537 : return (*this);
; 1538 : }
; 1539 :
; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1541 : pointer _First2, pointer _Last2)
; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1543 : if (_First2 == _Last2)
; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1545 : else
; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1547 : &*_First2, _Last2 - _First2);
; 1548 : return (*this);
; 1549 : }
; 1550 :
; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1552 : const_iterator _First2, const_iterator _Last2)
; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1554 : if (_First2 == _Last2)
; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1556 : else
; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1558 : &*_First2, _Last2 - _First2);
; 1559 : return (*this);
; 1560 : }
; 1561 :
; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1563 : iterator _First2, iterator _Last2)
; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1565 : if (_First2 == _Last2)
; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1567 : else
; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1569 : &*_First2, _Last2 - _First2);
; 1570 : return (*this);
; 1571 : }
; 1572 :
; 1573 : iterator begin() _NOEXCEPT
; 1574 : { // return iterator for beginning of mutable sequence
; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
; 1576 : }
; 1577 :
; 1578 : const_iterator begin() const _NOEXCEPT
; 1579 : { // return iterator for beginning of nonmutable sequence
; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
; 1581 : }
; 1582 :
; 1583 : iterator end() _NOEXCEPT
; 1584 : { // return iterator for end of mutable sequence
; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
; 1586 : }
; 1587 :
; 1588 : const_iterator end() const _NOEXCEPT
; 1589 : { // return iterator for end of nonmutable sequence
; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
; 1591 : }
; 1592 :
; 1593 : reverse_iterator rbegin() _NOEXCEPT
; 1594 : { // return iterator for beginning of reversed mutable sequence
; 1595 : return (reverse_iterator(end()));
; 1596 : }
; 1597 :
; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
; 1599 : { // return iterator for beginning of reversed nonmutable sequence
; 1600 : return (const_reverse_iterator(end()));
; 1601 : }
; 1602 :
; 1603 : reverse_iterator rend() _NOEXCEPT
; 1604 : { // return iterator for end of reversed mutable sequence
; 1605 : return (reverse_iterator(begin()));
; 1606 : }
; 1607 :
; 1608 : const_reverse_iterator rend() const _NOEXCEPT
; 1609 : { // return iterator for end of reversed nonmutable sequence
; 1610 : return (const_reverse_iterator(begin()));
; 1611 : }
; 1612 :
; 1613 : #if _HAS_CPP0X
; 1614 : const_iterator cbegin() const _NOEXCEPT
; 1615 : { // return iterator for beginning of nonmutable sequence
; 1616 : return (((const _Myt *)this)->begin());
; 1617 : }
; 1618 :
; 1619 : const_iterator cend() const _NOEXCEPT
; 1620 : { // return iterator for end of nonmutable sequence
; 1621 : return (((const _Myt *)this)->end());
; 1622 : }
; 1623 :
; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
; 1625 : { // return iterator for beginning of reversed nonmutable sequence
; 1626 : return (((const _Myt *)this)->rbegin());
; 1627 : }
; 1628 :
; 1629 : const_reverse_iterator crend() const _NOEXCEPT
; 1630 : { // return iterator for end of reversed nonmutable sequence
; 1631 : return (((const _Myt *)this)->rend());
; 1632 : }
; 1633 :
; 1634 : void shrink_to_fit()
; 1635 : { // reduce capacity
; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
; 1637 : { // worth shrinking, do it
; 1638 : _Myt _Tmp(*this);
; 1639 : swap(_Tmp);
; 1640 : }
; 1641 : }
; 1642 : #endif /* _HAS_CPP0X */
; 1643 :
; 1644 : reference at(size_type _Off)
; 1645 : { // subscript mutable sequence with checking
; 1646 : if (this->_Mysize <= _Off)
; 1647 : _Xran(); // _Off off end
; 1648 : return (this->_Myptr()[_Off]);
; 1649 : }
; 1650 :
; 1651 : const_reference at(size_type _Off) const
; 1652 : { // subscript nonmutable sequence with checking
; 1653 : if (this->_Mysize <= _Off)
; 1654 : _Xran(); // _Off off end
; 1655 : return (this->_Myptr()[_Off]);
; 1656 : }
; 1657 :
; 1658 : reference operator[](size_type _Off)
; 1659 : { // subscript mutable sequence
; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1661 : if (this->_Mysize < _Off) // sic
; 1662 : _DEBUG_ERROR("string subscript out of range");
; 1663 :
; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1667 :
; 1668 : return (this->_Myptr()[_Off]);
; 1669 : }
; 1670 :
; 1671 : const_reference operator[](size_type _Off) const
; 1672 : { // subscript nonmutable sequence
; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1674 : if (this->_Mysize < _Off) // sic
; 1675 : _DEBUG_ERROR("string subscript out of range");
; 1676 :
; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1680 :
; 1681 : return (this->_Myptr()[_Off]);
; 1682 : }
; 1683 :
; 1684 : void push_back(_Elem _Ch)
; 1685 : { // insert element at end
; 1686 : insert(end(), _Ch);
; 1687 : }
; 1688 :
; 1689 : #if _HAS_CPP0X
; 1690 : void pop_back()
; 1691 : { // erase element at end
; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
; 1693 : }
; 1694 :
; 1695 : reference front()
; 1696 : { // return first element of mutable sequence
; 1697 : return (*begin());
; 1698 : }
; 1699 :
; 1700 : const_reference front() const
; 1701 : { // return first element of nonmutable sequence
; 1702 : return (*begin());
; 1703 : }
; 1704 :
; 1705 : reference back()
; 1706 : { // return last element of mutable sequence
; 1707 : return (*(end() - 1));
; 1708 : }
; 1709 :
; 1710 : const_reference back() const
; 1711 : { // return last element of nonmutable sequence
; 1712 : return (*(end() - 1));
; 1713 : }
; 1714 : #endif /* _HAS_CPP0X */
; 1715 :
; 1716 : const _Elem *c_str() const _NOEXCEPT
; 1717 : { // return pointer to null-terminated nonmutable array
; 1718 : return (this->_Myptr());
; 1719 : }
; 1720 :
; 1721 : const _Elem *data() const _NOEXCEPT
; 1722 : { // return pointer to nonmutable array
; 1723 : return (c_str());
; 1724 : }
; 1725 :
; 1726 : size_type length() const _NOEXCEPT
; 1727 : { // return length of sequence
; 1728 : return (this->_Mysize);
; 1729 : }
; 1730 :
; 1731 : size_type size() const _NOEXCEPT
; 1732 : { // return length of sequence
; 1733 : return (this->_Mysize);
; 1734 : }
; 1735 :
; 1736 : size_type max_size() const _NOEXCEPT
; 1737 : { // return maximum possible length of sequence
; 1738 : size_type _Num = this->_Getal().max_size();
; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
; 1740 : }
; 1741 :
; 1742 : void resize(size_type _Newsize)
; 1743 : { // determine new length, padding with null elements as needed
; 1744 : resize(_Newsize, _Elem());
; 1745 : }
; 1746 :
; 1747 : void resize(size_type _Newsize, _Elem _Ch)
; 1748 : { // determine new length, padding with _Ch elements as needed
; 1749 : if (_Newsize <= this->_Mysize)
; 1750 : _Eos(_Newsize);
; 1751 : else
; 1752 : append(_Newsize - this->_Mysize, _Ch);
; 1753 : }
; 1754 :
; 1755 : size_type capacity() const _NOEXCEPT
; 1756 : { // return current length of allocated storage
; 1757 : return (this->_Myres);
; 1758 : }
; 1759 :
; 1760 : void reserve(size_type _Newcap = 0)
; 1761 : { // determine new minimum length of allocated storage
; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
; 1763 : { // change reservation
; 1764 : size_type _Size = this->_Mysize;
; 1765 : if (_Grow(_Newcap, true))
; 1766 : _Eos(_Size);
; 1767 : }
; 1768 : }
; 1769 :
; 1770 : bool empty() const _NOEXCEPT
; 1771 : { // test if sequence is empty
; 1772 : return (this->_Mysize == 0);
; 1773 : }
; 1774 :
; 1775 : _SCL_INSECURE_DEPRECATE
; 1776 :
; 1777 : size_type copy(_Elem *_Ptr,
; 1778 : size_type _Count, size_type _Off = 0) const
; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1781 : if (_Count != 0)
; 1782 : _DEBUG_POINTER(_Ptr);
; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1784 :
; 1785 : if (this->_Mysize < _Off)
; 1786 : _Xran(); // _Off off end
; 1787 : if (this->_Mysize - _Off < _Count)
; 1788 : _Count = this->_Mysize - _Off;
; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
; 1790 : return (_Count);
; 1791 : }
; 1792 :
; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
; 1794 : size_type _Count, size_type _Off = 0) const
; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1797 : if (_Count != 0)
; 1798 : _DEBUG_POINTER(_Dest);
; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1800 :
; 1801 : if (this->_Mysize < _Off)
; 1802 : _Xran(); // _Off off end
; 1803 : if (this->_Mysize - _Off < _Count)
; 1804 : _Count = this->_Mysize - _Off;
; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
; 1806 : return (_Count);
; 1807 : }
; 1808 :
; 1809 : void _Swap_bx(_Myt& _Right)
; 1810 : { // exchange _Bx with _Right._Bx
; 1811 : if (this->_BUF_SIZE <= this->_Myres)
; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
; 1814 : else
; 1815 : { // swap large with small
; 1816 : pointer _Ptr = this->_Bx._Ptr;
; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
; 1818 : _Traits::copy(this->_Bx._Buf,
; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
; 1821 : }
; 1822 : else
; 1823 : if (_Right._Myres < this->_BUF_SIZE)
; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
; 1825 : else
; 1826 : { // swap small with large
; 1827 : pointer _Ptr = _Right._Bx._Ptr;
; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
; 1829 : _Traits::copy(_Right._Bx._Buf,
; 1830 : this->_Bx._Buf, this->_Mysize + 1);
; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 1832 : }
; 1833 : }
; 1834 :
; 1835 : void swap(_Myt& _Right)
; 1836 : { // exchange contents with _Right
; 1837 : if (this == &_Right)
; 1838 : ; // same object, do nothing
; 1839 : else if (this->_Getal() == _Right._Getal())
; 1840 : { // same allocator, swap control information
; 1841 : this->_Swap_all(_Right);
; 1842 : _Swap_bx(_Right);
; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
; 1844 : _STD swap(this->_Myres, _Right._Myres);
; 1845 : }
; 1846 :
; 1847 : #if _HAS_CPP0X
; 1848 : else if (_Alty::propagate_on_container_swap::value)
; 1849 : { // swap allocators and control information
; 1850 : this->_Swap_alloc(_Right);
; 1851 : _Swap_bx(_Right);
; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
; 1854 : _STD swap(this->_Myres, _Right._Myres);
; 1855 : }
; 1856 : #endif /* _HAS_CPP0X */
; 1857 :
; 1858 : else
; 1859 : { // different allocator, do multiple assigns
; 1860 : _Myt _Tmp = *this;
; 1861 :
; 1862 : *this = _Right;
; 1863 : _Right = _Tmp;
; 1864 : }
; 1865 : }
; 1866 :
; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
; 1868 : { // look for _Right beginning at or after _Off
; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
; 1870 : }
; 1871 :
; 1872 : size_type find(const _Elem *_Ptr,
; 1873 : size_type _Off, size_type _Count) const
; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1876 : if (_Count != 0)
; 1877 : _DEBUG_POINTER(_Ptr);
; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1879 :
; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
; 1881 : return (_Off); // null string always matches (if inside string)
; 1882 :
; 1883 : size_type _Nm;
; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
; 1885 : { // room for match, look for it
; 1886 : const _Elem *_Uptr, *_Vptr;
; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1891 : return (_Uptr - this->_Myptr()); // found a match
; 1892 : }
; 1893 :
; 1894 : return (npos); // no match
; 1895 : }
; 1896 :
; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
; 1899 : _DEBUG_POINTER(_Ptr);
; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
; 1901 : }
; 1902 :
; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
; 1904 : { // look for _Ch at or after _Off
; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1906 : }
; 1907 :
; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
; 1909 : { // look for _Right beginning before _Off
; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
; 1911 : }
; 1912 :
; 1913 : size_type rfind(const _Elem *_Ptr,
; 1914 : size_type _Off, size_type _Count) const
; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1917 : if (_Count != 0)
; 1918 : _DEBUG_POINTER(_Ptr);
; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1920 :
; 1921 : if (_Count == 0)
; 1922 : return (_Off < this->_Mysize ? _Off
; 1923 : : this->_Mysize); // null always matches
; 1924 : if (_Count <= this->_Mysize)
; 1925 : { // room for match, look for it
; 1926 : const _Elem *_Uptr = this->_Myptr() +
; 1927 : (_Off < this->_Mysize - _Count ? _Off
; 1928 : : this->_Mysize - _Count);
; 1929 : for (; ; --_Uptr)
; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1932 : return (_Uptr - this->_Myptr()); // found a match
; 1933 : else if (_Uptr == this->_Myptr())
; 1934 : break; // at beginning, no more chance for match
; 1935 : }
; 1936 :
; 1937 : return (npos); // no match
; 1938 : }
; 1939 :
; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
; 1941 : { // look for [_Ptr, <null>) beginning before _Off
; 1942 : _DEBUG_POINTER(_Ptr);
; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
; 1944 : }
; 1945 :
; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
; 1947 : { // look for _Ch before _Off
; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 1949 : }
; 1950 :
; 1951 : size_type find_first_of(const _Myt& _Right,
; 1952 : size_type _Off = 0) const _NOEXCEPT
; 1953 : { // look for one of _Right at or after _Off
; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
; 1955 : }
; 1956 :
; 1957 : size_type find_first_of(const _Elem *_Ptr,
; 1958 : size_type _Off, size_type _Count) const
; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1961 : if (_Count != 0)
; 1962 : _DEBUG_POINTER(_Ptr);
; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1964 :
; 1965 : if (0 < _Count && _Off < this->_Mysize)
; 1966 : { // room for match, look for it
; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 1969 : _Uptr < _Vptr; ++_Uptr)
; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 1971 : return (_Uptr - this->_Myptr()); // found a match
; 1972 : }
; 1973 :
; 1974 : return (npos); // no match
; 1975 : }
; 1976 :
; 1977 : size_type find_first_of(const _Elem *_Ptr,
; 1978 : size_type _Off = 0) const
; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
; 1980 : _DEBUG_POINTER(_Ptr);
; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 1982 : }
; 1983 :
; 1984 : size_type find_first_of(_Elem _Ch,
; 1985 : size_type _Off = 0) const
; 1986 : { // look for _Ch at or after _Off
; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1988 : }
; 1989 :
; 1990 : size_type find_last_of(const _Myt& _Right,
; 1991 : size_type _Off = npos) const _NOEXCEPT
; 1992 : { // look for one of _Right before _Off
; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
; 1994 : }
; 1995 :
; 1996 : size_type find_last_of(const _Elem *_Ptr,
; 1997 : size_type _Off, size_type _Count) const
; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2000 : if (_Count != 0)
; 2001 : _DEBUG_POINTER(_Ptr);
; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2003 :
; 2004 : if (0 < _Count && 0 < this->_Mysize)
; 2005 : { // worth searching, do it
; 2006 : const _Elem *_Uptr = this->_Myptr()
; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2008 : for (; ; --_Uptr)
; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 2010 : return (_Uptr - this->_Myptr()); // found a match
; 2011 : else if (_Uptr == this->_Myptr())
; 2012 : break; // at beginning, no more chance for match
; 2013 : }
; 2014 :
; 2015 : return (npos); // no match
; 2016 : }
; 2017 :
; 2018 : size_type find_last_of(const _Elem *_Ptr,
; 2019 : size_type _Off = npos) const
; 2020 : { // look for one of [_Ptr, <null>) before _Off
; 2021 : _DEBUG_POINTER(_Ptr);
; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2023 : }
; 2024 :
; 2025 : size_type find_last_of(_Elem _Ch,
; 2026 : size_type _Off = npos) const
; 2027 : { // look for _Ch before _Off
; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 2029 : }
; 2030 :
; 2031 : size_type find_first_not_of(const _Myt& _Right,
; 2032 : size_type _Off = 0) const _NOEXCEPT
; 2033 : { // look for none of _Right at or after _Off
; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
; 2035 : _Right.size()));
; 2036 : }
; 2037 :
; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
; 2039 : size_type _Off, size_type _Count) const
; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2042 : if (_Count != 0)
; 2043 : _DEBUG_POINTER(_Ptr);
; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2045 :
; 2046 : if (_Off < this->_Mysize)
; 2047 : { // room for match, look for it
; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 2050 : _Uptr < _Vptr; ++_Uptr)
; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2052 : return (_Uptr - this->_Myptr());
; 2053 : }
; 2054 : return (npos);
; 2055 : }
; 2056 :
; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
; 2058 : size_type _Off = 0) const
; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
; 2060 : _DEBUG_POINTER(_Ptr);
; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2062 : }
; 2063 :
; 2064 : size_type find_first_not_of(_Elem _Ch,
; 2065 : size_type _Off = 0) const
; 2066 : { // look for non _Ch at or after _Off
; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
; 2068 : }
; 2069 :
; 2070 : size_type find_last_not_of(const _Myt& _Right,
; 2071 : size_type _Off = npos) const _NOEXCEPT
; 2072 : { // look for none of _Right before _Off
; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
; 2074 : }
; 2075 :
; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
; 2077 : size_type _Off, size_type _Count) const
; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2080 : if (_Count != 0)
; 2081 : _DEBUG_POINTER(_Ptr);
; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2083 :
; 2084 : if (0 < this->_Mysize)
; 2085 : { // worth searching, do it
; 2086 : const _Elem *_Uptr = this->_Myptr()
; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2088 : for (; ; --_Uptr)
; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2090 : return (_Uptr - this->_Myptr());
; 2091 : else if (_Uptr == this->_Myptr())
; 2092 : break;
; 2093 : }
; 2094 : return (npos);
; 2095 : }
; 2096 :
; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
; 2098 : size_type _Off = npos) const
; 2099 : { // look for none of [_Ptr, <null>) before _Off
; 2100 : _DEBUG_POINTER(_Ptr);
; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2102 : }
; 2103 :
; 2104 : size_type find_last_not_of(_Elem _Ch,
; 2105 : size_type _Off = npos) const
; 2106 : { // look for non _Ch before _Off
; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
; 2108 : }
; 2109 :
; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
; 2111 : { // return [_Off, _Off + _Count) as new string
; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
; 2113 : }
; 2114 :
; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
; 2116 : { // compare [0, _Mysize) with _Right
; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
; 2118 : }
; 2119 :
; 2120 : int compare(size_type _Off, size_type _N0,
; 2121 : const _Myt& _Right) const
; 2122 : { // compare [_Off, _Off + _N0) with _Right
; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
; 2124 : }
; 2125 :
; 2126 : int compare(size_type _Off,
; 2127 : size_type _N0, const _Myt& _Right,
; 2128 : size_type _Roff, size_type _Count) const
; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 2130 : if (_Right.size() < _Roff)
; 2131 : _Xran(); // _Off off end
; 2132 : if (_Right._Mysize - _Roff < _Count)
; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
; 2135 : }
; 2136 :
; 2137 : int compare(const _Elem *_Ptr) const
; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
; 2139 : _DEBUG_POINTER(_Ptr);
; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
; 2141 : }
; 2142 :
; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
; 2145 : _DEBUG_POINTER(_Ptr);
; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 2147 : }
; 2148 :
; 2149 : int compare(size_type _Off,
; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2153 : if (_Count != 0)
; 2154 : _DEBUG_POINTER(_Ptr);
; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2156 :
; 2157 : if (this->_Mysize < _Off)
; 2158 : _Xran(); // _Off off end
; 2159 : if (this->_Mysize - _Off < _N0)
; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 2161 :
; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
; 2163 : _N0 < _Count ? _N0 : _Count);
; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
; 2165 : : _N0 == _Count ? 0 : +1);
; 2166 : }
; 2167 :
; 2168 : allocator_type get_allocator() const _NOEXCEPT
; 2169 : { // return allocator object for values
; 2170 : return (this->_Getal());
; 2171 : }
; 2172 :
; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
; 2174 : { // assign _Count copies of _Ch beginning at _Off
; 2175 : if (_Count == 1)
; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
; 2177 : else
; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
; 2179 : }
; 2180 :
; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
; 2182 : { // copy _Oldlen elements to newly allocated buffer
; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
; 2184 : if (max_size() < _Newres)
; 2185 : _Newres = _Newsize; // undo roundup if too big
; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
; 2187 : ;
; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
; 2189 : _Newres = this->_Myres
; 2190 : + this->_Myres / 2; // grow exponentially if possible
; 2191 : else
; 2192 : _Newres = max_size(); // settle for max_size()
; 2193 :
; 2194 : _Elem *_Ptr;
; 2195 : _TRY_BEGIN
; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2197 : _CATCH_ALL
; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
; 2199 : _TRY_BEGIN
; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2201 : _CATCH_ALL
; 2202 : _Tidy(true); // failed again, discard storage and reraise
; 2203 : _RERAISE;
; 2204 : _CATCH_END
; 2205 : _CATCH_END
; 2206 :
; 2207 : if (0 < _Oldlen)
; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
; 2209 : _Oldlen); // copy existing elements
; 2210 : _Tidy(true);
; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 2212 : this->_Myres = _Newres;
; 2213 : _Eos(_Oldlen);
; 2214 : }
; 2215 :
; 2216 : void _Eos(size_type _Newsize)
; 2217 : { // set new length and null terminator
; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
mov DWORD PTR [esi+16], 0
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push OFFSET ??_C@_0BG@PADBLCHM@iostream?5stream?5error?$AA@
mov ecx, esi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 564 : _Left = _Right;
mov BYTE PTR [esi], 0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; 615 : return (_Generic_error_category::message(_Errcode));
mov eax, esi
pop esi
; 616 : }
mov esp, ebp
pop ebp
ret 8
$LN2@message:
; 615 : return (_Generic_error_category::message(_Errcode));
push eax
push esi
call ?message@_Generic_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z ; std::_Generic_error_category::message
mov eax, esi
pop esi
; 616 : }
mov esp, ebp
pop ebp
ret 8
?message@_Iostream_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z ENDP ; std::_Iostream_error_category::message
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??_G_Iostream_error_category@std@@UAEPAXI@Z
_TEXT SEGMENT
___flags$ = 8 ; size = 4
??_G_Iostream_error_category@std@@UAEPAXI@Z PROC ; std::_Iostream_error_category::`scalar deleting destructor', COMDAT
; _this$ = ecx
push ebp
mov ebp, esp
test BYTE PTR ___flags$[ebp], 1
push esi
mov esi, ecx
; 167 : { // destroy the object
mov DWORD PTR [esi], OFFSET ??_7error_category@std@@6B@
je SHORT $LN10@scalar
push esi
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
$LN10@scalar:
mov eax, esi
pop esi
pop ebp
ret 4
??_G_Iostream_error_category@std@@UAEPAXI@Z ENDP ; std::_Iostream_error_category::`scalar deleting destructor'
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??1_Iostream_error_category@std@@UAE@XZ
_TEXT SEGMENT
??1_Iostream_error_category@std@@UAE@XZ PROC ; std::_Iostream_error_category::~_Iostream_error_category, COMDAT
; _this$ = ecx
; 167 : { // destroy the object
mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
ret 0
??1_Iostream_error_category@std@@UAE@XZ ENDP ; std::_Iostream_error_category::~_Iostream_error_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??0_System_error_category@std@@QAE@XZ
_TEXT SEGMENT
??0_System_error_category@std@@QAE@XZ PROC ; std::_System_error_category::_System_error_category, COMDAT
; _this$dead$ = ecx
; 624 : _System_error_category()
mov DWORD PTR ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A, OFFSET ??_7_System_error_category@std@@6B@ ; std::_Error_objects<int>::_System_object
; 625 : { // default constructor
; 626 : }
mov eax, OFFSET ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A ; std::_Error_objects<int>::_System_object
ret 0
??0_System_error_category@std@@QAE@XZ ENDP ; std::_System_error_category::_System_error_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?name@_System_error_category@std@@UBEPBDXZ
_TEXT SEGMENT
?name@_System_error_category@std@@UBEPBDXZ PROC ; std::_System_error_category::name, COMDAT
; _this$ = ecx
; 630 : return ("system");
mov eax, OFFSET ??_C@_06FHFOAHML@system?$AA@
; 631 : }
ret 0
?name@_System_error_category@std@@UBEPBDXZ ENDP ; std::_System_error_category::name
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
_TEXT SEGMENT
$T1 = -4 ; size = 4
___$ReturnUdt$ = 8 ; size = 4
__Errcode$ = 12 ; size = 4
?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z PROC ; std::_System_error_category::message, COMDAT
; _this$ = ecx
; 634 : { // convert to name of error
push ebp
mov ebp, esp
push ecx
push esi
; 635 : const char *_Name = _Winerror_map(_Errcode);
push DWORD PTR __Errcode$[ebp]
mov DWORD PTR $T1[ebp], 0
call DWORD PTR __imp_?_Winerror_map@std@@YAPBDH@Z
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
mov esi, DWORD PTR ___$ReturnUdt$[ebp]
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; 635 : const char *_Name = _Winerror_map(_Errcode);
add esp, 4
; 636 : return (string(_Name != 0 ? _Name : "unknown error"));
test eax, eax
mov edx, OFFSET ??_C@_0O@BFJCFAAK@unknown?5error?$AA@
cmovne edx, eax
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
mov DWORD PTR [esi+20], 15 ; 0000000fH
; 1145 : }
; 1146 :
; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
; 1148 : { // assign _Count * _Ch
; 1149 : if (_Count == npos)
; 1150 : _Xlen(); // result too long
; 1151 :
; 1152 : if (_Grow(_Count))
; 1153 : { // make room and assign new stuff
; 1154 : _Chassign(0, _Count, _Ch);
; 1155 : _Eos(_Count);
; 1156 : }
; 1157 : return (*this);
; 1158 : }
; 1159 :
; 1160 : template<class _Iter>
; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
; 1162 : _Myt&>::type
; 1163 : assign(_Iter _First, _Iter _Last)
; 1164 : { // assign [First, _Last), input iterators
; 1165 : return (replace(begin(), end(), _First, _Last));
; 1166 : }
; 1167 :
; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
; 1169 : { // assign [First, _Last), const pointers
; 1170 : return (replace(begin(), end(), _First, _Last));
; 1171 : }
; 1172 :
; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
; 1174 : { // assign [First, _Last), const_iterators
; 1175 : return (replace(begin(), end(), _First, _Last));
; 1176 : }
; 1177 :
; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
; 1179 : { // insert _Right at _Off
; 1180 : return (insert(_Off, _Right, 0, npos));
; 1181 : }
; 1182 :
; 1183 : _Myt& insert(size_type _Off,
; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1187 : _Xran(); // _Off or _Roff off end
; 1188 : size_type _Num = _Right.size() - _Roff;
; 1189 : if (_Num < _Count)
; 1190 : _Count = _Num; // trim _Count to size
; 1191 : if (npos - this->_Mysize <= _Count)
; 1192 : _Xlen(); // result too long
; 1193 :
; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1195 : { // make room and insert new stuff
; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1197 : this->_Myptr() + _Off,
; 1198 : this->_Mysize - _Off); // empty out hole
; 1199 : if (this == &_Right)
; 1200 : _Traits::move(this->_Myptr() + _Off,
; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
; 1202 : _Count); // substring
; 1203 : else
; 1204 : _Traits::copy(this->_Myptr() + _Off,
; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1206 : _Eos(_Num);
; 1207 : }
; 1208 : return (*this);
; 1209 : }
; 1210 :
; 1211 : _Myt& insert(size_type _Off,
; 1212 : const _Elem *_Ptr, size_type _Count)
; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1215 : if (_Count != 0)
; 1216 : _DEBUG_POINTER(_Ptr);
; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1218 :
; 1219 : if (_Inside(_Ptr))
; 1220 : return (insert(_Off, *this,
; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
; 1222 : if (this->_Mysize < _Off)
; 1223 : _Xran(); // _Off off end
; 1224 : if (npos - this->_Mysize <= _Count)
; 1225 : _Xlen(); // result too long
; 1226 : size_type _Num;
; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1228 : { // make room and insert new stuff
; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1230 : this->_Myptr() + _Off,
; 1231 : this->_Mysize - _Off); // empty out hole
; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1233 : _Eos(_Num);
; 1234 : }
; 1235 : return (*this);
; 1236 : }
; 1237 :
; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
; 1239 : { // insert [_Ptr, <null>) at _Off
; 1240 : _DEBUG_POINTER(_Ptr);
; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
; 1242 : }
; 1243 :
; 1244 : _Myt& insert(size_type _Off,
; 1245 : size_type _Count, _Elem _Ch)
; 1246 : { // insert _Count * _Ch at _Off
; 1247 : if (this->_Mysize < _Off)
; 1248 : _Xran(); // _Off off end
; 1249 : if (npos - this->_Mysize <= _Count)
; 1250 : _Xlen(); // result too long
; 1251 : size_type _Num;
; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1253 : { // make room and insert new stuff
; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1255 : this->_Myptr() + _Off,
; 1256 : this->_Mysize - _Off); // empty out hole
; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1258 : _Eos(_Num);
; 1259 : }
; 1260 : return (*this);
; 1261 : }
; 1262 :
; 1263 : iterator insert(const_iterator _Where)
; 1264 : { // insert <null> at _Where
; 1265 : return (insert(_Where, _Elem()));
; 1266 : }
; 1267 :
; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
; 1269 : { // insert _Ch at _Where
; 1270 : size_type _Off = _Pdif(_Where, begin());
; 1271 : insert(_Off, 1, _Ch);
; 1272 : return (begin() + _Off);
; 1273 : }
; 1274 :
; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
; 1276 : { // insert _Count * _Elem at _Where
; 1277 : size_type _Off = _Pdif(_Where, begin());
; 1278 : insert(_Off, _Count, _Ch);
; 1279 : return (begin() + _Off);
; 1280 : }
; 1281 :
; 1282 : template<class _Iter>
; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
; 1284 : iterator>::type
; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1286 : { // insert [_First, _Last) at _Where, input iterators
; 1287 : size_type _Off = _Pdif(_Where, begin());
; 1288 : replace(_Where, _Where, _First, _Last);
; 1289 : return (begin() + _Off);
; 1290 : }
; 1291 :
; 1292 : iterator insert(const_iterator _Where,
; 1293 : const_pointer _First, const_pointer _Last)
; 1294 : { // insert [_First, _Last) at _Where, const pointers
; 1295 : size_type _Off = _Pdif(_Where, begin());
; 1296 : replace(_Where, _Where, _First, _Last);
; 1297 : return (begin() + _Off);
; 1298 : }
; 1299 :
; 1300 : iterator insert(const_iterator _Where,
; 1301 : const_iterator _First, const_iterator _Last)
; 1302 : { // insert [_First, _Last) at _Where, const_iterators
; 1303 : size_type _Off = _Pdif(_Where, begin());
; 1304 : replace(_Where, _Where, _First, _Last);
; 1305 : return (begin() + _Off);
; 1306 : }
; 1307 :
; 1308 : _Myt& erase(size_type _Off = 0)
; 1309 : { // erase elements [_Off, ...)
; 1310 : if (this->_Mysize < _Off)
; 1311 : _Xran(); // _Off off end
; 1312 : _Eos(_Off);
; 1313 : return (*this);
; 1314 : }
; 1315 :
; 1316 : _Myt& erase(size_type _Off, size_type _Count)
; 1317 : { // erase elements [_Off, _Off + _Count)
; 1318 : if (this->_Mysize < _Off)
; 1319 : _Xran(); // _Off off end
; 1320 : if (this->_Mysize - _Off <= _Count)
; 1321 : _Eos(_Off); // erase elements [_Off, ...)
; 1322 : else if (0 < _Count)
; 1323 : { // move elements down
; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
; 1325 : size_type _Newsize = this->_Mysize - _Count;
; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
; 1327 : _Eos(_Newsize);
; 1328 : }
; 1329 : return (*this);
; 1330 : }
; 1331 :
; 1332 : iterator erase(const_iterator _Where)
; 1333 : { // erase element at _Where
; 1334 : size_type _Count = _Pdif(_Where, begin());
; 1335 : erase(_Count, 1);
; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1337 : }
; 1338 :
; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
; 1340 : { // erase substring [_First, _Last)
; 1341 : _DEBUG_RANGE(_First, _Last);
; 1342 : size_type _Count = _Pdif(_First, begin());
; 1343 : erase(_Count, _Pdif(_Last, _First));
; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1345 : }
; 1346 :
; 1347 : void clear() _NOEXCEPT
; 1348 : { // erase all
; 1349 : _Eos(0);
; 1350 : }
; 1351 :
; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
; 1353 : { // replace [_Off, _Off + _N0) with _Right
; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
; 1355 : }
; 1356 :
; 1357 : _Myt& replace(size_type _Off,
; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1361 : _Xran(); // _Off or _Roff off end
; 1362 : if (this->_Mysize - _Off < _N0)
; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1364 : size_type _Num = _Right.size() - _Roff;
; 1365 : if (_Num < _Count)
; 1366 : _Count = _Num; // trim _Count to size
; 1367 : if (npos - _Count <= this->_Mysize - _N0)
; 1368 : _Xlen(); // result too long
; 1369 :
; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
; 1372 : if (this->_Mysize < _Newsize)
; 1373 : _Grow(_Newsize);
; 1374 :
; 1375 : if (this != &_Right)
; 1376 : { // no overlap, just move down and copy in new stuff
; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
; 1379 : _Traits::copy(this->_Myptr() + _Off,
; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1381 : }
; 1382 : else if (_Count <= _N0)
; 1383 : { // hole doesn't get larger, just copy in substring
; 1384 : _Traits::move(this->_Myptr() + _Off,
; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1388 : }
; 1389 : else if (_Roff <= _Off)
; 1390 : { // hole gets larger, substring begins before hole
; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1393 : _Traits::move(this->_Myptr() + _Off,
; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
; 1395 : }
; 1396 : else if (_Off + _N0 <= _Roff)
; 1397 : { // hole gets larger, substring begins after hole
; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1400 : _Traits::move(this->_Myptr() + _Off,
; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
; 1402 : _Count); // fill hole
; 1403 : }
; 1404 : else
; 1405 : { // hole gets larger, substring begins in hole
; 1406 : _Traits::move(this->_Myptr() + _Off,
; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
; 1411 : this->_Myptr() + _Roff + _Count,
; 1412 : _Count - _N0); // fill rest of new hole
; 1413 : }
; 1414 :
; 1415 : _Eos(_Newsize);
; 1416 : return (*this);
; 1417 : }
; 1418 :
; 1419 : _Myt& replace(size_type _Off,
; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1423 : if (_Count != 0)
; 1424 : _DEBUG_POINTER(_Ptr);
; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1426 :
; 1427 : if (_Inside(_Ptr))
; 1428 : return (replace(_Off, _N0, *this,
; 1429 : _Ptr - this->_Myptr(),
; 1430 : _Count)); // substring, replace carefully
; 1431 : if (this->_Mysize < _Off)
; 1432 : _Xran(); // _Off off end
; 1433 : if (this->_Mysize - _Off < _N0)
; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1435 : if (npos - _Count <= this->_Mysize - _N0)
; 1436 : _Xlen(); // result too long
; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1438 :
; 1439 : if (_Count < _N0)
; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1441 : this->_Myptr() + _Off + _N0,
; 1442 : _Nm); // smaller hole, move tail up
; 1443 : size_type _Num;
; 1444 : if ((0 < _Count || 0 < _N0)
; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1446 : { // make room and rearrange
; 1447 : if (_N0 < _Count)
; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1451 : _Eos(_Num);
; 1452 : }
; 1453 : return (*this);
; 1454 : }
; 1455 :
; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
; 1458 : _DEBUG_POINTER(_Ptr);
; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 1460 : }
; 1461 :
; 1462 : _Myt& replace(size_type _Off,
; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
; 1465 : if (this->_Mysize < _Off)
; 1466 : _Xran(); // _Off off end
; 1467 : if (this->_Mysize - _Off < _N0)
; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1469 : if (npos - _Count <= this->_Mysize - _N0)
; 1470 : _Xlen(); // result too long
; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1472 :
; 1473 : if (_Count < _N0)
; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1475 : this->_Myptr() + _Off + _N0,
; 1476 : _Nm); // smaller hole, move tail up
; 1477 : size_type _Num;
; 1478 : if ((0 < _Count || 0 < _N0)
; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1480 : { // make room and rearrange
; 1481 : if (_N0 < _Count)
; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1485 : _Eos(_Num);
; 1486 : }
; 1487 : return (*this);
; 1488 : }
; 1489 :
; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1491 : const _Myt& _Right)
; 1492 : { // replace [_First, _Last) with _Right
; 1493 : return (replace(
; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
; 1495 : }
; 1496 :
; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1498 : const _Elem *_Ptr, size_type _Count)
; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
; 1500 : return (replace(
; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
; 1502 : }
; 1503 :
; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1505 : const _Elem *_Ptr)
; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
; 1507 : return (replace(
; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
; 1509 : }
; 1510 :
; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1512 : size_type _Count, _Elem _Ch)
; 1513 : { // replace [_First, _Last) with _Count * _Ch
; 1514 : return (replace(
; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
; 1516 : }
; 1517 :
; 1518 : template<class _Iter>
; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
; 1520 : _Myt&>::type
; 1521 : replace(const_iterator _First, const_iterator _Last,
; 1522 : _Iter _First2, _Iter _Last2)
; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
; 1524 : _Myt _Right(_First2, _Last2);
; 1525 : replace(_First, _Last, _Right);
; 1526 : return (*this);
; 1527 : }
; 1528 :
; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1530 : const_pointer _First2, const_pointer _Last2)
; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1532 : if (_First2 == _Last2)
; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1534 : else
; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1536 : &*_First2, _Last2 - _First2);
; 1537 : return (*this);
; 1538 : }
; 1539 :
; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1541 : pointer _First2, pointer _Last2)
; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1543 : if (_First2 == _Last2)
; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1545 : else
; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1547 : &*_First2, _Last2 - _First2);
; 1548 : return (*this);
; 1549 : }
; 1550 :
; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1552 : const_iterator _First2, const_iterator _Last2)
; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1554 : if (_First2 == _Last2)
; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1556 : else
; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1558 : &*_First2, _Last2 - _First2);
; 1559 : return (*this);
; 1560 : }
; 1561 :
; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1563 : iterator _First2, iterator _Last2)
; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1565 : if (_First2 == _Last2)
; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1567 : else
; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1569 : &*_First2, _Last2 - _First2);
; 1570 : return (*this);
; 1571 : }
; 1572 :
; 1573 : iterator begin() _NOEXCEPT
; 1574 : { // return iterator for beginning of mutable sequence
; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
; 1576 : }
; 1577 :
; 1578 : const_iterator begin() const _NOEXCEPT
; 1579 : { // return iterator for beginning of nonmutable sequence
; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
; 1581 : }
; 1582 :
; 1583 : iterator end() _NOEXCEPT
; 1584 : { // return iterator for end of mutable sequence
; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
; 1586 : }
; 1587 :
; 1588 : const_iterator end() const _NOEXCEPT
; 1589 : { // return iterator for end of nonmutable sequence
; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
; 1591 : }
; 1592 :
; 1593 : reverse_iterator rbegin() _NOEXCEPT
; 1594 : { // return iterator for beginning of reversed mutable sequence
; 1595 : return (reverse_iterator(end()));
; 1596 : }
; 1597 :
; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
; 1599 : { // return iterator for beginning of reversed nonmutable sequence
; 1600 : return (const_reverse_iterator(end()));
; 1601 : }
; 1602 :
; 1603 : reverse_iterator rend() _NOEXCEPT
; 1604 : { // return iterator for end of reversed mutable sequence
; 1605 : return (reverse_iterator(begin()));
; 1606 : }
; 1607 :
; 1608 : const_reverse_iterator rend() const _NOEXCEPT
; 1609 : { // return iterator for end of reversed nonmutable sequence
; 1610 : return (const_reverse_iterator(begin()));
; 1611 : }
; 1612 :
; 1613 : #if _HAS_CPP0X
; 1614 : const_iterator cbegin() const _NOEXCEPT
; 1615 : { // return iterator for beginning of nonmutable sequence
; 1616 : return (((const _Myt *)this)->begin());
; 1617 : }
; 1618 :
; 1619 : const_iterator cend() const _NOEXCEPT
; 1620 : { // return iterator for end of nonmutable sequence
; 1621 : return (((const _Myt *)this)->end());
; 1622 : }
; 1623 :
; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
; 1625 : { // return iterator for beginning of reversed nonmutable sequence
; 1626 : return (((const _Myt *)this)->rbegin());
; 1627 : }
; 1628 :
; 1629 : const_reverse_iterator crend() const _NOEXCEPT
; 1630 : { // return iterator for end of reversed nonmutable sequence
; 1631 : return (((const _Myt *)this)->rend());
; 1632 : }
; 1633 :
; 1634 : void shrink_to_fit()
; 1635 : { // reduce capacity
; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
; 1637 : { // worth shrinking, do it
; 1638 : _Myt _Tmp(*this);
; 1639 : swap(_Tmp);
; 1640 : }
; 1641 : }
; 1642 : #endif /* _HAS_CPP0X */
; 1643 :
; 1644 : reference at(size_type _Off)
; 1645 : { // subscript mutable sequence with checking
; 1646 : if (this->_Mysize <= _Off)
; 1647 : _Xran(); // _Off off end
; 1648 : return (this->_Myptr()[_Off]);
; 1649 : }
; 1650 :
; 1651 : const_reference at(size_type _Off) const
; 1652 : { // subscript nonmutable sequence with checking
; 1653 : if (this->_Mysize <= _Off)
; 1654 : _Xran(); // _Off off end
; 1655 : return (this->_Myptr()[_Off]);
; 1656 : }
; 1657 :
; 1658 : reference operator[](size_type _Off)
; 1659 : { // subscript mutable sequence
; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1661 : if (this->_Mysize < _Off) // sic
; 1662 : _DEBUG_ERROR("string subscript out of range");
; 1663 :
; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1667 :
; 1668 : return (this->_Myptr()[_Off]);
; 1669 : }
; 1670 :
; 1671 : const_reference operator[](size_type _Off) const
; 1672 : { // subscript nonmutable sequence
; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1674 : if (this->_Mysize < _Off) // sic
; 1675 : _DEBUG_ERROR("string subscript out of range");
; 1676 :
; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1680 :
; 1681 : return (this->_Myptr()[_Off]);
; 1682 : }
; 1683 :
; 1684 : void push_back(_Elem _Ch)
; 1685 : { // insert element at end
; 1686 : insert(end(), _Ch);
; 1687 : }
; 1688 :
; 1689 : #if _HAS_CPP0X
; 1690 : void pop_back()
; 1691 : { // erase element at end
; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
; 1693 : }
; 1694 :
; 1695 : reference front()
; 1696 : { // return first element of mutable sequence
; 1697 : return (*begin());
; 1698 : }
; 1699 :
; 1700 : const_reference front() const
; 1701 : { // return first element of nonmutable sequence
; 1702 : return (*begin());
; 1703 : }
; 1704 :
; 1705 : reference back()
; 1706 : { // return last element of mutable sequence
; 1707 : return (*(end() - 1));
; 1708 : }
; 1709 :
; 1710 : const_reference back() const
; 1711 : { // return last element of nonmutable sequence
; 1712 : return (*(end() - 1));
; 1713 : }
; 1714 : #endif /* _HAS_CPP0X */
; 1715 :
; 1716 : const _Elem *c_str() const _NOEXCEPT
; 1717 : { // return pointer to null-terminated nonmutable array
; 1718 : return (this->_Myptr());
; 1719 : }
; 1720 :
; 1721 : const _Elem *data() const _NOEXCEPT
; 1722 : { // return pointer to nonmutable array
; 1723 : return (c_str());
; 1724 : }
; 1725 :
; 1726 : size_type length() const _NOEXCEPT
; 1727 : { // return length of sequence
; 1728 : return (this->_Mysize);
; 1729 : }
; 1730 :
; 1731 : size_type size() const _NOEXCEPT
; 1732 : { // return length of sequence
; 1733 : return (this->_Mysize);
; 1734 : }
; 1735 :
; 1736 : size_type max_size() const _NOEXCEPT
; 1737 : { // return maximum possible length of sequence
; 1738 : size_type _Num = this->_Getal().max_size();
; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
; 1740 : }
; 1741 :
; 1742 : void resize(size_type _Newsize)
; 1743 : { // determine new length, padding with null elements as needed
; 1744 : resize(_Newsize, _Elem());
; 1745 : }
; 1746 :
; 1747 : void resize(size_type _Newsize, _Elem _Ch)
; 1748 : { // determine new length, padding with _Ch elements as needed
; 1749 : if (_Newsize <= this->_Mysize)
; 1750 : _Eos(_Newsize);
; 1751 : else
; 1752 : append(_Newsize - this->_Mysize, _Ch);
; 1753 : }
; 1754 :
; 1755 : size_type capacity() const _NOEXCEPT
; 1756 : { // return current length of allocated storage
; 1757 : return (this->_Myres);
; 1758 : }
; 1759 :
; 1760 : void reserve(size_type _Newcap = 0)
; 1761 : { // determine new minimum length of allocated storage
; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
; 1763 : { // change reservation
; 1764 : size_type _Size = this->_Mysize;
; 1765 : if (_Grow(_Newcap, true))
; 1766 : _Eos(_Size);
; 1767 : }
; 1768 : }
; 1769 :
; 1770 : bool empty() const _NOEXCEPT
; 1771 : { // test if sequence is empty
; 1772 : return (this->_Mysize == 0);
; 1773 : }
; 1774 :
; 1775 : _SCL_INSECURE_DEPRECATE
; 1776 :
; 1777 : size_type copy(_Elem *_Ptr,
; 1778 : size_type _Count, size_type _Off = 0) const
; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1781 : if (_Count != 0)
; 1782 : _DEBUG_POINTER(_Ptr);
; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1784 :
; 1785 : if (this->_Mysize < _Off)
; 1786 : _Xran(); // _Off off end
; 1787 : if (this->_Mysize - _Off < _Count)
; 1788 : _Count = this->_Mysize - _Off;
; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
; 1790 : return (_Count);
; 1791 : }
; 1792 :
; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
; 1794 : size_type _Count, size_type _Off = 0) const
; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1797 : if (_Count != 0)
; 1798 : _DEBUG_POINTER(_Dest);
; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1800 :
; 1801 : if (this->_Mysize < _Off)
; 1802 : _Xran(); // _Off off end
; 1803 : if (this->_Mysize - _Off < _Count)
; 1804 : _Count = this->_Mysize - _Off;
; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
; 1806 : return (_Count);
; 1807 : }
; 1808 :
; 1809 : void _Swap_bx(_Myt& _Right)
; 1810 : { // exchange _Bx with _Right._Bx
; 1811 : if (this->_BUF_SIZE <= this->_Myres)
; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
; 1814 : else
; 1815 : { // swap large with small
; 1816 : pointer _Ptr = this->_Bx._Ptr;
; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
; 1818 : _Traits::copy(this->_Bx._Buf,
; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
; 1821 : }
; 1822 : else
; 1823 : if (_Right._Myres < this->_BUF_SIZE)
; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
; 1825 : else
; 1826 : { // swap small with large
; 1827 : pointer _Ptr = _Right._Bx._Ptr;
; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
; 1829 : _Traits::copy(_Right._Bx._Buf,
; 1830 : this->_Bx._Buf, this->_Mysize + 1);
; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 1832 : }
; 1833 : }
; 1834 :
; 1835 : void swap(_Myt& _Right)
; 1836 : { // exchange contents with _Right
; 1837 : if (this == &_Right)
; 1838 : ; // same object, do nothing
; 1839 : else if (this->_Getal() == _Right._Getal())
; 1840 : { // same allocator, swap control information
; 1841 : this->_Swap_all(_Right);
; 1842 : _Swap_bx(_Right);
; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
; 1844 : _STD swap(this->_Myres, _Right._Myres);
; 1845 : }
; 1846 :
; 1847 : #if _HAS_CPP0X
; 1848 : else if (_Alty::propagate_on_container_swap::value)
; 1849 : { // swap allocators and control information
; 1850 : this->_Swap_alloc(_Right);
; 1851 : _Swap_bx(_Right);
; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
; 1854 : _STD swap(this->_Myres, _Right._Myres);
; 1855 : }
; 1856 : #endif /* _HAS_CPP0X */
; 1857 :
; 1858 : else
; 1859 : { // different allocator, do multiple assigns
; 1860 : _Myt _Tmp = *this;
; 1861 :
; 1862 : *this = _Right;
; 1863 : _Right = _Tmp;
; 1864 : }
; 1865 : }
; 1866 :
; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
; 1868 : { // look for _Right beginning at or after _Off
; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
; 1870 : }
; 1871 :
; 1872 : size_type find(const _Elem *_Ptr,
; 1873 : size_type _Off, size_type _Count) const
; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1876 : if (_Count != 0)
; 1877 : _DEBUG_POINTER(_Ptr);
; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1879 :
; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
; 1881 : return (_Off); // null string always matches (if inside string)
; 1882 :
; 1883 : size_type _Nm;
; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
; 1885 : { // room for match, look for it
; 1886 : const _Elem *_Uptr, *_Vptr;
; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1891 : return (_Uptr - this->_Myptr()); // found a match
; 1892 : }
; 1893 :
; 1894 : return (npos); // no match
; 1895 : }
; 1896 :
; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
; 1899 : _DEBUG_POINTER(_Ptr);
; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
; 1901 : }
; 1902 :
; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
; 1904 : { // look for _Ch at or after _Off
; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1906 : }
; 1907 :
; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
; 1909 : { // look for _Right beginning before _Off
; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
; 1911 : }
; 1912 :
; 1913 : size_type rfind(const _Elem *_Ptr,
; 1914 : size_type _Off, size_type _Count) const
; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1917 : if (_Count != 0)
; 1918 : _DEBUG_POINTER(_Ptr);
; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1920 :
; 1921 : if (_Count == 0)
; 1922 : return (_Off < this->_Mysize ? _Off
; 1923 : : this->_Mysize); // null always matches
; 1924 : if (_Count <= this->_Mysize)
; 1925 : { // room for match, look for it
; 1926 : const _Elem *_Uptr = this->_Myptr() +
; 1927 : (_Off < this->_Mysize - _Count ? _Off
; 1928 : : this->_Mysize - _Count);
; 1929 : for (; ; --_Uptr)
; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1932 : return (_Uptr - this->_Myptr()); // found a match
; 1933 : else if (_Uptr == this->_Myptr())
; 1934 : break; // at beginning, no more chance for match
; 1935 : }
; 1936 :
; 1937 : return (npos); // no match
; 1938 : }
; 1939 :
; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
; 1941 : { // look for [_Ptr, <null>) beginning before _Off
; 1942 : _DEBUG_POINTER(_Ptr);
; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
; 1944 : }
; 1945 :
; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
; 1947 : { // look for _Ch before _Off
; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 1949 : }
; 1950 :
; 1951 : size_type find_first_of(const _Myt& _Right,
; 1952 : size_type _Off = 0) const _NOEXCEPT
; 1953 : { // look for one of _Right at or after _Off
; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
; 1955 : }
; 1956 :
; 1957 : size_type find_first_of(const _Elem *_Ptr,
; 1958 : size_type _Off, size_type _Count) const
; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1961 : if (_Count != 0)
; 1962 : _DEBUG_POINTER(_Ptr);
; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1964 :
; 1965 : if (0 < _Count && _Off < this->_Mysize)
; 1966 : { // room for match, look for it
; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 1969 : _Uptr < _Vptr; ++_Uptr)
; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 1971 : return (_Uptr - this->_Myptr()); // found a match
; 1972 : }
; 1973 :
; 1974 : return (npos); // no match
; 1975 : }
; 1976 :
; 1977 : size_type find_first_of(const _Elem *_Ptr,
; 1978 : size_type _Off = 0) const
; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
; 1980 : _DEBUG_POINTER(_Ptr);
; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 1982 : }
; 1983 :
; 1984 : size_type find_first_of(_Elem _Ch,
; 1985 : size_type _Off = 0) const
; 1986 : { // look for _Ch at or after _Off
; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1988 : }
; 1989 :
; 1990 : size_type find_last_of(const _Myt& _Right,
; 1991 : size_type _Off = npos) const _NOEXCEPT
; 1992 : { // look for one of _Right before _Off
; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
; 1994 : }
; 1995 :
; 1996 : size_type find_last_of(const _Elem *_Ptr,
; 1997 : size_type _Off, size_type _Count) const
; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2000 : if (_Count != 0)
; 2001 : _DEBUG_POINTER(_Ptr);
; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2003 :
; 2004 : if (0 < _Count && 0 < this->_Mysize)
; 2005 : { // worth searching, do it
; 2006 : const _Elem *_Uptr = this->_Myptr()
; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2008 : for (; ; --_Uptr)
; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 2010 : return (_Uptr - this->_Myptr()); // found a match
; 2011 : else if (_Uptr == this->_Myptr())
; 2012 : break; // at beginning, no more chance for match
; 2013 : }
; 2014 :
; 2015 : return (npos); // no match
; 2016 : }
; 2017 :
; 2018 : size_type find_last_of(const _Elem *_Ptr,
; 2019 : size_type _Off = npos) const
; 2020 : { // look for one of [_Ptr, <null>) before _Off
; 2021 : _DEBUG_POINTER(_Ptr);
; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2023 : }
; 2024 :
; 2025 : size_type find_last_of(_Elem _Ch,
; 2026 : size_type _Off = npos) const
; 2027 : { // look for _Ch before _Off
; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 2029 : }
; 2030 :
; 2031 : size_type find_first_not_of(const _Myt& _Right,
; 2032 : size_type _Off = 0) const _NOEXCEPT
; 2033 : { // look for none of _Right at or after _Off
; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
; 2035 : _Right.size()));
; 2036 : }
; 2037 :
; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
; 2039 : size_type _Off, size_type _Count) const
; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2042 : if (_Count != 0)
; 2043 : _DEBUG_POINTER(_Ptr);
; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2045 :
; 2046 : if (_Off < this->_Mysize)
; 2047 : { // room for match, look for it
; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 2050 : _Uptr < _Vptr; ++_Uptr)
; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2052 : return (_Uptr - this->_Myptr());
; 2053 : }
; 2054 : return (npos);
; 2055 : }
; 2056 :
; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
; 2058 : size_type _Off = 0) const
; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
; 2060 : _DEBUG_POINTER(_Ptr);
; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2062 : }
; 2063 :
; 2064 : size_type find_first_not_of(_Elem _Ch,
; 2065 : size_type _Off = 0) const
; 2066 : { // look for non _Ch at or after _Off
; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
; 2068 : }
; 2069 :
; 2070 : size_type find_last_not_of(const _Myt& _Right,
; 2071 : size_type _Off = npos) const _NOEXCEPT
; 2072 : { // look for none of _Right before _Off
; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
; 2074 : }
; 2075 :
; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
; 2077 : size_type _Off, size_type _Count) const
; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2080 : if (_Count != 0)
; 2081 : _DEBUG_POINTER(_Ptr);
; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2083 :
; 2084 : if (0 < this->_Mysize)
; 2085 : { // worth searching, do it
; 2086 : const _Elem *_Uptr = this->_Myptr()
; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2088 : for (; ; --_Uptr)
; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2090 : return (_Uptr - this->_Myptr());
; 2091 : else if (_Uptr == this->_Myptr())
; 2092 : break;
; 2093 : }
; 2094 : return (npos);
; 2095 : }
; 2096 :
; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
; 2098 : size_type _Off = npos) const
; 2099 : { // look for none of [_Ptr, <null>) before _Off
; 2100 : _DEBUG_POINTER(_Ptr);
; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2102 : }
; 2103 :
; 2104 : size_type find_last_not_of(_Elem _Ch,
; 2105 : size_type _Off = npos) const
; 2106 : { // look for non _Ch before _Off
; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
; 2108 : }
; 2109 :
; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
; 2111 : { // return [_Off, _Off + _Count) as new string
; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
; 2113 : }
; 2114 :
; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
; 2116 : { // compare [0, _Mysize) with _Right
; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
; 2118 : }
; 2119 :
; 2120 : int compare(size_type _Off, size_type _N0,
; 2121 : const _Myt& _Right) const
; 2122 : { // compare [_Off, _Off + _N0) with _Right
; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
; 2124 : }
; 2125 :
; 2126 : int compare(size_type _Off,
; 2127 : size_type _N0, const _Myt& _Right,
; 2128 : size_type _Roff, size_type _Count) const
; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 2130 : if (_Right.size() < _Roff)
; 2131 : _Xran(); // _Off off end
; 2132 : if (_Right._Mysize - _Roff < _Count)
; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
; 2135 : }
; 2136 :
; 2137 : int compare(const _Elem *_Ptr) const
; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
; 2139 : _DEBUG_POINTER(_Ptr);
; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
; 2141 : }
; 2142 :
; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
; 2145 : _DEBUG_POINTER(_Ptr);
; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 2147 : }
; 2148 :
; 2149 : int compare(size_type _Off,
; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2153 : if (_Count != 0)
; 2154 : _DEBUG_POINTER(_Ptr);
; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2156 :
; 2157 : if (this->_Mysize < _Off)
; 2158 : _Xran(); // _Off off end
; 2159 : if (this->_Mysize - _Off < _N0)
; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 2161 :
; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
; 2163 : _N0 < _Count ? _N0 : _Count);
; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
; 2165 : : _N0 == _Count ? 0 : +1);
; 2166 : }
; 2167 :
; 2168 : allocator_type get_allocator() const _NOEXCEPT
; 2169 : { // return allocator object for values
; 2170 : return (this->_Getal());
; 2171 : }
; 2172 :
; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
; 2174 : { // assign _Count copies of _Ch beginning at _Off
; 2175 : if (_Count == 1)
; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
; 2177 : else
; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
; 2179 : }
; 2180 :
; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
; 2182 : { // copy _Oldlen elements to newly allocated buffer
; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
; 2184 : if (max_size() < _Newres)
; 2185 : _Newres = _Newsize; // undo roundup if too big
; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
; 2187 : ;
; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
; 2189 : _Newres = this->_Myres
; 2190 : + this->_Myres / 2; // grow exponentially if possible
; 2191 : else
; 2192 : _Newres = max_size(); // settle for max_size()
; 2193 :
; 2194 : _Elem *_Ptr;
; 2195 : _TRY_BEGIN
; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2197 : _CATCH_ALL
; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
; 2199 : _TRY_BEGIN
; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2201 : _CATCH_ALL
; 2202 : _Tidy(true); // failed again, discard storage and reraise
; 2203 : _RERAISE;
; 2204 : _CATCH_END
; 2205 : _CATCH_END
; 2206 :
; 2207 : if (0 < _Oldlen)
; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
; 2209 : _Oldlen); // copy existing elements
; 2210 : _Tidy(true);
; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 2212 : this->_Myres = _Newres;
; 2213 : _Eos(_Oldlen);
; 2214 : }
; 2215 :
; 2216 : void _Eos(size_type _Newsize)
; 2217 : { // set new length and null terminator
; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
mov DWORD PTR [esi+16], 0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 564 : _Left = _Right;
mov BYTE PTR [esi], 0
; 523 : : _CSTD strlen(_First));
cmp BYTE PTR [edx], 0
jne SHORT $LN47@message
xor ecx, ecx
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push ecx
push edx
mov ecx, esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; 636 : return (string(_Name != 0 ? _Name : "unknown error"));
mov eax, esi
pop esi
; 637 : }
mov esp, ebp
pop ebp
ret 8
$LN47@message:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 523 : : _CSTD strlen(_First));
mov ecx, edx
push edi
lea edi, DWORD PTR [ecx+1]
$LL49@message:
mov al, BYTE PTR [ecx]
inc ecx
test al, al
jne SHORT $LL49@message
sub ecx, edi
pop edi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push ecx
push edx
mov ecx, esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; 636 : return (string(_Name != 0 ? _Name : "unknown error"));
mov eax, esi
pop esi
; 637 : }
mov esp, ebp
pop ebp
ret 8
?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z ENDP ; std::_System_error_category::message
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z
_TEXT SEGMENT
___$ReturnUdt$ = 8 ; size = 4
__Errval$ = 12 ; size = 4
?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z PROC ; std::_System_error_category::default_error_condition, COMDAT
; _this$ = ecx
; 641 : { // make error_condition for error code (generic if possible)
push ebp
mov ebp, esp
push esi
; 642 : if (_Syserror_map(_Errval))
mov esi, DWORD PTR __Errval$[ebp]
push esi
call DWORD PTR __imp_?_Syserror_map@std@@YAPBDH@Z
add esp, 4
test eax, eax
; 316 : { // construct from error code and category
mov eax, DWORD PTR ___$ReturnUdt$[ebp]
mov DWORD PTR [eax], esi
; 642 : if (_Syserror_map(_Errval))
je SHORT $LN2@default_er
; 316 : { // construct from error code and category
mov DWORD PTR [eax+4], OFFSET ?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A ; std::_Error_objects<int>::_Generic_object
pop esi
; 643 : return (error_condition(_Errval, generic_category()));
; 644 : else
; 645 : return (error_condition(_Errval, system_category()));
; 646 : }
pop ebp
ret 8
$LN2@default_er:
; 316 : { // construct from error code and category
mov DWORD PTR [eax+4], OFFSET ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A ; std::_Error_objects<int>::_System_object
pop esi
; 643 : return (error_condition(_Errval, generic_category()));
; 644 : else
; 645 : return (error_condition(_Errval, system_category()));
; 646 : }
pop ebp
ret 8
?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z ENDP ; std::_System_error_category::default_error_condition
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??_G_System_error_category@std@@UAEPAXI@Z
_TEXT SEGMENT
___flags$ = 8 ; size = 4
??_G_System_error_category@std@@UAEPAXI@Z PROC ; std::_System_error_category::`scalar deleting destructor', COMDAT
; _this$ = ecx
push ebp
mov ebp, esp
test BYTE PTR ___flags$[ebp], 1
push esi
mov esi, ecx
; 167 : { // destroy the object
mov DWORD PTR [esi], OFFSET ??_7error_category@std@@6B@
je SHORT $LN10@scalar
push esi
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
$LN10@scalar:
mov eax, esi
pop esi
pop ebp
ret 4
??_G_System_error_category@std@@UAEPAXI@Z ENDP ; std::_System_error_category::`scalar deleting destructor'
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ??1_System_error_category@std@@UAE@XZ
_TEXT SEGMENT
??1_System_error_category@std@@UAE@XZ PROC ; std::_System_error_category::~_System_error_category, COMDAT
; _this$ = ecx
; 167 : { // destroy the object
mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
ret 0
??1_System_error_category@std@@UAE@XZ ENDP ; std::_System_error_category::~_System_error_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?generic_category@std@@YAABVerror_category@1@XZ
_TEXT SEGMENT
?generic_category@std@@YAABVerror_category@1@XZ PROC ; std::generic_category, COMDAT
; 670 : return (_Error_objects<int>::_Generic_object);
mov eax, OFFSET ?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A ; std::_Error_objects<int>::_Generic_object
; 671 : }
ret 0
?generic_category@std@@YAABVerror_category@1@XZ ENDP ; std::generic_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
; COMDAT ?system_category@std@@YAABVerror_category@1@XZ
_TEXT SEGMENT
?system_category@std@@YAABVerror_category@1@XZ PROC ; std::system_category, COMDAT
; 680 : return (_Error_objects<int>::_System_object);
mov eax, OFFSET ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A ; std::_Error_objects<int>::_System_object
; 681 : }
ret 0
?system_category@std@@YAABVerror_category@1@XZ ENDP ; std::system_category
_TEXT ENDS
; Function compile flags: /Ogtp
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File e:\программирование\any\any\any.cpp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; File e:\программирование\any\any\any.cpp
; COMDAT _main
_TEXT SEGMENT
_vec1$ = -64 ; size = 12
_vec2$ = -52 ; size = 12
_res1$ = -40 ; size = 12
_res2$ = -28 ; size = 12
__$EHRec$ = -12 ; size = 12
_main PROC ; COMDAT
; 149 : int main(){
push ebp
mov ebp, esp
and esp, -8 ; fffffff8H
push -1
push __ehhandler$_main
mov eax, DWORD PTR fs:0
push eax
sub esp, 56 ; 00000038H
push ebx
push esi
push edi
mov eax, DWORD PTR ___security_cookie
xor eax, esp
push eax
lea eax, DWORD PTR __$EHRec$[esp+84]
mov DWORD PTR fs:0, eax
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 486 : _Myfirst = pointer();
mov DWORD PTR _res1$[esp+84], 0
; 487 : _Mylast = pointer();
mov DWORD PTR _res1$[esp+88], 0
; 488 : _Myend = pointer();
mov DWORD PTR _res1$[esp+92], 0
; File e:\программирование\any\any\any.cpp
; 150 : vector<int>res1,res2;
mov DWORD PTR __$EHRec$[esp+92], 0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 486 : _Myfirst = pointer();
mov DWORD PTR _res2$[esp+84], 0
; 487 : _Mylast = pointer();
mov DWORD PTR _res2$[esp+88], 0
; 488 : _Myend = pointer();
mov DWORD PTR _res2$[esp+92], 0
; File e:\программирование\any\any\any.cpp
; 150 : vector<int>res1,res2;
mov BYTE PTR __$EHRec$[esp+92], 1
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 696 : resize(_Count);
push 1000 ; 000003e8H
lea ecx, DWORD PTR _vec1$[esp+88]
; 486 : _Myfirst = pointer();
mov DWORD PTR _vec1$[esp+88], 0
; 487 : _Mylast = pointer();
mov DWORD PTR _vec1$[esp+92], 0
; 488 : _Myend = pointer();
mov DWORD PTR _vec1$[esp+96], 0
; 696 : resize(_Count);
call ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ; std::vector<double,std::allocator<double> >::resize
; File e:\программирование\any\any\any.cpp
; 151 : vector<double>vec1(dim),vec2(N1);
mov BYTE PTR __$EHRec$[esp+92], 2
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 696 : resize(_Count);
push 1000 ; 000003e8H
lea ecx, DWORD PTR _vec2$[esp+88]
; 486 : _Myfirst = pointer();
mov DWORD PTR _vec2$[esp+88], 0
; 487 : _Mylast = pointer();
mov DWORD PTR _vec2$[esp+92], 0
; 488 : _Myend = pointer();
mov DWORD PTR _vec2$[esp+96], 0
; 696 : resize(_Count);
call ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ; std::vector<double,std::allocator<double> >::resize
; File e:\программирование\any\any\any.cpp
; 151 : vector<double>vec1(dim),vec2(N1);
mov BYTE PTR __$EHRec$[esp+92], 3
movsd xmm0, QWORD PTR __real@3ff0000000000000
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 486 : _Myfirst = pointer();
xor ecx, ecx
npad 7
$LL105@main:
; File e:\программирование\any\any\any.cpp
; 155 : vec1[k]=1;
mov eax, DWORD PTR _vec1$[esp+84]
add ecx, 8
movsd QWORD PTR [ecx+eax-8], xmm0
cmp ecx, 8000 ; 00001f40H
jl SHORT $LL105@main
; 156 : }
; 157 :
; 158 : t = clock();
mov edi, DWORD PTR __imp__clock
call edi
; 159 :
; 160 : #pragma omp parallel shared(vec1) num_threads(4)
push 4
mov esi, eax
call __vcomp_set_num_threads
lea eax, DWORD PTR _vec1$[esp+88]
push eax
push OFFSET _main$omp$1
push 1
push 1
call __vcomp_fork
add esp, 20 ; 00000014H
; 161 : {
; 162 : double temp = 0;
; 163 : int i,j,k;
; 164 : #pragma omp for private(i)
; 165 : for( i = 0; i<N1; i++){
; 166 : for(j = 0; j<N2; j++){
; 167 : for( k = 0; k<dim; k++){
; 168 : temp+= j;
; 169 : }
; 170 : }
; 171 : vec1[i]+=temp;
; 172 : temp = 0;
; 173 : }
; 174 : }
; 175 : tt = clock();
call edi
; 176 : cout<<tt-t<<endl;
push DWORD PTR __imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z
mov ecx, DWORD PTR __imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A
sub eax, esi
push eax
call DWORD PTR __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z
mov ecx, eax
call DWORD PTR __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z
movsd xmm0, QWORD PTR __real@3ff0000000000000
xor ecx, ecx
npad 11
$LL107@main:
; 177 : for(int k = 0; k<dim; k++){
; 178 : vec1[k]=1;
mov eax, DWORD PTR _vec1$[esp+84]
add ecx, 8
movsd QWORD PTR [ecx+eax-8], xmm0
cmp ecx, 8000 ; 00001f40H
jl SHORT $LL107@main
; 179 : }
; 180 : t = clock();
call edi
mov ebx, eax
xor ecx, ecx
npad 5
$LL9@main:
; 182 : for(int h = 0; h<N2; h++){
xor edx, edx
$LL6@main:
movd xmm1, edx
cvtdq2pd xmm1, xmm1
; 183 : for(int y = 0; y<dim; y++){
mov esi, 100 ; 00000064H
npad 1
$LL3@main:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1148 : return (*(this->_Myfirst + _Pos));
mov eax, DWORD PTR _vec1$[esp+84]
; File e:\программирование\any\any\any.cpp
; 184 : vec1[g]+=h;
movsd xmm0, QWORD PTR [ecx+eax]
addsd xmm0, xmm1
movsd QWORD PTR [ecx+eax], xmm0
dec esi
jne $LL3@main
; 182 : for(int h = 0; h<N2; h++){
inc edx
cmp edx, 4000 ; 00000fa0H
jl $LL6@main
; 181 : for(int g = 0; g<N1/2; g++){
add ecx, 8
cmp ecx, 4000 ; 00000fa0H
jl $LL9@main
; 185 : }
; 186 : }
; 187 : }
; 188 : tt = clock();
call edi
; 189 : cout<<tt-t<<endl;
push DWORD PTR __imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z
mov ecx, DWORD PTR __imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A
sub eax, ebx
push eax
call DWORD PTR __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z
mov ecx, eax
call DWORD PTR __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z
; 190 : getchar();
call DWORD PTR __imp__getchar
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1536 : if (this->_Myfirst != pointer())
mov eax, DWORD PTR _vec2$[esp+84]
mov esi, DWORD PTR __imp_??3@YAXPAX@Z
test eax, eax
je SHORT $LN45@main
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; 586 : ::operator delete(_Ptr);
push eax
call esi
add esp, 4
$LN45@main:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1536 : if (this->_Myfirst != pointer())
mov eax, DWORD PTR _vec1$[esp+84]
test eax, eax
je SHORT $LN84@main
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; 586 : ::operator delete(_Ptr);
push eax
call esi
add esp, 4
$LN84@main:
; File e:\программирование\any\any\any.cpp
; 191 : }
mov ecx, DWORD PTR __$EHRec$[esp+84]
mov DWORD PTR fs:0, ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__unwindfunclet$_main$0:
lea ecx, DWORD PTR _res1$[ebp]
jmp ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >
__unwindfunclet$_main$1:
lea ecx, DWORD PTR _res2$[ebp]
jmp ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >
__unwindfunclet$_main$2:
lea ecx, DWORD PTR _vec1$[ebp]
jmp ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >
__unwindfunclet$_main$3:
lea ecx, DWORD PTR _vec2$[ebp]
jmp ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >
__ehhandler$_main:
mov edx, DWORD PTR [esp+8]
lea eax, DWORD PTR [edx-68]
mov ecx, DWORD PTR [edx-72]
xor ecx, eax
call @__security_check_cookie@4
mov eax, OFFSET __ehfuncinfo$_main
jmp ___CxxFrameHandler3
text$x ENDS
_main ENDP
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; COMDAT ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z
_TEXT SEGMENT
__Ptr$ = 8 ; size = 4
??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z PROC ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >, COMDAT
; _this$ = ecx
; 791 : { // construct from [_Ptr, <null>)
push ebp
mov ebp, esp
push esi
mov esi, ecx
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 523 : : _CSTD strlen(_First));
mov ecx, DWORD PTR __Ptr$[ebp]
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
mov DWORD PTR [esi+20], 15 ; 0000000fH
; 1145 : }
; 1146 :
; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
; 1148 : { // assign _Count * _Ch
; 1149 : if (_Count == npos)
; 1150 : _Xlen(); // result too long
; 1151 :
; 1152 : if (_Grow(_Count))
; 1153 : { // make room and assign new stuff
; 1154 : _Chassign(0, _Count, _Ch);
; 1155 : _Eos(_Count);
; 1156 : }
; 1157 : return (*this);
; 1158 : }
; 1159 :
; 1160 : template<class _Iter>
; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
; 1162 : _Myt&>::type
; 1163 : assign(_Iter _First, _Iter _Last)
; 1164 : { // assign [First, _Last), input iterators
; 1165 : return (replace(begin(), end(), _First, _Last));
; 1166 : }
; 1167 :
; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
; 1169 : { // assign [First, _Last), const pointers
; 1170 : return (replace(begin(), end(), _First, _Last));
; 1171 : }
; 1172 :
; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
; 1174 : { // assign [First, _Last), const_iterators
; 1175 : return (replace(begin(), end(), _First, _Last));
; 1176 : }
; 1177 :
; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
; 1179 : { // insert _Right at _Off
; 1180 : return (insert(_Off, _Right, 0, npos));
; 1181 : }
; 1182 :
; 1183 : _Myt& insert(size_type _Off,
; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1187 : _Xran(); // _Off or _Roff off end
; 1188 : size_type _Num = _Right.size() - _Roff;
; 1189 : if (_Num < _Count)
; 1190 : _Count = _Num; // trim _Count to size
; 1191 : if (npos - this->_Mysize <= _Count)
; 1192 : _Xlen(); // result too long
; 1193 :
; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1195 : { // make room and insert new stuff
; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1197 : this->_Myptr() + _Off,
; 1198 : this->_Mysize - _Off); // empty out hole
; 1199 : if (this == &_Right)
; 1200 : _Traits::move(this->_Myptr() + _Off,
; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
; 1202 : _Count); // substring
; 1203 : else
; 1204 : _Traits::copy(this->_Myptr() + _Off,
; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1206 : _Eos(_Num);
; 1207 : }
; 1208 : return (*this);
; 1209 : }
; 1210 :
; 1211 : _Myt& insert(size_type _Off,
; 1212 : const _Elem *_Ptr, size_type _Count)
; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1215 : if (_Count != 0)
; 1216 : _DEBUG_POINTER(_Ptr);
; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1218 :
; 1219 : if (_Inside(_Ptr))
; 1220 : return (insert(_Off, *this,
; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
; 1222 : if (this->_Mysize < _Off)
; 1223 : _Xran(); // _Off off end
; 1224 : if (npos - this->_Mysize <= _Count)
; 1225 : _Xlen(); // result too long
; 1226 : size_type _Num;
; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1228 : { // make room and insert new stuff
; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1230 : this->_Myptr() + _Off,
; 1231 : this->_Mysize - _Off); // empty out hole
; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1233 : _Eos(_Num);
; 1234 : }
; 1235 : return (*this);
; 1236 : }
; 1237 :
; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
; 1239 : { // insert [_Ptr, <null>) at _Off
; 1240 : _DEBUG_POINTER(_Ptr);
; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
; 1242 : }
; 1243 :
; 1244 : _Myt& insert(size_type _Off,
; 1245 : size_type _Count, _Elem _Ch)
; 1246 : { // insert _Count * _Ch at _Off
; 1247 : if (this->_Mysize < _Off)
; 1248 : _Xran(); // _Off off end
; 1249 : if (npos - this->_Mysize <= _Count)
; 1250 : _Xlen(); // result too long
; 1251 : size_type _Num;
; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1253 : { // make room and insert new stuff
; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1255 : this->_Myptr() + _Off,
; 1256 : this->_Mysize - _Off); // empty out hole
; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1258 : _Eos(_Num);
; 1259 : }
; 1260 : return (*this);
; 1261 : }
; 1262 :
; 1263 : iterator insert(const_iterator _Where)
; 1264 : { // insert <null> at _Where
; 1265 : return (insert(_Where, _Elem()));
; 1266 : }
; 1267 :
; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
; 1269 : { // insert _Ch at _Where
; 1270 : size_type _Off = _Pdif(_Where, begin());
; 1271 : insert(_Off, 1, _Ch);
; 1272 : return (begin() + _Off);
; 1273 : }
; 1274 :
; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
; 1276 : { // insert _Count * _Elem at _Where
; 1277 : size_type _Off = _Pdif(_Where, begin());
; 1278 : insert(_Off, _Count, _Ch);
; 1279 : return (begin() + _Off);
; 1280 : }
; 1281 :
; 1282 : template<class _Iter>
; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
; 1284 : iterator>::type
; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1286 : { // insert [_First, _Last) at _Where, input iterators
; 1287 : size_type _Off = _Pdif(_Where, begin());
; 1288 : replace(_Where, _Where, _First, _Last);
; 1289 : return (begin() + _Off);
; 1290 : }
; 1291 :
; 1292 : iterator insert(const_iterator _Where,
; 1293 : const_pointer _First, const_pointer _Last)
; 1294 : { // insert [_First, _Last) at _Where, const pointers
; 1295 : size_type _Off = _Pdif(_Where, begin());
; 1296 : replace(_Where, _Where, _First, _Last);
; 1297 : return (begin() + _Off);
; 1298 : }
; 1299 :
; 1300 : iterator insert(const_iterator _Where,
; 1301 : const_iterator _First, const_iterator _Last)
; 1302 : { // insert [_First, _Last) at _Where, const_iterators
; 1303 : size_type _Off = _Pdif(_Where, begin());
; 1304 : replace(_Where, _Where, _First, _Last);
; 1305 : return (begin() + _Off);
; 1306 : }
; 1307 :
; 1308 : _Myt& erase(size_type _Off = 0)
; 1309 : { // erase elements [_Off, ...)
; 1310 : if (this->_Mysize < _Off)
; 1311 : _Xran(); // _Off off end
; 1312 : _Eos(_Off);
; 1313 : return (*this);
; 1314 : }
; 1315 :
; 1316 : _Myt& erase(size_type _Off, size_type _Count)
; 1317 : { // erase elements [_Off, _Off + _Count)
; 1318 : if (this->_Mysize < _Off)
; 1319 : _Xran(); // _Off off end
; 1320 : if (this->_Mysize - _Off <= _Count)
; 1321 : _Eos(_Off); // erase elements [_Off, ...)
; 1322 : else if (0 < _Count)
; 1323 : { // move elements down
; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
; 1325 : size_type _Newsize = this->_Mysize - _Count;
; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
; 1327 : _Eos(_Newsize);
; 1328 : }
; 1329 : return (*this);
; 1330 : }
; 1331 :
; 1332 : iterator erase(const_iterator _Where)
; 1333 : { // erase element at _Where
; 1334 : size_type _Count = _Pdif(_Where, begin());
; 1335 : erase(_Count, 1);
; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1337 : }
; 1338 :
; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
; 1340 : { // erase substring [_First, _Last)
; 1341 : _DEBUG_RANGE(_First, _Last);
; 1342 : size_type _Count = _Pdif(_First, begin());
; 1343 : erase(_Count, _Pdif(_Last, _First));
; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1345 : }
; 1346 :
; 1347 : void clear() _NOEXCEPT
; 1348 : { // erase all
; 1349 : _Eos(0);
; 1350 : }
; 1351 :
; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
; 1353 : { // replace [_Off, _Off + _N0) with _Right
; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
; 1355 : }
; 1356 :
; 1357 : _Myt& replace(size_type _Off,
; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1361 : _Xran(); // _Off or _Roff off end
; 1362 : if (this->_Mysize - _Off < _N0)
; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1364 : size_type _Num = _Right.size() - _Roff;
; 1365 : if (_Num < _Count)
; 1366 : _Count = _Num; // trim _Count to size
; 1367 : if (npos - _Count <= this->_Mysize - _N0)
; 1368 : _Xlen(); // result too long
; 1369 :
; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
; 1372 : if (this->_Mysize < _Newsize)
; 1373 : _Grow(_Newsize);
; 1374 :
; 1375 : if (this != &_Right)
; 1376 : { // no overlap, just move down and copy in new stuff
; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
; 1379 : _Traits::copy(this->_Myptr() + _Off,
; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1381 : }
; 1382 : else if (_Count <= _N0)
; 1383 : { // hole doesn't get larger, just copy in substring
; 1384 : _Traits::move(this->_Myptr() + _Off,
; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1388 : }
; 1389 : else if (_Roff <= _Off)
; 1390 : { // hole gets larger, substring begins before hole
; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1393 : _Traits::move(this->_Myptr() + _Off,
; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
; 1395 : }
; 1396 : else if (_Off + _N0 <= _Roff)
; 1397 : { // hole gets larger, substring begins after hole
; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1400 : _Traits::move(this->_Myptr() + _Off,
; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
; 1402 : _Count); // fill hole
; 1403 : }
; 1404 : else
; 1405 : { // hole gets larger, substring begins in hole
; 1406 : _Traits::move(this->_Myptr() + _Off,
; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
; 1411 : this->_Myptr() + _Roff + _Count,
; 1412 : _Count - _N0); // fill rest of new hole
; 1413 : }
; 1414 :
; 1415 : _Eos(_Newsize);
; 1416 : return (*this);
; 1417 : }
; 1418 :
; 1419 : _Myt& replace(size_type _Off,
; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1423 : if (_Count != 0)
; 1424 : _DEBUG_POINTER(_Ptr);
; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1426 :
; 1427 : if (_Inside(_Ptr))
; 1428 : return (replace(_Off, _N0, *this,
; 1429 : _Ptr - this->_Myptr(),
; 1430 : _Count)); // substring, replace carefully
; 1431 : if (this->_Mysize < _Off)
; 1432 : _Xran(); // _Off off end
; 1433 : if (this->_Mysize - _Off < _N0)
; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1435 : if (npos - _Count <= this->_Mysize - _N0)
; 1436 : _Xlen(); // result too long
; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1438 :
; 1439 : if (_Count < _N0)
; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1441 : this->_Myptr() + _Off + _N0,
; 1442 : _Nm); // smaller hole, move tail up
; 1443 : size_type _Num;
; 1444 : if ((0 < _Count || 0 < _N0)
; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1446 : { // make room and rearrange
; 1447 : if (_N0 < _Count)
; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1451 : _Eos(_Num);
; 1452 : }
; 1453 : return (*this);
; 1454 : }
; 1455 :
; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
; 1458 : _DEBUG_POINTER(_Ptr);
; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 1460 : }
; 1461 :
; 1462 : _Myt& replace(size_type _Off,
; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
; 1465 : if (this->_Mysize < _Off)
; 1466 : _Xran(); // _Off off end
; 1467 : if (this->_Mysize - _Off < _N0)
; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1469 : if (npos - _Count <= this->_Mysize - _N0)
; 1470 : _Xlen(); // result too long
; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1472 :
; 1473 : if (_Count < _N0)
; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1475 : this->_Myptr() + _Off + _N0,
; 1476 : _Nm); // smaller hole, move tail up
; 1477 : size_type _Num;
; 1478 : if ((0 < _Count || 0 < _N0)
; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1480 : { // make room and rearrange
; 1481 : if (_N0 < _Count)
; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1485 : _Eos(_Num);
; 1486 : }
; 1487 : return (*this);
; 1488 : }
; 1489 :
; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1491 : const _Myt& _Right)
; 1492 : { // replace [_First, _Last) with _Right
; 1493 : return (replace(
; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
; 1495 : }
; 1496 :
; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1498 : const _Elem *_Ptr, size_type _Count)
; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
; 1500 : return (replace(
; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
; 1502 : }
; 1503 :
; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1505 : const _Elem *_Ptr)
; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
; 1507 : return (replace(
; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
; 1509 : }
; 1510 :
; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1512 : size_type _Count, _Elem _Ch)
; 1513 : { // replace [_First, _Last) with _Count * _Ch
; 1514 : return (replace(
; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
; 1516 : }
; 1517 :
; 1518 : template<class _Iter>
; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
; 1520 : _Myt&>::type
; 1521 : replace(const_iterator _First, const_iterator _Last,
; 1522 : _Iter _First2, _Iter _Last2)
; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
; 1524 : _Myt _Right(_First2, _Last2);
; 1525 : replace(_First, _Last, _Right);
; 1526 : return (*this);
; 1527 : }
; 1528 :
; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1530 : const_pointer _First2, const_pointer _Last2)
; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1532 : if (_First2 == _Last2)
; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1534 : else
; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1536 : &*_First2, _Last2 - _First2);
; 1537 : return (*this);
; 1538 : }
; 1539 :
; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1541 : pointer _First2, pointer _Last2)
; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1543 : if (_First2 == _Last2)
; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1545 : else
; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1547 : &*_First2, _Last2 - _First2);
; 1548 : return (*this);
; 1549 : }
; 1550 :
; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1552 : const_iterator _First2, const_iterator _Last2)
; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1554 : if (_First2 == _Last2)
; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1556 : else
; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1558 : &*_First2, _Last2 - _First2);
; 1559 : return (*this);
; 1560 : }
; 1561 :
; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1563 : iterator _First2, iterator _Last2)
; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1565 : if (_First2 == _Last2)
; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1567 : else
; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1569 : &*_First2, _Last2 - _First2);
; 1570 : return (*this);
; 1571 : }
; 1572 :
; 1573 : iterator begin() _NOEXCEPT
; 1574 : { // return iterator for beginning of mutable sequence
; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
; 1576 : }
; 1577 :
; 1578 : const_iterator begin() const _NOEXCEPT
; 1579 : { // return iterator for beginning of nonmutable sequence
; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
; 1581 : }
; 1582 :
; 1583 : iterator end() _NOEXCEPT
; 1584 : { // return iterator for end of mutable sequence
; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
; 1586 : }
; 1587 :
; 1588 : const_iterator end() const _NOEXCEPT
; 1589 : { // return iterator for end of nonmutable sequence
; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
; 1591 : }
; 1592 :
; 1593 : reverse_iterator rbegin() _NOEXCEPT
; 1594 : { // return iterator for beginning of reversed mutable sequence
; 1595 : return (reverse_iterator(end()));
; 1596 : }
; 1597 :
; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
; 1599 : { // return iterator for beginning of reversed nonmutable sequence
; 1600 : return (const_reverse_iterator(end()));
; 1601 : }
; 1602 :
; 1603 : reverse_iterator rend() _NOEXCEPT
; 1604 : { // return iterator for end of reversed mutable sequence
; 1605 : return (reverse_iterator(begin()));
; 1606 : }
; 1607 :
; 1608 : const_reverse_iterator rend() const _NOEXCEPT
; 1609 : { // return iterator for end of reversed nonmutable sequence
; 1610 : return (const_reverse_iterator(begin()));
; 1611 : }
; 1612 :
; 1613 : #if _HAS_CPP0X
; 1614 : const_iterator cbegin() const _NOEXCEPT
; 1615 : { // return iterator for beginning of nonmutable sequence
; 1616 : return (((const _Myt *)this)->begin());
; 1617 : }
; 1618 :
; 1619 : const_iterator cend() const _NOEXCEPT
; 1620 : { // return iterator for end of nonmutable sequence
; 1621 : return (((const _Myt *)this)->end());
; 1622 : }
; 1623 :
; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
; 1625 : { // return iterator for beginning of reversed nonmutable sequence
; 1626 : return (((const _Myt *)this)->rbegin());
; 1627 : }
; 1628 :
; 1629 : const_reverse_iterator crend() const _NOEXCEPT
; 1630 : { // return iterator for end of reversed nonmutable sequence
; 1631 : return (((const _Myt *)this)->rend());
; 1632 : }
; 1633 :
; 1634 : void shrink_to_fit()
; 1635 : { // reduce capacity
; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
; 1637 : { // worth shrinking, do it
; 1638 : _Myt _Tmp(*this);
; 1639 : swap(_Tmp);
; 1640 : }
; 1641 : }
; 1642 : #endif /* _HAS_CPP0X */
; 1643 :
; 1644 : reference at(size_type _Off)
; 1645 : { // subscript mutable sequence with checking
; 1646 : if (this->_Mysize <= _Off)
; 1647 : _Xran(); // _Off off end
; 1648 : return (this->_Myptr()[_Off]);
; 1649 : }
; 1650 :
; 1651 : const_reference at(size_type _Off) const
; 1652 : { // subscript nonmutable sequence with checking
; 1653 : if (this->_Mysize <= _Off)
; 1654 : _Xran(); // _Off off end
; 1655 : return (this->_Myptr()[_Off]);
; 1656 : }
; 1657 :
; 1658 : reference operator[](size_type _Off)
; 1659 : { // subscript mutable sequence
; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1661 : if (this->_Mysize < _Off) // sic
; 1662 : _DEBUG_ERROR("string subscript out of range");
; 1663 :
; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1667 :
; 1668 : return (this->_Myptr()[_Off]);
; 1669 : }
; 1670 :
; 1671 : const_reference operator[](size_type _Off) const
; 1672 : { // subscript nonmutable sequence
; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1674 : if (this->_Mysize < _Off) // sic
; 1675 : _DEBUG_ERROR("string subscript out of range");
; 1676 :
; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1680 :
; 1681 : return (this->_Myptr()[_Off]);
; 1682 : }
; 1683 :
; 1684 : void push_back(_Elem _Ch)
; 1685 : { // insert element at end
; 1686 : insert(end(), _Ch);
; 1687 : }
; 1688 :
; 1689 : #if _HAS_CPP0X
; 1690 : void pop_back()
; 1691 : { // erase element at end
; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
; 1693 : }
; 1694 :
; 1695 : reference front()
; 1696 : { // return first element of mutable sequence
; 1697 : return (*begin());
; 1698 : }
; 1699 :
; 1700 : const_reference front() const
; 1701 : { // return first element of nonmutable sequence
; 1702 : return (*begin());
; 1703 : }
; 1704 :
; 1705 : reference back()
; 1706 : { // return last element of mutable sequence
; 1707 : return (*(end() - 1));
; 1708 : }
; 1709 :
; 1710 : const_reference back() const
; 1711 : { // return last element of nonmutable sequence
; 1712 : return (*(end() - 1));
; 1713 : }
; 1714 : #endif /* _HAS_CPP0X */
; 1715 :
; 1716 : const _Elem *c_str() const _NOEXCEPT
; 1717 : { // return pointer to null-terminated nonmutable array
; 1718 : return (this->_Myptr());
; 1719 : }
; 1720 :
; 1721 : const _Elem *data() const _NOEXCEPT
; 1722 : { // return pointer to nonmutable array
; 1723 : return (c_str());
; 1724 : }
; 1725 :
; 1726 : size_type length() const _NOEXCEPT
; 1727 : { // return length of sequence
; 1728 : return (this->_Mysize);
; 1729 : }
; 1730 :
; 1731 : size_type size() const _NOEXCEPT
; 1732 : { // return length of sequence
; 1733 : return (this->_Mysize);
; 1734 : }
; 1735 :
; 1736 : size_type max_size() const _NOEXCEPT
; 1737 : { // return maximum possible length of sequence
; 1738 : size_type _Num = this->_Getal().max_size();
; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
; 1740 : }
; 1741 :
; 1742 : void resize(size_type _Newsize)
; 1743 : { // determine new length, padding with null elements as needed
; 1744 : resize(_Newsize, _Elem());
; 1745 : }
; 1746 :
; 1747 : void resize(size_type _Newsize, _Elem _Ch)
; 1748 : { // determine new length, padding with _Ch elements as needed
; 1749 : if (_Newsize <= this->_Mysize)
; 1750 : _Eos(_Newsize);
; 1751 : else
; 1752 : append(_Newsize - this->_Mysize, _Ch);
; 1753 : }
; 1754 :
; 1755 : size_type capacity() const _NOEXCEPT
; 1756 : { // return current length of allocated storage
; 1757 : return (this->_Myres);
; 1758 : }
; 1759 :
; 1760 : void reserve(size_type _Newcap = 0)
; 1761 : { // determine new minimum length of allocated storage
; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
; 1763 : { // change reservation
; 1764 : size_type _Size = this->_Mysize;
; 1765 : if (_Grow(_Newcap, true))
; 1766 : _Eos(_Size);
; 1767 : }
; 1768 : }
; 1769 :
; 1770 : bool empty() const _NOEXCEPT
; 1771 : { // test if sequence is empty
; 1772 : return (this->_Mysize == 0);
; 1773 : }
; 1774 :
; 1775 : _SCL_INSECURE_DEPRECATE
; 1776 :
; 1777 : size_type copy(_Elem *_Ptr,
; 1778 : size_type _Count, size_type _Off = 0) const
; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1781 : if (_Count != 0)
; 1782 : _DEBUG_POINTER(_Ptr);
; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1784 :
; 1785 : if (this->_Mysize < _Off)
; 1786 : _Xran(); // _Off off end
; 1787 : if (this->_Mysize - _Off < _Count)
; 1788 : _Count = this->_Mysize - _Off;
; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
; 1790 : return (_Count);
; 1791 : }
; 1792 :
; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
; 1794 : size_type _Count, size_type _Off = 0) const
; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1797 : if (_Count != 0)
; 1798 : _DEBUG_POINTER(_Dest);
; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1800 :
; 1801 : if (this->_Mysize < _Off)
; 1802 : _Xran(); // _Off off end
; 1803 : if (this->_Mysize - _Off < _Count)
; 1804 : _Count = this->_Mysize - _Off;
; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
; 1806 : return (_Count);
; 1807 : }
; 1808 :
; 1809 : void _Swap_bx(_Myt& _Right)
; 1810 : { // exchange _Bx with _Right._Bx
; 1811 : if (this->_BUF_SIZE <= this->_Myres)
; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
; 1814 : else
; 1815 : { // swap large with small
; 1816 : pointer _Ptr = this->_Bx._Ptr;
; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
; 1818 : _Traits::copy(this->_Bx._Buf,
; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
; 1821 : }
; 1822 : else
; 1823 : if (_Right._Myres < this->_BUF_SIZE)
; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
; 1825 : else
; 1826 : { // swap small with large
; 1827 : pointer _Ptr = _Right._Bx._Ptr;
; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
; 1829 : _Traits::copy(_Right._Bx._Buf,
; 1830 : this->_Bx._Buf, this->_Mysize + 1);
; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 1832 : }
; 1833 : }
; 1834 :
; 1835 : void swap(_Myt& _Right)
; 1836 : { // exchange contents with _Right
; 1837 : if (this == &_Right)
; 1838 : ; // same object, do nothing
; 1839 : else if (this->_Getal() == _Right._Getal())
; 1840 : { // same allocator, swap control information
; 1841 : this->_Swap_all(_Right);
; 1842 : _Swap_bx(_Right);
; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
; 1844 : _STD swap(this->_Myres, _Right._Myres);
; 1845 : }
; 1846 :
; 1847 : #if _HAS_CPP0X
; 1848 : else if (_Alty::propagate_on_container_swap::value)
; 1849 : { // swap allocators and control information
; 1850 : this->_Swap_alloc(_Right);
; 1851 : _Swap_bx(_Right);
; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
; 1854 : _STD swap(this->_Myres, _Right._Myres);
; 1855 : }
; 1856 : #endif /* _HAS_CPP0X */
; 1857 :
; 1858 : else
; 1859 : { // different allocator, do multiple assigns
; 1860 : _Myt _Tmp = *this;
; 1861 :
; 1862 : *this = _Right;
; 1863 : _Right = _Tmp;
; 1864 : }
; 1865 : }
; 1866 :
; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
; 1868 : { // look for _Right beginning at or after _Off
; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
; 1870 : }
; 1871 :
; 1872 : size_type find(const _Elem *_Ptr,
; 1873 : size_type _Off, size_type _Count) const
; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1876 : if (_Count != 0)
; 1877 : _DEBUG_POINTER(_Ptr);
; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1879 :
; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
; 1881 : return (_Off); // null string always matches (if inside string)
; 1882 :
; 1883 : size_type _Nm;
; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
; 1885 : { // room for match, look for it
; 1886 : const _Elem *_Uptr, *_Vptr;
; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1891 : return (_Uptr - this->_Myptr()); // found a match
; 1892 : }
; 1893 :
; 1894 : return (npos); // no match
; 1895 : }
; 1896 :
; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
; 1899 : _DEBUG_POINTER(_Ptr);
; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
; 1901 : }
; 1902 :
; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
; 1904 : { // look for _Ch at or after _Off
; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1906 : }
; 1907 :
; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
; 1909 : { // look for _Right beginning before _Off
; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
; 1911 : }
; 1912 :
; 1913 : size_type rfind(const _Elem *_Ptr,
; 1914 : size_type _Off, size_type _Count) const
; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1917 : if (_Count != 0)
; 1918 : _DEBUG_POINTER(_Ptr);
; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1920 :
; 1921 : if (_Count == 0)
; 1922 : return (_Off < this->_Mysize ? _Off
; 1923 : : this->_Mysize); // null always matches
; 1924 : if (_Count <= this->_Mysize)
; 1925 : { // room for match, look for it
; 1926 : const _Elem *_Uptr = this->_Myptr() +
; 1927 : (_Off < this->_Mysize - _Count ? _Off
; 1928 : : this->_Mysize - _Count);
; 1929 : for (; ; --_Uptr)
; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1932 : return (_Uptr - this->_Myptr()); // found a match
; 1933 : else if (_Uptr == this->_Myptr())
; 1934 : break; // at beginning, no more chance for match
; 1935 : }
; 1936 :
; 1937 : return (npos); // no match
; 1938 : }
; 1939 :
; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
; 1941 : { // look for [_Ptr, <null>) beginning before _Off
; 1942 : _DEBUG_POINTER(_Ptr);
; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
; 1944 : }
; 1945 :
; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
; 1947 : { // look for _Ch before _Off
; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 1949 : }
; 1950 :
; 1951 : size_type find_first_of(const _Myt& _Right,
; 1952 : size_type _Off = 0) const _NOEXCEPT
; 1953 : { // look for one of _Right at or after _Off
; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
; 1955 : }
; 1956 :
; 1957 : size_type find_first_of(const _Elem *_Ptr,
; 1958 : size_type _Off, size_type _Count) const
; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1961 : if (_Count != 0)
; 1962 : _DEBUG_POINTER(_Ptr);
; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1964 :
; 1965 : if (0 < _Count && _Off < this->_Mysize)
; 1966 : { // room for match, look for it
; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 1969 : _Uptr < _Vptr; ++_Uptr)
; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 1971 : return (_Uptr - this->_Myptr()); // found a match
; 1972 : }
; 1973 :
; 1974 : return (npos); // no match
; 1975 : }
; 1976 :
; 1977 : size_type find_first_of(const _Elem *_Ptr,
; 1978 : size_type _Off = 0) const
; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
; 1980 : _DEBUG_POINTER(_Ptr);
; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 1982 : }
; 1983 :
; 1984 : size_type find_first_of(_Elem _Ch,
; 1985 : size_type _Off = 0) const
; 1986 : { // look for _Ch at or after _Off
; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1988 : }
; 1989 :
; 1990 : size_type find_last_of(const _Myt& _Right,
; 1991 : size_type _Off = npos) const _NOEXCEPT
; 1992 : { // look for one of _Right before _Off
; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
; 1994 : }
; 1995 :
; 1996 : size_type find_last_of(const _Elem *_Ptr,
; 1997 : size_type _Off, size_type _Count) const
; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2000 : if (_Count != 0)
; 2001 : _DEBUG_POINTER(_Ptr);
; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2003 :
; 2004 : if (0 < _Count && 0 < this->_Mysize)
; 2005 : { // worth searching, do it
; 2006 : const _Elem *_Uptr = this->_Myptr()
; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2008 : for (; ; --_Uptr)
; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 2010 : return (_Uptr - this->_Myptr()); // found a match
; 2011 : else if (_Uptr == this->_Myptr())
; 2012 : break; // at beginning, no more chance for match
; 2013 : }
; 2014 :
; 2015 : return (npos); // no match
; 2016 : }
; 2017 :
; 2018 : size_type find_last_of(const _Elem *_Ptr,
; 2019 : size_type _Off = npos) const
; 2020 : { // look for one of [_Ptr, <null>) before _Off
; 2021 : _DEBUG_POINTER(_Ptr);
; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2023 : }
; 2024 :
; 2025 : size_type find_last_of(_Elem _Ch,
; 2026 : size_type _Off = npos) const
; 2027 : { // look for _Ch before _Off
; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 2029 : }
; 2030 :
; 2031 : size_type find_first_not_of(const _Myt& _Right,
; 2032 : size_type _Off = 0) const _NOEXCEPT
; 2033 : { // look for none of _Right at or after _Off
; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
; 2035 : _Right.size()));
; 2036 : }
; 2037 :
; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
; 2039 : size_type _Off, size_type _Count) const
; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2042 : if (_Count != 0)
; 2043 : _DEBUG_POINTER(_Ptr);
; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2045 :
; 2046 : if (_Off < this->_Mysize)
; 2047 : { // room for match, look for it
; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 2050 : _Uptr < _Vptr; ++_Uptr)
; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2052 : return (_Uptr - this->_Myptr());
; 2053 : }
; 2054 : return (npos);
; 2055 : }
; 2056 :
; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
; 2058 : size_type _Off = 0) const
; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
; 2060 : _DEBUG_POINTER(_Ptr);
; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2062 : }
; 2063 :
; 2064 : size_type find_first_not_of(_Elem _Ch,
; 2065 : size_type _Off = 0) const
; 2066 : { // look for non _Ch at or after _Off
; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
; 2068 : }
; 2069 :
; 2070 : size_type find_last_not_of(const _Myt& _Right,
; 2071 : size_type _Off = npos) const _NOEXCEPT
; 2072 : { // look for none of _Right before _Off
; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
; 2074 : }
; 2075 :
; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
; 2077 : size_type _Off, size_type _Count) const
; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2080 : if (_Count != 0)
; 2081 : _DEBUG_POINTER(_Ptr);
; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2083 :
; 2084 : if (0 < this->_Mysize)
; 2085 : { // worth searching, do it
; 2086 : const _Elem *_Uptr = this->_Myptr()
; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2088 : for (; ; --_Uptr)
; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2090 : return (_Uptr - this->_Myptr());
; 2091 : else if (_Uptr == this->_Myptr())
; 2092 : break;
; 2093 : }
; 2094 : return (npos);
; 2095 : }
; 2096 :
; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
; 2098 : size_type _Off = npos) const
; 2099 : { // look for none of [_Ptr, <null>) before _Off
; 2100 : _DEBUG_POINTER(_Ptr);
; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2102 : }
; 2103 :
; 2104 : size_type find_last_not_of(_Elem _Ch,
; 2105 : size_type _Off = npos) const
; 2106 : { // look for non _Ch before _Off
; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
; 2108 : }
; 2109 :
; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
; 2111 : { // return [_Off, _Off + _Count) as new string
; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
; 2113 : }
; 2114 :
; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
; 2116 : { // compare [0, _Mysize) with _Right
; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
; 2118 : }
; 2119 :
; 2120 : int compare(size_type _Off, size_type _N0,
; 2121 : const _Myt& _Right) const
; 2122 : { // compare [_Off, _Off + _N0) with _Right
; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
; 2124 : }
; 2125 :
; 2126 : int compare(size_type _Off,
; 2127 : size_type _N0, const _Myt& _Right,
; 2128 : size_type _Roff, size_type _Count) const
; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 2130 : if (_Right.size() < _Roff)
; 2131 : _Xran(); // _Off off end
; 2132 : if (_Right._Mysize - _Roff < _Count)
; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
; 2135 : }
; 2136 :
; 2137 : int compare(const _Elem *_Ptr) const
; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
; 2139 : _DEBUG_POINTER(_Ptr);
; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
; 2141 : }
; 2142 :
; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
; 2145 : _DEBUG_POINTER(_Ptr);
; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 2147 : }
; 2148 :
; 2149 : int compare(size_type _Off,
; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2153 : if (_Count != 0)
; 2154 : _DEBUG_POINTER(_Ptr);
; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2156 :
; 2157 : if (this->_Mysize < _Off)
; 2158 : _Xran(); // _Off off end
; 2159 : if (this->_Mysize - _Off < _N0)
; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 2161 :
; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
; 2163 : _N0 < _Count ? _N0 : _Count);
; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
; 2165 : : _N0 == _Count ? 0 : +1);
; 2166 : }
; 2167 :
; 2168 : allocator_type get_allocator() const _NOEXCEPT
; 2169 : { // return allocator object for values
; 2170 : return (this->_Getal());
; 2171 : }
; 2172 :
; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
; 2174 : { // assign _Count copies of _Ch beginning at _Off
; 2175 : if (_Count == 1)
; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
; 2177 : else
; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
; 2179 : }
; 2180 :
; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
; 2182 : { // copy _Oldlen elements to newly allocated buffer
; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
; 2184 : if (max_size() < _Newres)
; 2185 : _Newres = _Newsize; // undo roundup if too big
; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
; 2187 : ;
; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
; 2189 : _Newres = this->_Myres
; 2190 : + this->_Myres / 2; // grow exponentially if possible
; 2191 : else
; 2192 : _Newres = max_size(); // settle for max_size()
; 2193 :
; 2194 : _Elem *_Ptr;
; 2195 : _TRY_BEGIN
; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2197 : _CATCH_ALL
; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
; 2199 : _TRY_BEGIN
; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2201 : _CATCH_ALL
; 2202 : _Tidy(true); // failed again, discard storage and reraise
; 2203 : _RERAISE;
; 2204 : _CATCH_END
; 2205 : _CATCH_END
; 2206 :
; 2207 : if (0 < _Oldlen)
; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
; 2209 : _Oldlen); // copy existing elements
; 2210 : _Tidy(true);
; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 2212 : this->_Myres = _Newres;
; 2213 : _Eos(_Oldlen);
; 2214 : }
; 2215 :
; 2216 : void _Eos(size_type _Newsize)
; 2217 : { // set new length and null terminator
; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
mov DWORD PTR [esi+16], 0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 564 : _Left = _Right;
mov BYTE PTR [esi], 0
; 523 : : _CSTD strlen(_First));
cmp BYTE PTR [ecx], 0
jne SHORT $LN43@basic_stri
xor edx, edx
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push edx
push ecx
mov ecx, esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
; 792 : _Tidy();
; 793 : assign(_Ptr);
; 794 : }
mov eax, esi
pop esi
pop ebp
ret 4
$LN43@basic_stri:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 523 : : _CSTD strlen(_First));
mov edx, ecx
push edi
lea edi, DWORD PTR [edx+1]
$LL45@basic_stri:
mov al, BYTE PTR [edx]
inc edx
test al, al
jne SHORT $LL45@basic_stri
sub edx, edi
pop edi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push edx
push ecx
mov ecx, esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
; 792 : _Tidy();
; 793 : assign(_Ptr);
; 794 : }
mov eax, esi
pop esi
pop ebp
ret 4
??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z ENDP ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; COMDAT ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ
_TEXT SEGMENT
??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ PROC ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >, COMDAT
; _this$ = ecx
; 963 : { // destroy the string
push esi
mov esi, ecx
; 2219 : }
; 2220 :
; 2221 : bool _Grow(size_type _Newsize,
; 2222 : bool _Trim = false)
; 2223 : { // ensure buffer is big enough, trim to size if _Trim is true
; 2224 : if (max_size() < _Newsize)
; 2225 : _Xlen(); // result too long
; 2226 : if (this->_Myres < _Newsize)
; 2227 : _Copy(_Newsize, this->_Mysize); // reallocate to grow
; 2228 : else if (_Trim && _Newsize < this->_BUF_SIZE)
; 2229 : _Tidy(true, // copy and deallocate if trimming to small string
; 2230 : _Newsize < this->_Mysize ? _Newsize : this->_Mysize);
; 2231 : else if (_Newsize == 0)
; 2232 : _Eos(0); // new size is zero, just null terminate
; 2233 : return (0 < _Newsize); // return true only if more work to do
; 2234 : }
; 2235 :
; 2236 : bool _Inside(const _Elem *_Ptr)
; 2237 : { // test if _Ptr points inside string
; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
; 2240 : return (false); // don't ask
; 2241 : else
; 2242 : return (true);
; 2243 : }
; 2244 :
; 2245 : static size_type _Pdif(const_iterator _P2,
; 2246 : const_iterator _P1)
; 2247 : { // compute safe iterator difference
; 2248 : return (_STRING_ITER_BASE(_P2) == 0 ? 0 : _P2 - _P1);
; 2249 : }
; 2250 :
; 2251 : void _Tidy(bool _Built = false,
; 2252 : size_type _Newsize = 0)
; 2253 : { // initialize buffer, deallocating any storage
; 2254 : if (!_Built)
; 2255 : ;
; 2256 : else if (this->_BUF_SIZE <= this->_Myres)
cmp DWORD PTR [esi+20], 16 ; 00000010H
jb SHORT $LN21@basic_stri
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; 586 : ::operator delete(_Ptr);
push DWORD PTR [esi]
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
$LN21@basic_stri:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
mov DWORD PTR [esi+20], 15 ; 0000000fH
; 966 :
; 967 : _PGLOBAL static const size_type npos; // bad/missing length/position
; 968 :
; 969 : _Myt& operator=(const _Myt& _Right)
; 970 : { // assign _Right
; 971 : if (this != &_Right)
; 972 : { // different, assign it
; 973 : #if _HAS_CPP0X
; 974 : if (this->_Getal() != _Right._Getal()
; 975 : && _Alty::propagate_on_container_copy_assignment::value)
; 976 : { // change allocator before copying
; 977 : _Tidy(true);
; 978 : this->_Change_alloc(_Right._Getal());
; 979 : }
; 980 : #endif /* _HAS_CPP0X */
; 981 :
; 982 : assign(_Right);
; 983 : }
; 984 : return (*this);
; 985 : }
; 986 :
; 987 : _Myt& operator=(const _Elem *_Ptr)
; 988 : { // assign [_Ptr, <null>)
; 989 : return (assign(_Ptr));
; 990 : }
; 991 :
; 992 : _Myt& operator=(_Elem _Ch)
; 993 : { // assign 1 * _Ch
; 994 : return (assign(1, _Ch));
; 995 : }
; 996 :
; 997 : _Myt& operator+=(const _Myt& _Right)
; 998 : { // append _Right
; 999 : return (append(_Right));
; 1000 : }
; 1001 :
; 1002 : _Myt& operator+=(const _Elem *_Ptr)
; 1003 : { // append [_Ptr, <null>)
; 1004 : return (append(_Ptr));
; 1005 : }
; 1006 :
; 1007 : _Myt& operator+=(_Elem _Ch)
; 1008 : { // append 1 * _Ch
; 1009 : return (append((size_type)1, _Ch));
; 1010 : }
; 1011 :
; 1012 : _Myt& append(const _Myt& _Right)
; 1013 : { // append _Right
; 1014 : return (append(_Right, 0, npos));
; 1015 : }
; 1016 :
; 1017 : _Myt& append(const _Myt& _Right,
; 1018 : size_type _Roff, size_type _Count)
; 1019 : { // append _Right [_Roff, _Roff + _Count)
; 1020 : if (_Right.size() < _Roff)
; 1021 : _Xran(); // _Roff off end
; 1022 : size_type _Num = _Right.size() - _Roff;
; 1023 : if (_Num < _Count)
; 1024 : _Count = _Num; // trim _Count to size
; 1025 : if (npos - this->_Mysize <= _Count)
; 1026 : _Xlen(); // result too long
; 1027 :
; 1028 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1029 : { // make room and append new stuff
; 1030 : _Traits::copy(this->_Myptr() + this->_Mysize,
; 1031 : _Right._Myptr() + _Roff, _Count);
; 1032 : _Eos(_Num);
; 1033 : }
; 1034 : return (*this);
; 1035 : }
; 1036 :
; 1037 : _Myt& append(const _Elem *_Ptr, size_type _Count)
; 1038 : { // append [_Ptr, _Ptr + _Count)
; 1039 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1040 : if (_Count != 0)
; 1041 : _DEBUG_POINTER(_Ptr);
; 1042 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1043 :
; 1044 : if (_Inside(_Ptr))
; 1045 : return (append(*this,
; 1046 : _Ptr - this->_Myptr(), _Count)); // substring
; 1047 : if (npos - this->_Mysize <= _Count)
; 1048 : _Xlen(); // result too long
; 1049 :
; 1050 : size_type _Num;
; 1051 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1052 : { // make room and append new stuff
; 1053 : _Traits::copy(this->_Myptr() + this->_Mysize, _Ptr, _Count);
; 1054 : _Eos(_Num);
; 1055 : }
; 1056 : return (*this);
; 1057 : }
; 1058 :
; 1059 : _Myt& append(const _Elem *_Ptr)
; 1060 : { // append [_Ptr, <null>)
; 1061 : _DEBUG_POINTER(_Ptr);
; 1062 : return (append(_Ptr, _Traits::length(_Ptr)));
; 1063 : }
; 1064 :
; 1065 : _Myt& append(size_type _Count, _Elem _Ch)
; 1066 : { // append _Count * _Ch
; 1067 : if (npos - this->_Mysize <= _Count)
; 1068 : _Xlen(); // result too long
; 1069 :
; 1070 : size_type _Num;
; 1071 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1072 : { // make room and append new stuff using assign
; 1073 : _Chassign(this->_Mysize, _Count, _Ch);
; 1074 : _Eos(_Num);
; 1075 : }
; 1076 : return (*this);
; 1077 : }
; 1078 :
; 1079 : template<class _Iter>
; 1080 : typename enable_if<_Is_iterator<_Iter>::value,
; 1081 : _Myt&>::type
; 1082 : append(_Iter _First, _Iter _Last)
; 1083 : { // append [_First, _Last), input iterators
; 1084 : return (replace(end(), end(), _First, _Last));
; 1085 : }
; 1086 :
; 1087 : _Myt& append(const_pointer _First, const_pointer _Last)
; 1088 : { // append [_First, _Last), const pointers
; 1089 : return (replace(end(), end(), _First, _Last));
; 1090 : }
; 1091 :
; 1092 : _Myt& append(const_iterator _First, const_iterator _Last)
; 1093 : { // append [_First, _Last), const_iterators
; 1094 : return (replace(end(), end(), _First, _Last));
; 1095 : }
; 1096 :
; 1097 : _Myt& assign(const _Myt& _Right)
; 1098 : { // assign _Right
; 1099 : return (assign(_Right, 0, npos));
; 1100 : }
; 1101 :
; 1102 : _Myt& assign(const _Myt& _Right,
; 1103 : size_type _Roff, size_type _Count)
; 1104 : { // assign _Right [_Roff, _Roff + _Count)
; 1105 : if (_Right.size() < _Roff)
; 1106 : _Xran(); // _Roff off end
; 1107 : size_type _Num = _Right.size() - _Roff;
; 1108 : if (_Count < _Num)
; 1109 : _Num = _Count; // trim _Num to size
; 1110 :
; 1111 : if (this == &_Right)
; 1112 : erase((size_type)(_Roff + _Num)), erase(0, _Roff); // substring
; 1113 : else if (_Grow(_Num))
; 1114 : { // make room and assign new stuff
; 1115 : _Traits::copy(this->_Myptr(),
; 1116 : _Right._Myptr() + _Roff, _Num);
; 1117 : _Eos(_Num);
; 1118 : }
; 1119 : return (*this);
; 1120 : }
; 1121 :
; 1122 : _Myt& assign(const _Elem *_Ptr, size_type _Count)
; 1123 : { // assign [_Ptr, _Ptr + _Count)
; 1124 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1125 : if (_Count != 0)
; 1126 : _DEBUG_POINTER(_Ptr);
; 1127 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1128 :
; 1129 : if (_Inside(_Ptr))
; 1130 : return (assign(*this,
; 1131 : _Ptr - this->_Myptr(), _Count)); // substring
; 1132 :
; 1133 : if (_Grow(_Count))
; 1134 : { // make room and assign new stuff
; 1135 : _Traits::copy(this->_Myptr(), _Ptr, _Count);
; 1136 : _Eos(_Count);
; 1137 : }
; 1138 : return (*this);
; 1139 : }
; 1140 :
; 1141 : _Myt& assign(const _Elem *_Ptr)
; 1142 : { // assign [_Ptr, <null>)
; 1143 : _DEBUG_POINTER(_Ptr);
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
; 1145 : }
; 1146 :
; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
; 1148 : { // assign _Count * _Ch
; 1149 : if (_Count == npos)
; 1150 : _Xlen(); // result too long
; 1151 :
; 1152 : if (_Grow(_Count))
; 1153 : { // make room and assign new stuff
; 1154 : _Chassign(0, _Count, _Ch);
; 1155 : _Eos(_Count);
; 1156 : }
; 1157 : return (*this);
; 1158 : }
; 1159 :
; 1160 : template<class _Iter>
; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
; 1162 : _Myt&>::type
; 1163 : assign(_Iter _First, _Iter _Last)
; 1164 : { // assign [First, _Last), input iterators
; 1165 : return (replace(begin(), end(), _First, _Last));
; 1166 : }
; 1167 :
; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
; 1169 : { // assign [First, _Last), const pointers
; 1170 : return (replace(begin(), end(), _First, _Last));
; 1171 : }
; 1172 :
; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
; 1174 : { // assign [First, _Last), const_iterators
; 1175 : return (replace(begin(), end(), _First, _Last));
; 1176 : }
; 1177 :
; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
; 1179 : { // insert _Right at _Off
; 1180 : return (insert(_Off, _Right, 0, npos));
; 1181 : }
; 1182 :
; 1183 : _Myt& insert(size_type _Off,
; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1187 : _Xran(); // _Off or _Roff off end
; 1188 : size_type _Num = _Right.size() - _Roff;
; 1189 : if (_Num < _Count)
; 1190 : _Count = _Num; // trim _Count to size
; 1191 : if (npos - this->_Mysize <= _Count)
; 1192 : _Xlen(); // result too long
; 1193 :
; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1195 : { // make room and insert new stuff
; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1197 : this->_Myptr() + _Off,
; 1198 : this->_Mysize - _Off); // empty out hole
; 1199 : if (this == &_Right)
; 1200 : _Traits::move(this->_Myptr() + _Off,
; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
; 1202 : _Count); // substring
; 1203 : else
; 1204 : _Traits::copy(this->_Myptr() + _Off,
; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1206 : _Eos(_Num);
; 1207 : }
; 1208 : return (*this);
; 1209 : }
; 1210 :
; 1211 : _Myt& insert(size_type _Off,
; 1212 : const _Elem *_Ptr, size_type _Count)
; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1215 : if (_Count != 0)
; 1216 : _DEBUG_POINTER(_Ptr);
; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1218 :
; 1219 : if (_Inside(_Ptr))
; 1220 : return (insert(_Off, *this,
; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
; 1222 : if (this->_Mysize < _Off)
; 1223 : _Xran(); // _Off off end
; 1224 : if (npos - this->_Mysize <= _Count)
; 1225 : _Xlen(); // result too long
; 1226 : size_type _Num;
; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1228 : { // make room and insert new stuff
; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1230 : this->_Myptr() + _Off,
; 1231 : this->_Mysize - _Off); // empty out hole
; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1233 : _Eos(_Num);
; 1234 : }
; 1235 : return (*this);
; 1236 : }
; 1237 :
; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
; 1239 : { // insert [_Ptr, <null>) at _Off
; 1240 : _DEBUG_POINTER(_Ptr);
; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
; 1242 : }
; 1243 :
; 1244 : _Myt& insert(size_type _Off,
; 1245 : size_type _Count, _Elem _Ch)
; 1246 : { // insert _Count * _Ch at _Off
; 1247 : if (this->_Mysize < _Off)
; 1248 : _Xran(); // _Off off end
; 1249 : if (npos - this->_Mysize <= _Count)
; 1250 : _Xlen(); // result too long
; 1251 : size_type _Num;
; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1253 : { // make room and insert new stuff
; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1255 : this->_Myptr() + _Off,
; 1256 : this->_Mysize - _Off); // empty out hole
; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1258 : _Eos(_Num);
; 1259 : }
; 1260 : return (*this);
; 1261 : }
; 1262 :
; 1263 : iterator insert(const_iterator _Where)
; 1264 : { // insert <null> at _Where
; 1265 : return (insert(_Where, _Elem()));
; 1266 : }
; 1267 :
; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
; 1269 : { // insert _Ch at _Where
; 1270 : size_type _Off = _Pdif(_Where, begin());
; 1271 : insert(_Off, 1, _Ch);
; 1272 : return (begin() + _Off);
; 1273 : }
; 1274 :
; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
; 1276 : { // insert _Count * _Elem at _Where
; 1277 : size_type _Off = _Pdif(_Where, begin());
; 1278 : insert(_Off, _Count, _Ch);
; 1279 : return (begin() + _Off);
; 1280 : }
; 1281 :
; 1282 : template<class _Iter>
; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
; 1284 : iterator>::type
; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1286 : { // insert [_First, _Last) at _Where, input iterators
; 1287 : size_type _Off = _Pdif(_Where, begin());
; 1288 : replace(_Where, _Where, _First, _Last);
; 1289 : return (begin() + _Off);
; 1290 : }
; 1291 :
; 1292 : iterator insert(const_iterator _Where,
; 1293 : const_pointer _First, const_pointer _Last)
; 1294 : { // insert [_First, _Last) at _Where, const pointers
; 1295 : size_type _Off = _Pdif(_Where, begin());
; 1296 : replace(_Where, _Where, _First, _Last);
; 1297 : return (begin() + _Off);
; 1298 : }
; 1299 :
; 1300 : iterator insert(const_iterator _Where,
; 1301 : const_iterator _First, const_iterator _Last)
; 1302 : { // insert [_First, _Last) at _Where, const_iterators
; 1303 : size_type _Off = _Pdif(_Where, begin());
; 1304 : replace(_Where, _Where, _First, _Last);
; 1305 : return (begin() + _Off);
; 1306 : }
; 1307 :
; 1308 : _Myt& erase(size_type _Off = 0)
; 1309 : { // erase elements [_Off, ...)
; 1310 : if (this->_Mysize < _Off)
; 1311 : _Xran(); // _Off off end
; 1312 : _Eos(_Off);
; 1313 : return (*this);
; 1314 : }
; 1315 :
; 1316 : _Myt& erase(size_type _Off, size_type _Count)
; 1317 : { // erase elements [_Off, _Off + _Count)
; 1318 : if (this->_Mysize < _Off)
; 1319 : _Xran(); // _Off off end
; 1320 : if (this->_Mysize - _Off <= _Count)
; 1321 : _Eos(_Off); // erase elements [_Off, ...)
; 1322 : else if (0 < _Count)
; 1323 : { // move elements down
; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
; 1325 : size_type _Newsize = this->_Mysize - _Count;
; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
; 1327 : _Eos(_Newsize);
; 1328 : }
; 1329 : return (*this);
; 1330 : }
; 1331 :
; 1332 : iterator erase(const_iterator _Where)
; 1333 : { // erase element at _Where
; 1334 : size_type _Count = _Pdif(_Where, begin());
; 1335 : erase(_Count, 1);
; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1337 : }
; 1338 :
; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
; 1340 : { // erase substring [_First, _Last)
; 1341 : _DEBUG_RANGE(_First, _Last);
; 1342 : size_type _Count = _Pdif(_First, begin());
; 1343 : erase(_Count, _Pdif(_Last, _First));
; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1345 : }
; 1346 :
; 1347 : void clear() _NOEXCEPT
; 1348 : { // erase all
; 1349 : _Eos(0);
; 1350 : }
; 1351 :
; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
; 1353 : { // replace [_Off, _Off + _N0) with _Right
; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
; 1355 : }
; 1356 :
; 1357 : _Myt& replace(size_type _Off,
; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1361 : _Xran(); // _Off or _Roff off end
; 1362 : if (this->_Mysize - _Off < _N0)
; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1364 : size_type _Num = _Right.size() - _Roff;
; 1365 : if (_Num < _Count)
; 1366 : _Count = _Num; // trim _Count to size
; 1367 : if (npos - _Count <= this->_Mysize - _N0)
; 1368 : _Xlen(); // result too long
; 1369 :
; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
; 1372 : if (this->_Mysize < _Newsize)
; 1373 : _Grow(_Newsize);
; 1374 :
; 1375 : if (this != &_Right)
; 1376 : { // no overlap, just move down and copy in new stuff
; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
; 1379 : _Traits::copy(this->_Myptr() + _Off,
; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1381 : }
; 1382 : else if (_Count <= _N0)
; 1383 : { // hole doesn't get larger, just copy in substring
; 1384 : _Traits::move(this->_Myptr() + _Off,
; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1388 : }
; 1389 : else if (_Roff <= _Off)
; 1390 : { // hole gets larger, substring begins before hole
; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1393 : _Traits::move(this->_Myptr() + _Off,
; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
; 1395 : }
; 1396 : else if (_Off + _N0 <= _Roff)
; 1397 : { // hole gets larger, substring begins after hole
; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1400 : _Traits::move(this->_Myptr() + _Off,
; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
; 1402 : _Count); // fill hole
; 1403 : }
; 1404 : else
; 1405 : { // hole gets larger, substring begins in hole
; 1406 : _Traits::move(this->_Myptr() + _Off,
; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
; 1411 : this->_Myptr() + _Roff + _Count,
; 1412 : _Count - _N0); // fill rest of new hole
; 1413 : }
; 1414 :
; 1415 : _Eos(_Newsize);
; 1416 : return (*this);
; 1417 : }
; 1418 :
; 1419 : _Myt& replace(size_type _Off,
; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1423 : if (_Count != 0)
; 1424 : _DEBUG_POINTER(_Ptr);
; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1426 :
; 1427 : if (_Inside(_Ptr))
; 1428 : return (replace(_Off, _N0, *this,
; 1429 : _Ptr - this->_Myptr(),
; 1430 : _Count)); // substring, replace carefully
; 1431 : if (this->_Mysize < _Off)
; 1432 : _Xran(); // _Off off end
; 1433 : if (this->_Mysize - _Off < _N0)
; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1435 : if (npos - _Count <= this->_Mysize - _N0)
; 1436 : _Xlen(); // result too long
; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1438 :
; 1439 : if (_Count < _N0)
; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1441 : this->_Myptr() + _Off + _N0,
; 1442 : _Nm); // smaller hole, move tail up
; 1443 : size_type _Num;
; 1444 : if ((0 < _Count || 0 < _N0)
; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1446 : { // make room and rearrange
; 1447 : if (_N0 < _Count)
; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1451 : _Eos(_Num);
; 1452 : }
; 1453 : return (*this);
; 1454 : }
; 1455 :
; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
; 1458 : _DEBUG_POINTER(_Ptr);
; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 1460 : }
; 1461 :
; 1462 : _Myt& replace(size_type _Off,
; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
; 1465 : if (this->_Mysize < _Off)
; 1466 : _Xran(); // _Off off end
; 1467 : if (this->_Mysize - _Off < _N0)
; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1469 : if (npos - _Count <= this->_Mysize - _N0)
; 1470 : _Xlen(); // result too long
; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1472 :
; 1473 : if (_Count < _N0)
; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1475 : this->_Myptr() + _Off + _N0,
; 1476 : _Nm); // smaller hole, move tail up
; 1477 : size_type _Num;
; 1478 : if ((0 < _Count || 0 < _N0)
; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1480 : { // make room and rearrange
; 1481 : if (_N0 < _Count)
; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1485 : _Eos(_Num);
; 1486 : }
; 1487 : return (*this);
; 1488 : }
; 1489 :
; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1491 : const _Myt& _Right)
; 1492 : { // replace [_First, _Last) with _Right
; 1493 : return (replace(
; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
; 1495 : }
; 1496 :
; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1498 : const _Elem *_Ptr, size_type _Count)
; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
; 1500 : return (replace(
; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
; 1502 : }
; 1503 :
; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1505 : const _Elem *_Ptr)
; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
; 1507 : return (replace(
; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
; 1509 : }
; 1510 :
; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1512 : size_type _Count, _Elem _Ch)
; 1513 : { // replace [_First, _Last) with _Count * _Ch
; 1514 : return (replace(
; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
; 1516 : }
; 1517 :
; 1518 : template<class _Iter>
; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
; 1520 : _Myt&>::type
; 1521 : replace(const_iterator _First, const_iterator _Last,
; 1522 : _Iter _First2, _Iter _Last2)
; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
; 1524 : _Myt _Right(_First2, _Last2);
; 1525 : replace(_First, _Last, _Right);
; 1526 : return (*this);
; 1527 : }
; 1528 :
; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1530 : const_pointer _First2, const_pointer _Last2)
; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1532 : if (_First2 == _Last2)
; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1534 : else
; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1536 : &*_First2, _Last2 - _First2);
; 1537 : return (*this);
; 1538 : }
; 1539 :
; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1541 : pointer _First2, pointer _Last2)
; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1543 : if (_First2 == _Last2)
; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1545 : else
; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1547 : &*_First2, _Last2 - _First2);
; 1548 : return (*this);
; 1549 : }
; 1550 :
; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1552 : const_iterator _First2, const_iterator _Last2)
; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1554 : if (_First2 == _Last2)
; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1556 : else
; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1558 : &*_First2, _Last2 - _First2);
; 1559 : return (*this);
; 1560 : }
; 1561 :
; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1563 : iterator _First2, iterator _Last2)
; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1565 : if (_First2 == _Last2)
; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1567 : else
; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1569 : &*_First2, _Last2 - _First2);
; 1570 : return (*this);
; 1571 : }
; 1572 :
; 1573 : iterator begin() _NOEXCEPT
; 1574 : { // return iterator for beginning of mutable sequence
; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
; 1576 : }
; 1577 :
; 1578 : const_iterator begin() const _NOEXCEPT
; 1579 : { // return iterator for beginning of nonmutable sequence
; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
; 1581 : }
; 1582 :
; 1583 : iterator end() _NOEXCEPT
; 1584 : { // return iterator for end of mutable sequence
; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
; 1586 : }
; 1587 :
; 1588 : const_iterator end() const _NOEXCEPT
; 1589 : { // return iterator for end of nonmutable sequence
; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
; 1591 : }
; 1592 :
; 1593 : reverse_iterator rbegin() _NOEXCEPT
; 1594 : { // return iterator for beginning of reversed mutable sequence
; 1595 : return (reverse_iterator(end()));
; 1596 : }
; 1597 :
; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
; 1599 : { // return iterator for beginning of reversed nonmutable sequence
; 1600 : return (const_reverse_iterator(end()));
; 1601 : }
; 1602 :
; 1603 : reverse_iterator rend() _NOEXCEPT
; 1604 : { // return iterator for end of reversed mutable sequence
; 1605 : return (reverse_iterator(begin()));
; 1606 : }
; 1607 :
; 1608 : const_reverse_iterator rend() const _NOEXCEPT
; 1609 : { // return iterator for end of reversed nonmutable sequence
; 1610 : return (const_reverse_iterator(begin()));
; 1611 : }
; 1612 :
; 1613 : #if _HAS_CPP0X
; 1614 : const_iterator cbegin() const _NOEXCEPT
; 1615 : { // return iterator for beginning of nonmutable sequence
; 1616 : return (((const _Myt *)this)->begin());
; 1617 : }
; 1618 :
; 1619 : const_iterator cend() const _NOEXCEPT
; 1620 : { // return iterator for end of nonmutable sequence
; 1621 : return (((const _Myt *)this)->end());
; 1622 : }
; 1623 :
; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
; 1625 : { // return iterator for beginning of reversed nonmutable sequence
; 1626 : return (((const _Myt *)this)->rbegin());
; 1627 : }
; 1628 :
; 1629 : const_reverse_iterator crend() const _NOEXCEPT
; 1630 : { // return iterator for end of reversed nonmutable sequence
; 1631 : return (((const _Myt *)this)->rend());
; 1632 : }
; 1633 :
; 1634 : void shrink_to_fit()
; 1635 : { // reduce capacity
; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
; 1637 : { // worth shrinking, do it
; 1638 : _Myt _Tmp(*this);
; 1639 : swap(_Tmp);
; 1640 : }
; 1641 : }
; 1642 : #endif /* _HAS_CPP0X */
; 1643 :
; 1644 : reference at(size_type _Off)
; 1645 : { // subscript mutable sequence with checking
; 1646 : if (this->_Mysize <= _Off)
; 1647 : _Xran(); // _Off off end
; 1648 : return (this->_Myptr()[_Off]);
; 1649 : }
; 1650 :
; 1651 : const_reference at(size_type _Off) const
; 1652 : { // subscript nonmutable sequence with checking
; 1653 : if (this->_Mysize <= _Off)
; 1654 : _Xran(); // _Off off end
; 1655 : return (this->_Myptr()[_Off]);
; 1656 : }
; 1657 :
; 1658 : reference operator[](size_type _Off)
; 1659 : { // subscript mutable sequence
; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1661 : if (this->_Mysize < _Off) // sic
; 1662 : _DEBUG_ERROR("string subscript out of range");
; 1663 :
; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1667 :
; 1668 : return (this->_Myptr()[_Off]);
; 1669 : }
; 1670 :
; 1671 : const_reference operator[](size_type _Off) const
; 1672 : { // subscript nonmutable sequence
; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1674 : if (this->_Mysize < _Off) // sic
; 1675 : _DEBUG_ERROR("string subscript out of range");
; 1676 :
; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1680 :
; 1681 : return (this->_Myptr()[_Off]);
; 1682 : }
; 1683 :
; 1684 : void push_back(_Elem _Ch)
; 1685 : { // insert element at end
; 1686 : insert(end(), _Ch);
; 1687 : }
; 1688 :
; 1689 : #if _HAS_CPP0X
; 1690 : void pop_back()
; 1691 : { // erase element at end
; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
; 1693 : }
; 1694 :
; 1695 : reference front()
; 1696 : { // return first element of mutable sequence
; 1697 : return (*begin());
; 1698 : }
; 1699 :
; 1700 : const_reference front() const
; 1701 : { // return first element of nonmutable sequence
; 1702 : return (*begin());
; 1703 : }
; 1704 :
; 1705 : reference back()
; 1706 : { // return last element of mutable sequence
; 1707 : return (*(end() - 1));
; 1708 : }
; 1709 :
; 1710 : const_reference back() const
; 1711 : { // return last element of nonmutable sequence
; 1712 : return (*(end() - 1));
; 1713 : }
; 1714 : #endif /* _HAS_CPP0X */
; 1715 :
; 1716 : const _Elem *c_str() const _NOEXCEPT
; 1717 : { // return pointer to null-terminated nonmutable array
; 1718 : return (this->_Myptr());
; 1719 : }
; 1720 :
; 1721 : const _Elem *data() const _NOEXCEPT
; 1722 : { // return pointer to nonmutable array
; 1723 : return (c_str());
; 1724 : }
; 1725 :
; 1726 : size_type length() const _NOEXCEPT
; 1727 : { // return length of sequence
; 1728 : return (this->_Mysize);
; 1729 : }
; 1730 :
; 1731 : size_type size() const _NOEXCEPT
; 1732 : { // return length of sequence
; 1733 : return (this->_Mysize);
; 1734 : }
; 1735 :
; 1736 : size_type max_size() const _NOEXCEPT
; 1737 : { // return maximum possible length of sequence
; 1738 : size_type _Num = this->_Getal().max_size();
; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
; 1740 : }
; 1741 :
; 1742 : void resize(size_type _Newsize)
; 1743 : { // determine new length, padding with null elements as needed
; 1744 : resize(_Newsize, _Elem());
; 1745 : }
; 1746 :
; 1747 : void resize(size_type _Newsize, _Elem _Ch)
; 1748 : { // determine new length, padding with _Ch elements as needed
; 1749 : if (_Newsize <= this->_Mysize)
; 1750 : _Eos(_Newsize);
; 1751 : else
; 1752 : append(_Newsize - this->_Mysize, _Ch);
; 1753 : }
; 1754 :
; 1755 : size_type capacity() const _NOEXCEPT
; 1756 : { // return current length of allocated storage
; 1757 : return (this->_Myres);
; 1758 : }
; 1759 :
; 1760 : void reserve(size_type _Newcap = 0)
; 1761 : { // determine new minimum length of allocated storage
; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
; 1763 : { // change reservation
; 1764 : size_type _Size = this->_Mysize;
; 1765 : if (_Grow(_Newcap, true))
; 1766 : _Eos(_Size);
; 1767 : }
; 1768 : }
; 1769 :
; 1770 : bool empty() const _NOEXCEPT
; 1771 : { // test if sequence is empty
; 1772 : return (this->_Mysize == 0);
; 1773 : }
; 1774 :
; 1775 : _SCL_INSECURE_DEPRECATE
; 1776 :
; 1777 : size_type copy(_Elem *_Ptr,
; 1778 : size_type _Count, size_type _Off = 0) const
; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1781 : if (_Count != 0)
; 1782 : _DEBUG_POINTER(_Ptr);
; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1784 :
; 1785 : if (this->_Mysize < _Off)
; 1786 : _Xran(); // _Off off end
; 1787 : if (this->_Mysize - _Off < _Count)
; 1788 : _Count = this->_Mysize - _Off;
; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
; 1790 : return (_Count);
; 1791 : }
; 1792 :
; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
; 1794 : size_type _Count, size_type _Off = 0) const
; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1797 : if (_Count != 0)
; 1798 : _DEBUG_POINTER(_Dest);
; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1800 :
; 1801 : if (this->_Mysize < _Off)
; 1802 : _Xran(); // _Off off end
; 1803 : if (this->_Mysize - _Off < _Count)
; 1804 : _Count = this->_Mysize - _Off;
; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
; 1806 : return (_Count);
; 1807 : }
; 1808 :
; 1809 : void _Swap_bx(_Myt& _Right)
; 1810 : { // exchange _Bx with _Right._Bx
; 1811 : if (this->_BUF_SIZE <= this->_Myres)
; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
; 1814 : else
; 1815 : { // swap large with small
; 1816 : pointer _Ptr = this->_Bx._Ptr;
; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
; 1818 : _Traits::copy(this->_Bx._Buf,
; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
; 1821 : }
; 1822 : else
; 1823 : if (_Right._Myres < this->_BUF_SIZE)
; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
; 1825 : else
; 1826 : { // swap small with large
; 1827 : pointer _Ptr = _Right._Bx._Ptr;
; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
; 1829 : _Traits::copy(_Right._Bx._Buf,
; 1830 : this->_Bx._Buf, this->_Mysize + 1);
; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 1832 : }
; 1833 : }
; 1834 :
; 1835 : void swap(_Myt& _Right)
; 1836 : { // exchange contents with _Right
; 1837 : if (this == &_Right)
; 1838 : ; // same object, do nothing
; 1839 : else if (this->_Getal() == _Right._Getal())
; 1840 : { // same allocator, swap control information
; 1841 : this->_Swap_all(_Right);
; 1842 : _Swap_bx(_Right);
; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
; 1844 : _STD swap(this->_Myres, _Right._Myres);
; 1845 : }
; 1846 :
; 1847 : #if _HAS_CPP0X
; 1848 : else if (_Alty::propagate_on_container_swap::value)
; 1849 : { // swap allocators and control information
; 1850 : this->_Swap_alloc(_Right);
; 1851 : _Swap_bx(_Right);
; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
; 1854 : _STD swap(this->_Myres, _Right._Myres);
; 1855 : }
; 1856 : #endif /* _HAS_CPP0X */
; 1857 :
; 1858 : else
; 1859 : { // different allocator, do multiple assigns
; 1860 : _Myt _Tmp = *this;
; 1861 :
; 1862 : *this = _Right;
; 1863 : _Right = _Tmp;
; 1864 : }
; 1865 : }
; 1866 :
; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
; 1868 : { // look for _Right beginning at or after _Off
; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
; 1870 : }
; 1871 :
; 1872 : size_type find(const _Elem *_Ptr,
; 1873 : size_type _Off, size_type _Count) const
; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1876 : if (_Count != 0)
; 1877 : _DEBUG_POINTER(_Ptr);
; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1879 :
; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
; 1881 : return (_Off); // null string always matches (if inside string)
; 1882 :
; 1883 : size_type _Nm;
; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
; 1885 : { // room for match, look for it
; 1886 : const _Elem *_Uptr, *_Vptr;
; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1891 : return (_Uptr - this->_Myptr()); // found a match
; 1892 : }
; 1893 :
; 1894 : return (npos); // no match
; 1895 : }
; 1896 :
; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
; 1899 : _DEBUG_POINTER(_Ptr);
; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
; 1901 : }
; 1902 :
; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
; 1904 : { // look for _Ch at or after _Off
; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1906 : }
; 1907 :
; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
; 1909 : { // look for _Right beginning before _Off
; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
; 1911 : }
; 1912 :
; 1913 : size_type rfind(const _Elem *_Ptr,
; 1914 : size_type _Off, size_type _Count) const
; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1917 : if (_Count != 0)
; 1918 : _DEBUG_POINTER(_Ptr);
; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1920 :
; 1921 : if (_Count == 0)
; 1922 : return (_Off < this->_Mysize ? _Off
; 1923 : : this->_Mysize); // null always matches
; 1924 : if (_Count <= this->_Mysize)
; 1925 : { // room for match, look for it
; 1926 : const _Elem *_Uptr = this->_Myptr() +
; 1927 : (_Off < this->_Mysize - _Count ? _Off
; 1928 : : this->_Mysize - _Count);
; 1929 : for (; ; --_Uptr)
; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1932 : return (_Uptr - this->_Myptr()); // found a match
; 1933 : else if (_Uptr == this->_Myptr())
; 1934 : break; // at beginning, no more chance for match
; 1935 : }
; 1936 :
; 1937 : return (npos); // no match
; 1938 : }
; 1939 :
; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
; 1941 : { // look for [_Ptr, <null>) beginning before _Off
; 1942 : _DEBUG_POINTER(_Ptr);
; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
; 1944 : }
; 1945 :
; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
; 1947 : { // look for _Ch before _Off
; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 1949 : }
; 1950 :
; 1951 : size_type find_first_of(const _Myt& _Right,
; 1952 : size_type _Off = 0) const _NOEXCEPT
; 1953 : { // look for one of _Right at or after _Off
; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
; 1955 : }
; 1956 :
; 1957 : size_type find_first_of(const _Elem *_Ptr,
; 1958 : size_type _Off, size_type _Count) const
; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1961 : if (_Count != 0)
; 1962 : _DEBUG_POINTER(_Ptr);
; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1964 :
; 1965 : if (0 < _Count && _Off < this->_Mysize)
; 1966 : { // room for match, look for it
; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 1969 : _Uptr < _Vptr; ++_Uptr)
; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 1971 : return (_Uptr - this->_Myptr()); // found a match
; 1972 : }
; 1973 :
; 1974 : return (npos); // no match
; 1975 : }
; 1976 :
; 1977 : size_type find_first_of(const _Elem *_Ptr,
; 1978 : size_type _Off = 0) const
; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
; 1980 : _DEBUG_POINTER(_Ptr);
; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 1982 : }
; 1983 :
; 1984 : size_type find_first_of(_Elem _Ch,
; 1985 : size_type _Off = 0) const
; 1986 : { // look for _Ch at or after _Off
; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1988 : }
; 1989 :
; 1990 : size_type find_last_of(const _Myt& _Right,
; 1991 : size_type _Off = npos) const _NOEXCEPT
; 1992 : { // look for one of _Right before _Off
; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
; 1994 : }
; 1995 :
; 1996 : size_type find_last_of(const _Elem *_Ptr,
; 1997 : size_type _Off, size_type _Count) const
; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2000 : if (_Count != 0)
; 2001 : _DEBUG_POINTER(_Ptr);
; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2003 :
; 2004 : if (0 < _Count && 0 < this->_Mysize)
; 2005 : { // worth searching, do it
; 2006 : const _Elem *_Uptr = this->_Myptr()
; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2008 : for (; ; --_Uptr)
; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 2010 : return (_Uptr - this->_Myptr()); // found a match
; 2011 : else if (_Uptr == this->_Myptr())
; 2012 : break; // at beginning, no more chance for match
; 2013 : }
; 2014 :
; 2015 : return (npos); // no match
; 2016 : }
; 2017 :
; 2018 : size_type find_last_of(const _Elem *_Ptr,
; 2019 : size_type _Off = npos) const
; 2020 : { // look for one of [_Ptr, <null>) before _Off
; 2021 : _DEBUG_POINTER(_Ptr);
; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2023 : }
; 2024 :
; 2025 : size_type find_last_of(_Elem _Ch,
; 2026 : size_type _Off = npos) const
; 2027 : { // look for _Ch before _Off
; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 2029 : }
; 2030 :
; 2031 : size_type find_first_not_of(const _Myt& _Right,
; 2032 : size_type _Off = 0) const _NOEXCEPT
; 2033 : { // look for none of _Right at or after _Off
; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
; 2035 : _Right.size()));
; 2036 : }
; 2037 :
; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
; 2039 : size_type _Off, size_type _Count) const
; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2042 : if (_Count != 0)
; 2043 : _DEBUG_POINTER(_Ptr);
; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2045 :
; 2046 : if (_Off < this->_Mysize)
; 2047 : { // room for match, look for it
; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 2050 : _Uptr < _Vptr; ++_Uptr)
; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2052 : return (_Uptr - this->_Myptr());
; 2053 : }
; 2054 : return (npos);
; 2055 : }
; 2056 :
; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
; 2058 : size_type _Off = 0) const
; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
; 2060 : _DEBUG_POINTER(_Ptr);
; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2062 : }
; 2063 :
; 2064 : size_type find_first_not_of(_Elem _Ch,
; 2065 : size_type _Off = 0) const
; 2066 : { // look for non _Ch at or after _Off
; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
; 2068 : }
; 2069 :
; 2070 : size_type find_last_not_of(const _Myt& _Right,
; 2071 : size_type _Off = npos) const _NOEXCEPT
; 2072 : { // look for none of _Right before _Off
; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
; 2074 : }
; 2075 :
; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
; 2077 : size_type _Off, size_type _Count) const
; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2080 : if (_Count != 0)
; 2081 : _DEBUG_POINTER(_Ptr);
; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2083 :
; 2084 : if (0 < this->_Mysize)
; 2085 : { // worth searching, do it
; 2086 : const _Elem *_Uptr = this->_Myptr()
; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2088 : for (; ; --_Uptr)
; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2090 : return (_Uptr - this->_Myptr());
; 2091 : else if (_Uptr == this->_Myptr())
; 2092 : break;
; 2093 : }
; 2094 : return (npos);
; 2095 : }
; 2096 :
; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
; 2098 : size_type _Off = npos) const
; 2099 : { // look for none of [_Ptr, <null>) before _Off
; 2100 : _DEBUG_POINTER(_Ptr);
; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2102 : }
; 2103 :
; 2104 : size_type find_last_not_of(_Elem _Ch,
; 2105 : size_type _Off = npos) const
; 2106 : { // look for non _Ch before _Off
; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
; 2108 : }
; 2109 :
; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
; 2111 : { // return [_Off, _Off + _Count) as new string
; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
; 2113 : }
; 2114 :
; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
; 2116 : { // compare [0, _Mysize) with _Right
; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
; 2118 : }
; 2119 :
; 2120 : int compare(size_type _Off, size_type _N0,
; 2121 : const _Myt& _Right) const
; 2122 : { // compare [_Off, _Off + _N0) with _Right
; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
; 2124 : }
; 2125 :
; 2126 : int compare(size_type _Off,
; 2127 : size_type _N0, const _Myt& _Right,
; 2128 : size_type _Roff, size_type _Count) const
; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 2130 : if (_Right.size() < _Roff)
; 2131 : _Xran(); // _Off off end
; 2132 : if (_Right._Mysize - _Roff < _Count)
; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
; 2135 : }
; 2136 :
; 2137 : int compare(const _Elem *_Ptr) const
; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
; 2139 : _DEBUG_POINTER(_Ptr);
; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
; 2141 : }
; 2142 :
; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
; 2145 : _DEBUG_POINTER(_Ptr);
; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 2147 : }
; 2148 :
; 2149 : int compare(size_type _Off,
; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2153 : if (_Count != 0)
; 2154 : _DEBUG_POINTER(_Ptr);
; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2156 :
; 2157 : if (this->_Mysize < _Off)
; 2158 : _Xran(); // _Off off end
; 2159 : if (this->_Mysize - _Off < _N0)
; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 2161 :
; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
; 2163 : _N0 < _Count ? _N0 : _Count);
; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
; 2165 : : _N0 == _Count ? 0 : +1);
; 2166 : }
; 2167 :
; 2168 : allocator_type get_allocator() const _NOEXCEPT
; 2169 : { // return allocator object for values
; 2170 : return (this->_Getal());
; 2171 : }
; 2172 :
; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
; 2174 : { // assign _Count copies of _Ch beginning at _Off
; 2175 : if (_Count == 1)
; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
; 2177 : else
; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
; 2179 : }
; 2180 :
; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
; 2182 : { // copy _Oldlen elements to newly allocated buffer
; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
; 2184 : if (max_size() < _Newres)
; 2185 : _Newres = _Newsize; // undo roundup if too big
; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
; 2187 : ;
; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
; 2189 : _Newres = this->_Myres
; 2190 : + this->_Myres / 2; // grow exponentially if possible
; 2191 : else
; 2192 : _Newres = max_size(); // settle for max_size()
; 2193 :
; 2194 : _Elem *_Ptr;
; 2195 : _TRY_BEGIN
; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2197 : _CATCH_ALL
; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
; 2199 : _TRY_BEGIN
; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2201 : _CATCH_ALL
; 2202 : _Tidy(true); // failed again, discard storage and reraise
; 2203 : _RERAISE;
; 2204 : _CATCH_END
; 2205 : _CATCH_END
; 2206 :
; 2207 : if (0 < _Oldlen)
; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
; 2209 : _Oldlen); // copy existing elements
; 2210 : _Tidy(true);
; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 2212 : this->_Myres = _Newres;
; 2213 : _Eos(_Oldlen);
; 2214 : }
; 2215 :
; 2216 : void _Eos(size_type _Newsize)
; 2217 : { // set new length and null terminator
; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
mov DWORD PTR [esi+16], 0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 564 : _Left = _Right;
mov BYTE PTR [esi], 0
pop esi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 965 : }
ret 0
??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ ENDP ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ??0?$vector@HV?$allocator@H@std@@@std@@QAE@XZ
_TEXT SEGMENT
??0?$vector@HV?$allocator@H@std@@@std@@QAE@XZ PROC ; std::vector<int,std::allocator<int> >::vector<int,std::allocator<int> >, COMDAT
; _this$ = ecx
; 486 : _Myfirst = pointer();
mov DWORD PTR [ecx], 0
; 487 : _Mylast = pointer();
mov DWORD PTR [ecx+4], 0
; 488 : _Myend = pointer();
mov DWORD PTR [ecx+8], 0
; 686 : }
mov eax, ecx
ret 0
??0?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ENDP ; std::vector<int,std::allocator<int> >::vector<int,std::allocator<int> >
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ
_TEXT SEGMENT
??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ PROC ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >, COMDAT
; _this$ = ecx
; 899 : { // destroy the object
push esi
mov esi, ecx
; 902 :
; 903 : _Myt& operator=(const _Myt& _Right)
; 904 : { // assign _Right
; 905 : if (this != &_Right)
; 906 : { // different, assign it
; 907 : #if _HAS_CPP0X
; 908 : if (this->_Getal() != _Right._Getal()
; 909 : && _Alty::propagate_on_container_copy_assignment::value)
; 910 : { // change allocator before copying
; 911 : _Tidy();
; 912 : this->_Change_alloc(_Right._Getal());
; 913 : }
; 914 : #endif /* _HAS_CPP0X */
; 915 :
; 916 : this->_Orphan_all();
; 917 :
; 918 : if (_Right.empty())
; 919 : clear(); // new sequence empty, erase existing sequence
; 920 : else if (_Right.size() <= size())
; 921 : { // enough elements, copy new and destroy old
; 922 : pointer _Ptr = _Copy_impl(_Right._Myfirst,
; 923 : _Right._Mylast, this->_Myfirst); // copy new
; 924 : _Destroy(_Ptr, this->_Mylast); // destroy old
; 925 : this->_Mylast = this->_Myfirst + _Right.size();
; 926 : }
; 927 : else if (_Right.size() <= capacity())
; 928 : { // enough room, copy and construct new
; 929 : pointer _Ptr = _Right._Myfirst + size();
; 930 : _Copy_impl(_Right._Myfirst,
; 931 : _Ptr, this->_Myfirst);
; 932 : this->_Mylast = _Ucopy(_Ptr, _Right._Mylast, this->_Mylast);
; 933 : }
; 934 : else
; 935 : { // not enough room, allocate new array and construct new
; 936 : if (this->_Myfirst != pointer())
; 937 : { // discard old array
; 938 : _Destroy(this->_Myfirst, this->_Mylast);
; 939 : this->_Getal().deallocate(this->_Myfirst,
; 940 : this->_Myend - this->_Myfirst);
; 941 : }
; 942 : if (_Buy(_Right.size()))
; 943 : _TRY_BEGIN
; 944 : this->_Mylast = _Ucopy(_Right._Myfirst, _Right._Mylast,
; 945 : this->_Myfirst);
; 946 : _CATCH_ALL
; 947 : _Tidy();
; 948 : _RERAISE;
; 949 : _CATCH_END
; 950 : }
; 951 : }
; 952 : return (*this);
; 953 : }
; 954 :
; 955 : void reserve(size_type _Count)
; 956 : { // determine new minimum length of allocated storage
; 957 : if (capacity() < _Count)
; 958 : { // something to do, check and reallocate
; 959 : if (max_size() < _Count)
; 960 : _Xlen();
; 961 : _Reallocate(_Count);
; 962 : }
; 963 : }
; 964 :
; 965 : size_type capacity() const _NOEXCEPT
; 966 : { // return current length of allocated storage
; 967 : return (this->_Myend - this->_Myfirst);
; 968 : }
; 969 :
; 970 : size_type _Unused_capacity() const _NOEXCEPT
; 971 : { // micro-optimization for capacity() - size()
; 972 : return (this->_Myend - this->_Mylast);
; 973 : }
; 974 :
; 975 : size_type _Has_unused_capacity() const _NOEXCEPT
; 976 : { // micro-optimization for capacity() != size()
; 977 : return (this->_Myend != this->_Mylast);
; 978 : }
; 979 :
; 980 : iterator begin() _NOEXCEPT
; 981 : { // return iterator for beginning of mutable sequence
; 982 : return (iterator(this->_Myfirst, this));
; 983 : }
; 984 :
; 985 : const_iterator begin() const _NOEXCEPT
; 986 : { // return iterator for beginning of nonmutable sequence
; 987 : return (const_iterator(this->_Myfirst, this));
; 988 : }
; 989 :
; 990 : iterator end() _NOEXCEPT
; 991 : { // return iterator for end of mutable sequence
; 992 : return (iterator(this->_Mylast, this));
; 993 : }
; 994 :
; 995 : const_iterator end() const _NOEXCEPT
; 996 : { // return iterator for end of nonmutable sequence
; 997 : return (const_iterator(this->_Mylast, this));
; 998 : }
; 999 :
; 1000 : iterator _Make_iter(const_iterator _Where) const
; 1001 : { // make iterator from const_iterator
; 1002 : return (iterator(_Where._Ptr, this));
; 1003 : }
; 1004 :
; 1005 : reverse_iterator rbegin() _NOEXCEPT
; 1006 : { // return iterator for beginning of reversed mutable sequence
; 1007 : return (reverse_iterator(end()));
; 1008 : }
; 1009 :
; 1010 : const_reverse_iterator rbegin() const _NOEXCEPT
; 1011 : { // return iterator for beginning of reversed nonmutable sequence
; 1012 : return (const_reverse_iterator(end()));
; 1013 : }
; 1014 :
; 1015 : reverse_iterator rend() _NOEXCEPT
; 1016 : { // return iterator for end of reversed mutable sequence
; 1017 : return (reverse_iterator(begin()));
; 1018 : }
; 1019 :
; 1020 : const_reverse_iterator rend() const _NOEXCEPT
; 1021 : { // return iterator for end of reversed nonmutable sequence
; 1022 : return (const_reverse_iterator(begin()));
; 1023 : }
; 1024 :
; 1025 : #if _HAS_CPP0X
; 1026 : const_iterator cbegin() const _NOEXCEPT
; 1027 : { // return iterator for beginning of nonmutable sequence
; 1028 : return (((const _Myt *)this)->begin());
; 1029 : }
; 1030 :
; 1031 : const_iterator cend() const _NOEXCEPT
; 1032 : { // return iterator for end of nonmutable sequence
; 1033 : return (((const _Myt *)this)->end());
; 1034 : }
; 1035 :
; 1036 : const_reverse_iterator crbegin() const _NOEXCEPT
; 1037 : { // return iterator for beginning of reversed nonmutable sequence
; 1038 : return (((const _Myt *)this)->rbegin());
; 1039 : }
; 1040 :
; 1041 : const_reverse_iterator crend() const _NOEXCEPT
; 1042 : { // return iterator for end of reversed nonmutable sequence
; 1043 : return (((const _Myt *)this)->rend());
; 1044 : }
; 1045 :
; 1046 : void shrink_to_fit()
; 1047 : { // reduce capacity
; 1048 : if (_Has_unused_capacity())
; 1049 : { // worth shrinking, do it
; 1050 : if (empty())
; 1051 : _Tidy();
; 1052 : else
; 1053 : _Reallocate(size());
; 1054 : }
; 1055 : }
; 1056 : #endif /* _HAS_CPP0X */
; 1057 :
; 1058 : void resize(size_type _Newsize)
; 1059 : { // determine new length, padding as needed
; 1060 : if (_Newsize < size())
; 1061 : erase(begin() + _Newsize, end());
; 1062 : else if (size() < _Newsize)
; 1063 : { // pad as needed
; 1064 : _Alty _Alval(this->_Getal());
; 1065 : _Reserve(_Newsize - size());
; 1066 : _TRY_BEGIN
; 1067 : _Uninitialized_default_fill_n(this->_Mylast, _Newsize - size(),
; 1068 : _Alval);
; 1069 : _CATCH_ALL
; 1070 : _Tidy();
; 1071 : _RERAISE;
; 1072 : _CATCH_END
; 1073 : this->_Mylast += _Newsize - size();
; 1074 : }
; 1075 : }
; 1076 :
; 1077 : void resize(size_type _Newsize, const value_type& _Val)
; 1078 : { // determine new length, padding with _Val elements as needed
; 1079 : if (_Newsize < size())
; 1080 : erase(begin() + _Newsize, end());
; 1081 : else if (size() < _Newsize)
; 1082 : _Insert_n(end(), _Newsize - size(), _Val);
; 1083 : }
; 1084 :
; 1085 : size_type size() const _NOEXCEPT
; 1086 : { // return length of sequence
; 1087 : return (this->_Mylast - this->_Myfirst);
; 1088 : }
; 1089 :
; 1090 : size_type max_size() const _NOEXCEPT
; 1091 : { // return maximum possible length of sequence
; 1092 : return (this->_Getal().max_size());
; 1093 : }
; 1094 :
; 1095 : bool empty() const _NOEXCEPT
; 1096 : { // test if sequence is empty
; 1097 : return (this->_Myfirst == this->_Mylast);
; 1098 : }
; 1099 :
; 1100 : _Alloc get_allocator() const _NOEXCEPT
; 1101 : { // return allocator object for values
; 1102 : return (this->_Getal());
; 1103 : }
; 1104 :
; 1105 : const_reference at(size_type _Pos) const
; 1106 : { // subscript nonmutable sequence with checking
; 1107 : if (size() <= _Pos)
; 1108 : _Xran();
; 1109 : return (*(this->_Myfirst + _Pos));
; 1110 : }
; 1111 :
; 1112 : reference at(size_type _Pos)
; 1113 : { // subscript mutable sequence with checking
; 1114 : if (size() <= _Pos)
; 1115 : _Xran();
; 1116 : return (*(this->_Myfirst + _Pos));
; 1117 : }
; 1118 :
; 1119 : const_reference operator[](size_type _Pos) const
; 1120 : { // subscript nonmutable sequence
; 1121 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1122 : if (size() <= _Pos)
; 1123 : { // report error
; 1124 : _DEBUG_ERROR("vector subscript out of range");
; 1125 : _SCL_SECURE_OUT_OF_RANGE;
; 1126 : }
; 1127 :
; 1128 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1129 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
; 1130 : #endif /* _ITERATOR_DEBUG_LEVEL */
; 1131 :
; 1132 : return (*(this->_Myfirst + _Pos));
; 1133 : }
; 1134 :
; 1135 : reference operator[](size_type _Pos)
; 1136 : { // subscript mutable sequence
; 1137 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1138 : if (size() <= _Pos)
; 1139 : { // report error
; 1140 : _DEBUG_ERROR("vector subscript out of range");
; 1141 : _SCL_SECURE_OUT_OF_RANGE;
; 1142 : }
; 1143 :
; 1144 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1145 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
; 1146 : #endif /* _ITERATOR_DEBUG_LEVEL */
; 1147 :
; 1148 : return (*(this->_Myfirst + _Pos));
; 1149 : }
; 1150 :
; 1151 : #if _HAS_CPP0X
; 1152 : pointer data() _NOEXCEPT
; 1153 : { // return address of first element
; 1154 : return (this->_Myfirst);
; 1155 : }
; 1156 :
; 1157 : const_pointer data() const _NOEXCEPT
; 1158 : { // return address of first element
; 1159 : return (this->_Myfirst);
; 1160 : }
; 1161 : #endif /* _HAS_CPP0X */
; 1162 :
; 1163 : reference front()
; 1164 : { // return first element of mutable sequence
; 1165 : return (*begin());
; 1166 : }
; 1167 :
; 1168 : const_reference front() const
; 1169 : { // return first element of nonmutable sequence
; 1170 : return (*begin());
; 1171 : }
; 1172 :
; 1173 : reference back()
; 1174 : { // return last element of mutable sequence
; 1175 : return (*(end() - 1));
; 1176 : }
; 1177 :
; 1178 : const_reference back() const
; 1179 : { // return last element of nonmutable sequence
; 1180 : return (*(end() - 1));
; 1181 : }
; 1182 :
; 1183 : void push_back(const value_type& _Val)
; 1184 : { // insert element at end
; 1185 : if (_Inside(_STD addressof(_Val)))
; 1186 : { // push back an element
; 1187 : size_type _Idx = _STD addressof(_Val) - this->_Myfirst;
; 1188 : if (this->_Mylast == this->_Myend)
; 1189 : _Reserve(1);
; 1190 : _Orphan_range(this->_Mylast, this->_Mylast);
; 1191 : this->_Getal().construct(this->_Mylast,
; 1192 : this->_Myfirst[_Idx]);
; 1193 : ++this->_Mylast;
; 1194 : }
; 1195 : else
; 1196 : { // push back a non-element
; 1197 : if (this->_Mylast == this->_Myend)
; 1198 : _Reserve(1);
; 1199 : _Orphan_range(this->_Mylast, this->_Mylast);
; 1200 : this->_Getal().construct(this->_Mylast,
; 1201 : _Val);
; 1202 : ++this->_Mylast;
; 1203 : }
; 1204 : }
; 1205 :
; 1206 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1207 : void pop_back()
; 1208 : { // erase element at end
; 1209 : if (empty())
; 1210 : _DEBUG_ERROR("vector empty before pop");
; 1211 : else
; 1212 : { // erase last element
; 1213 : _Orphan_range(this->_Mylast - 1, this->_Mylast);
; 1214 : this->_Getal().destroy(this->_Mylast - 1);
; 1215 : --this->_Mylast;
; 1216 : }
; 1217 : }
; 1218 :
; 1219 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1220 : void pop_back()
; 1221 : { // erase element at end
; 1222 : if (!empty())
; 1223 : { // erase last element
; 1224 : this->_Getal().destroy(this->_Mylast - 1);
; 1225 : --this->_Mylast;
; 1226 : }
; 1227 : }
; 1228 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1229 :
; 1230 : template<class _Iter>
; 1231 : typename enable_if<_Is_iterator<_Iter>::value,
; 1232 : void>::type
; 1233 : assign(_Iter _First, _Iter _Last)
; 1234 : { // assign [_First, _Last), input iterators
; 1235 : erase(begin(), end());
; 1236 : insert(begin(), _First, _Last);
; 1237 : }
; 1238 :
; 1239 : void assign(size_type _Count, const value_type& _Val)
; 1240 : { // assign _Count * _Val
; 1241 : _Assign_n(_Count, _Val);
; 1242 : }
; 1243 :
; 1244 : iterator insert(const_iterator _Where, const _Ty& _Val)
; 1245 : { // insert _Val at _Where
; 1246 : return (_Insert_n(_Where, (size_type)1, _Val));
; 1247 : }
; 1248 :
; 1249 : iterator insert(const_iterator _Where, size_type _Count,
; 1250 : const _Ty& _Val)
; 1251 : { // insert _Count * _Val at _Where
; 1252 : return (_Insert_n(_Where, _Count, _Val));
; 1253 : }
; 1254 :
; 1255 : template<class _Iter>
; 1256 : typename enable_if<_Is_iterator<_Iter>::value,
; 1257 : iterator>::type
; 1258 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1259 : { // insert [_First, _Last) at _Where
; 1260 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
; 1261 : _Insert(_Where, _First, _Last, _Iter_cat(_First));
; 1262 : return (begin() + _Off);
; 1263 : }
; 1264 :
; 1265 : template<class _Iter>
; 1266 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
; 1267 : input_iterator_tag)
; 1268 : { // insert [_First, _Last) at _Where, input iterators
; 1269 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
; 1270 :
; 1271 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1272 : if (size() < _Off)
; 1273 : _DEBUG_ERROR("vector insert iterator outside range");
; 1274 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1275 :
; 1276 : if (_First != _Last)
; 1277 : { // worth doing, gather at end and rotate into place
; 1278 : size_type _Oldsize = size();
; 1279 :
; 1280 : _TRY_BEGIN
; 1281 : for (; _First != _Last; ++_First)
; 1282 : push_back(*_First); // append
; 1283 :
; 1284 : _CATCH_ALL
; 1285 : erase(begin() + _Oldsize, end());
; 1286 : _RERAISE;
; 1287 : _CATCH_END
; 1288 :
; 1289 : _STD rotate(begin() + _Off, begin() + _Oldsize, end());
; 1290 : }
; 1291 : }
; 1292 :
; 1293 : template<class _Iter>
; 1294 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
; 1295 : forward_iterator_tag)
; 1296 : { // insert [_First, _Last) at _Where, forward iterators
; 1297 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1298 : if (_VICONT(_Where) != this
; 1299 : || _VIPTR(_Where) < this->_Myfirst
; 1300 : || this->_Mylast < _VIPTR(_Where))
; 1301 : _DEBUG_ERROR("vector insert iterator outside range");
; 1302 : _DEBUG_RANGE(_First, _Last);
; 1303 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1304 :
; 1305 : size_type _Count = 0;
; 1306 : _Distance(_First, _Last, _Count);
; 1307 :
; 1308 : if (_Count == 0)
; 1309 : ;
; 1310 : else if (_Unused_capacity() < _Count)
; 1311 : { // not enough room, reallocate
; 1312 : if (max_size() - size() < _Count)
; 1313 : _Xlen(); // result too long
; 1314 :
; 1315 : size_type _Capacity = _Grow_to(size() + _Count);
; 1316 : pointer _Newvec = this->_Getal().allocate(_Capacity);
; 1317 : pointer _Ptr = _Newvec;
; 1318 :
; 1319 : _TRY_BEGIN
; 1320 : _Ptr = _Umove(this->_Myfirst, _VIPTR(_Where),
; 1321 : _Newvec); // copy prefix
; 1322 : _Ptr = _Ucopy(_First, _Last, _Ptr); // add new stuff
; 1323 : _Umove(_VIPTR(_Where), this->_Mylast,
; 1324 : _Ptr); // copy suffix
; 1325 : _CATCH_ALL
; 1326 : _Destroy(_Newvec, _Ptr);
; 1327 : this->_Getal().deallocate(_Newvec, _Capacity);
; 1328 : _RERAISE;
; 1329 : _CATCH_END
; 1330 :
; 1331 : _Count += size();
; 1332 : if (this->_Myfirst != pointer())
; 1333 : { // destroy and deallocate old array
; 1334 : _Destroy(this->_Myfirst, this->_Mylast);
; 1335 : this->_Getal().deallocate(this->_Myfirst,
; 1336 : this->_Myend - this->_Myfirst);
; 1337 : }
; 1338 :
; 1339 : this->_Orphan_all();
; 1340 : this->_Myend = _Newvec + _Capacity;
; 1341 : this->_Mylast = _Newvec + _Count;
; 1342 : this->_Myfirst = _Newvec;
; 1343 : }
; 1344 : else
; 1345 : { // new stuff fits, append and rotate into place
; 1346 : _Ucopy(_First, _Last, this->_Mylast);
; 1347 : _STD rotate(_VIPTR(_Where), this->_Mylast,
; 1348 : this->_Mylast + _Count);
; 1349 : this->_Mylast += _Count;
; 1350 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
; 1351 : }
; 1352 : }
; 1353 :
; 1354 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1355 : iterator erase(const_iterator _Where)
; 1356 : { // erase element at where
; 1357 : if (_VICONT(_Where) != this
; 1358 : || _VIPTR(_Where) < this->_Myfirst
; 1359 : || this->_Mylast <= _VIPTR(_Where))
; 1360 : _DEBUG_ERROR("vector erase iterator outside range");
; 1361 : _Move(_VIPTR(_Where) + 1, this->_Mylast, _VIPTR(_Where));
; 1362 : _Destroy(this->_Mylast - 1, this->_Mylast);
; 1363 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
; 1364 : --this->_Mylast;
; 1365 : return (_Make_iter(_Where));
; 1366 : }
; 1367 :
; 1368 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1369 : iterator erase(const_iterator _Where)
; 1370 : { // erase element at where
; 1371 : _Move(_VIPTR(_Where) + 1, this->_Mylast,
; 1372 : _VIPTR(_Where));
; 1373 : _Destroy(this->_Mylast - 1, this->_Mylast);
; 1374 : --this->_Mylast;
; 1375 : return (_Make_iter(_Where));
; 1376 : }
; 1377 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1378 :
; 1379 : iterator erase(const_iterator _First_arg,
; 1380 : const_iterator _Last_arg)
; 1381 : { // erase [_First, _Last)
; 1382 : if (_First_arg == begin() && _Last_arg == end())
; 1383 : clear();
; 1384 : else if (_First_arg != _Last_arg)
; 1385 : { // clear partial
; 1386 : iterator _First = _Make_iter(_First_arg);
; 1387 : iterator _Last = _Make_iter(_Last_arg);
; 1388 :
; 1389 : if (_First != _Last)
; 1390 : { // worth doing, copy down over hole
; 1391 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1392 : if (_Last < _First || _VICONT(_First) != this
; 1393 : || _VIPTR(_First) < this->_Myfirst
; 1394 : || this->_Mylast < _VIPTR(_Last))
; 1395 : _DEBUG_ERROR("vector erase iterator outside range");
; 1396 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
; 1397 : _VIPTR(_First));
; 1398 : _Orphan_range(_VIPTR(_First), this->_Mylast);
; 1399 :
; 1400 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1401 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
; 1402 : _VIPTR(_First));
; 1403 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1404 :
; 1405 : _Destroy(_Ptr, this->_Mylast);
; 1406 : this->_Mylast = _Ptr;
; 1407 : }
; 1408 : }
; 1409 : return (_Make_iter(_First_arg));
; 1410 : }
; 1411 :
; 1412 : void clear() _NOEXCEPT
; 1413 : { // erase all
; 1414 : this->_Orphan_all();
; 1415 : _Destroy(this->_Myfirst, this->_Mylast);
; 1416 : this->_Mylast = this->_Myfirst;
; 1417 : }
; 1418 :
; 1419 : void swap(_Myt& _Right)
; 1420 : { // exchange contents with _Right
; 1421 : if (this == &_Right)
; 1422 : ; // same object, do nothing
; 1423 : else if (this->_Getal() == _Right._Getal())
; 1424 : { // same allocator, swap control information
; 1425 : this->_Swap_all(_Right);
; 1426 : _Swap_adl(this->_Myfirst, _Right._Myfirst);
; 1427 : _Swap_adl(this->_Mylast, _Right._Mylast);
; 1428 : _Swap_adl(this->_Myend, _Right._Myend);
; 1429 : }
; 1430 :
; 1431 : #if _HAS_CPP0X
; 1432 : else if (_Alty::propagate_on_container_swap::value)
; 1433 : { // swap allocators and control information
; 1434 : this->_Swap_alloc(_Right);
; 1435 : _Swap_adl(this->_Myfirst, _Right._Myfirst);
; 1436 : _Swap_adl(this->_Mylast, _Right._Mylast);
; 1437 : _Swap_adl(this->_Myend, _Right._Myend);
; 1438 : }
; 1439 : #endif /* _HAS_CPP0X */
; 1440 :
; 1441 : else
; 1442 : { // different allocator, do multiple moves
; 1443 : _Myt _Ts = _Move(*this);
; 1444 :
; 1445 : *this = _Move(_Right);
; 1446 : _Right = _Move(_Ts);
; 1447 : }
; 1448 : }
; 1449 :
; 1450 : protected:
; 1451 : void _Assign_n(size_type _Count, const value_type& _Val)
; 1452 : { // assign _Count * _Val
; 1453 : value_type _Tmp = _Val; // in case _Val is in sequence
; 1454 : erase(begin(), end());
; 1455 : insert(begin(), _Count, _Tmp);
; 1456 : }
; 1457 :
; 1458 : bool _Buy(size_type _Capacity)
; 1459 : { // allocate array with _Capacity elements
; 1460 : this->_Myfirst = pointer();
; 1461 : this->_Mylast = pointer();
; 1462 : this->_Myend = pointer();
; 1463 :
; 1464 : if (_Capacity == 0)
; 1465 : return (false);
; 1466 : else if (max_size() < _Capacity)
; 1467 : _Xlen(); // result too long
; 1468 : else
; 1469 : { // nonempty array, allocate storage
; 1470 : this->_Myfirst = this->_Getal().allocate(_Capacity);
; 1471 : this->_Mylast = this->_Myfirst;
; 1472 : this->_Myend = this->_Myfirst + _Capacity;
; 1473 : }
; 1474 : return (true);
; 1475 : }
; 1476 :
; 1477 : void _Destroy(pointer _First, pointer _Last)
; 1478 : { // destroy [_First, _Last) using allocator
; 1479 : _Alty _Alval(this->_Getal());
; 1480 : _Destroy_range(_First, _Last, _Alval);
; 1481 : }
; 1482 :
; 1483 : size_type _Grow_to(size_type _Count) const
; 1484 : { // grow by 50% or at least to _Count
; 1485 : size_type _Capacity = capacity();
; 1486 :
; 1487 : _Capacity = max_size() - _Capacity / 2 < _Capacity
; 1488 : ? 0 : _Capacity + _Capacity / 2; // try to grow by 50%
; 1489 : if (_Capacity < _Count)
; 1490 : _Capacity = _Count;
; 1491 : return (_Capacity);
; 1492 : }
; 1493 :
; 1494 : bool _Inside(const value_type *_Ptr) const
; 1495 : { // test if _Ptr points inside vector
; 1496 : return (_Ptr < this->_Mylast && this->_Myfirst <= _Ptr);
; 1497 : }
; 1498 :
; 1499 : void _Reallocate(size_type _Count)
; 1500 : { // move to array of exactly _Count elements
; 1501 : pointer _Ptr = this->_Getal().allocate(_Count);
; 1502 :
; 1503 : _TRY_BEGIN
; 1504 : _Umove(this->_Myfirst, this->_Mylast, _Ptr);
; 1505 : _CATCH_ALL
; 1506 : this->_Getal().deallocate(_Ptr, _Count);
; 1507 : _RERAISE;
; 1508 : _CATCH_END
; 1509 :
; 1510 : size_type _Size = size();
; 1511 : if (this->_Myfirst != pointer())
; 1512 : { // destroy and deallocate old array
; 1513 : _Destroy(this->_Myfirst, this->_Mylast);
; 1514 : this->_Getal().deallocate(this->_Myfirst,
; 1515 : this->_Myend - this->_Myfirst);
; 1516 : }
; 1517 :
; 1518 : this->_Orphan_all();
; 1519 : this->_Myend = _Ptr + _Count;
; 1520 : this->_Mylast = _Ptr + _Size;
; 1521 : this->_Myfirst = _Ptr;
; 1522 : }
; 1523 :
; 1524 : void _Reserve(size_type _Count)
; 1525 : { // ensure room for _Count new elements, grow exponentially
; 1526 : if (_Unused_capacity() < _Count)
; 1527 : { // need more room, try to get it
; 1528 : if (max_size() - size() < _Count)
; 1529 : _Xlen();
; 1530 : _Reallocate(_Grow_to(size() + _Count));
; 1531 : }
; 1532 : }
; 1533 :
; 1534 : void _Tidy()
; 1535 : { // free all storage
; 1536 : if (this->_Myfirst != pointer())
mov eax, DWORD PTR [esi]
test eax, eax
je SHORT $LN3@vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; 586 : ::operator delete(_Ptr);
push eax
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1542 : this->_Myfirst = pointer();
mov DWORD PTR [esi], 0
; 1543 : this->_Mylast = pointer();
mov DWORD PTR [esi+4], 0
; 1544 : this->_Myend = pointer();
mov DWORD PTR [esi+8], 0
$LN3@vector:
pop esi
; 900 : _Tidy();
; 901 : }
ret 0
??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ENDP ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ??0?$vector@NV?$allocator@N@std@@@std@@QAE@I@Z
_TEXT SEGMENT
__Count$ = 8 ; size = 4
??0?$vector@NV?$allocator@N@std@@@std@@QAE@I@Z PROC ; std::vector<double,std::allocator<double> >::vector<double,std::allocator<double> >, COMDAT
; _this$ = ecx
; 695 : { // construct from _Count * value_type()
push ebp
mov ebp, esp
push esi
; 696 : resize(_Count);
push DWORD PTR __Count$[ebp]
mov esi, ecx
; 486 : _Myfirst = pointer();
mov DWORD PTR [esi], 0
; 487 : _Mylast = pointer();
mov DWORD PTR [esi+4], 0
; 488 : _Myend = pointer();
mov DWORD PTR [esi+8], 0
; 696 : resize(_Count);
call ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ; std::vector<double,std::allocator<double> >::resize
; 697 : }
mov eax, esi
pop esi
pop ebp
ret 4
??0?$vector@NV?$allocator@N@std@@@std@@QAE@I@Z ENDP ; std::vector<double,std::allocator<double> >::vector<double,std::allocator<double> >
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ
_TEXT SEGMENT
??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ PROC ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >, COMDAT
; _this$ = ecx
; 899 : { // destroy the object
push esi
mov esi, ecx
; 902 :
; 903 : _Myt& operator=(const _Myt& _Right)
; 904 : { // assign _Right
; 905 : if (this != &_Right)
; 906 : { // different, assign it
; 907 : #if _HAS_CPP0X
; 908 : if (this->_Getal() != _Right._Getal()
; 909 : && _Alty::propagate_on_container_copy_assignment::value)
; 910 : { // change allocator before copying
; 911 : _Tidy();
; 912 : this->_Change_alloc(_Right._Getal());
; 913 : }
; 914 : #endif /* _HAS_CPP0X */
; 915 :
; 916 : this->_Orphan_all();
; 917 :
; 918 : if (_Right.empty())
; 919 : clear(); // new sequence empty, erase existing sequence
; 920 : else if (_Right.size() <= size())
; 921 : { // enough elements, copy new and destroy old
; 922 : pointer _Ptr = _Copy_impl(_Right._Myfirst,
; 923 : _Right._Mylast, this->_Myfirst); // copy new
; 924 : _Destroy(_Ptr, this->_Mylast); // destroy old
; 925 : this->_Mylast = this->_Myfirst + _Right.size();
; 926 : }
; 927 : else if (_Right.size() <= capacity())
; 928 : { // enough room, copy and construct new
; 929 : pointer _Ptr = _Right._Myfirst + size();
; 930 : _Copy_impl(_Right._Myfirst,
; 931 : _Ptr, this->_Myfirst);
; 932 : this->_Mylast = _Ucopy(_Ptr, _Right._Mylast, this->_Mylast);
; 933 : }
; 934 : else
; 935 : { // not enough room, allocate new array and construct new
; 936 : if (this->_Myfirst != pointer())
; 937 : { // discard old array
; 938 : _Destroy(this->_Myfirst, this->_Mylast);
; 939 : this->_Getal().deallocate(this->_Myfirst,
; 940 : this->_Myend - this->_Myfirst);
; 941 : }
; 942 : if (_Buy(_Right.size()))
; 943 : _TRY_BEGIN
; 944 : this->_Mylast = _Ucopy(_Right._Myfirst, _Right._Mylast,
; 945 : this->_Myfirst);
; 946 : _CATCH_ALL
; 947 : _Tidy();
; 948 : _RERAISE;
; 949 : _CATCH_END
; 950 : }
; 951 : }
; 952 : return (*this);
; 953 : }
; 954 :
; 955 : void reserve(size_type _Count)
; 956 : { // determine new minimum length of allocated storage
; 957 : if (capacity() < _Count)
; 958 : { // something to do, check and reallocate
; 959 : if (max_size() < _Count)
; 960 : _Xlen();
; 961 : _Reallocate(_Count);
; 962 : }
; 963 : }
; 964 :
; 965 : size_type capacity() const _NOEXCEPT
; 966 : { // return current length of allocated storage
; 967 : return (this->_Myend - this->_Myfirst);
; 968 : }
; 969 :
; 970 : size_type _Unused_capacity() const _NOEXCEPT
; 971 : { // micro-optimization for capacity() - size()
; 972 : return (this->_Myend - this->_Mylast);
; 973 : }
; 974 :
; 975 : size_type _Has_unused_capacity() const _NOEXCEPT
; 976 : { // micro-optimization for capacity() != size()
; 977 : return (this->_Myend != this->_Mylast);
; 978 : }
; 979 :
; 980 : iterator begin() _NOEXCEPT
; 981 : { // return iterator for beginning of mutable sequence
; 982 : return (iterator(this->_Myfirst, this));
; 983 : }
; 984 :
; 985 : const_iterator begin() const _NOEXCEPT
; 986 : { // return iterator for beginning of nonmutable sequence
; 987 : return (const_iterator(this->_Myfirst, this));
; 988 : }
; 989 :
; 990 : iterator end() _NOEXCEPT
; 991 : { // return iterator for end of mutable sequence
; 992 : return (iterator(this->_Mylast, this));
; 993 : }
; 994 :
; 995 : const_iterator end() const _NOEXCEPT
; 996 : { // return iterator for end of nonmutable sequence
; 997 : return (const_iterator(this->_Mylast, this));
; 998 : }
; 999 :
; 1000 : iterator _Make_iter(const_iterator _Where) const
; 1001 : { // make iterator from const_iterator
; 1002 : return (iterator(_Where._Ptr, this));
; 1003 : }
; 1004 :
; 1005 : reverse_iterator rbegin() _NOEXCEPT
; 1006 : { // return iterator for beginning of reversed mutable sequence
; 1007 : return (reverse_iterator(end()));
; 1008 : }
; 1009 :
; 1010 : const_reverse_iterator rbegin() const _NOEXCEPT
; 1011 : { // return iterator for beginning of reversed nonmutable sequence
; 1012 : return (const_reverse_iterator(end()));
; 1013 : }
; 1014 :
; 1015 : reverse_iterator rend() _NOEXCEPT
; 1016 : { // return iterator for end of reversed mutable sequence
; 1017 : return (reverse_iterator(begin()));
; 1018 : }
; 1019 :
; 1020 : const_reverse_iterator rend() const _NOEXCEPT
; 1021 : { // return iterator for end of reversed nonmutable sequence
; 1022 : return (const_reverse_iterator(begin()));
; 1023 : }
; 1024 :
; 1025 : #if _HAS_CPP0X
; 1026 : const_iterator cbegin() const _NOEXCEPT
; 1027 : { // return iterator for beginning of nonmutable sequence
; 1028 : return (((const _Myt *)this)->begin());
; 1029 : }
; 1030 :
; 1031 : const_iterator cend() const _NOEXCEPT
; 1032 : { // return iterator for end of nonmutable sequence
; 1033 : return (((const _Myt *)this)->end());
; 1034 : }
; 1035 :
; 1036 : const_reverse_iterator crbegin() const _NOEXCEPT
; 1037 : { // return iterator for beginning of reversed nonmutable sequence
; 1038 : return (((const _Myt *)this)->rbegin());
; 1039 : }
; 1040 :
; 1041 : const_reverse_iterator crend() const _NOEXCEPT
; 1042 : { // return iterator for end of reversed nonmutable sequence
; 1043 : return (((const _Myt *)this)->rend());
; 1044 : }
; 1045 :
; 1046 : void shrink_to_fit()
; 1047 : { // reduce capacity
; 1048 : if (_Has_unused_capacity())
; 1049 : { // worth shrinking, do it
; 1050 : if (empty())
; 1051 : _Tidy();
; 1052 : else
; 1053 : _Reallocate(size());
; 1054 : }
; 1055 : }
; 1056 : #endif /* _HAS_CPP0X */
; 1057 :
; 1058 : void resize(size_type _Newsize)
; 1059 : { // determine new length, padding as needed
; 1060 : if (_Newsize < size())
; 1061 : erase(begin() + _Newsize, end());
; 1062 : else if (size() < _Newsize)
; 1063 : { // pad as needed
; 1064 : _Alty _Alval(this->_Getal());
; 1065 : _Reserve(_Newsize - size());
; 1066 : _TRY_BEGIN
; 1067 : _Uninitialized_default_fill_n(this->_Mylast, _Newsize - size(),
; 1068 : _Alval);
; 1069 : _CATCH_ALL
; 1070 : _Tidy();
; 1071 : _RERAISE;
; 1072 : _CATCH_END
; 1073 : this->_Mylast += _Newsize - size();
; 1074 : }
; 1075 : }
; 1076 :
; 1077 : void resize(size_type _Newsize, const value_type& _Val)
; 1078 : { // determine new length, padding with _Val elements as needed
; 1079 : if (_Newsize < size())
; 1080 : erase(begin() + _Newsize, end());
; 1081 : else if (size() < _Newsize)
; 1082 : _Insert_n(end(), _Newsize - size(), _Val);
; 1083 : }
; 1084 :
; 1085 : size_type size() const _NOEXCEPT
; 1086 : { // return length of sequence
; 1087 : return (this->_Mylast - this->_Myfirst);
; 1088 : }
; 1089 :
; 1090 : size_type max_size() const _NOEXCEPT
; 1091 : { // return maximum possible length of sequence
; 1092 : return (this->_Getal().max_size());
; 1093 : }
; 1094 :
; 1095 : bool empty() const _NOEXCEPT
; 1096 : { // test if sequence is empty
; 1097 : return (this->_Myfirst == this->_Mylast);
; 1098 : }
; 1099 :
; 1100 : _Alloc get_allocator() const _NOEXCEPT
; 1101 : { // return allocator object for values
; 1102 : return (this->_Getal());
; 1103 : }
; 1104 :
; 1105 : const_reference at(size_type _Pos) const
; 1106 : { // subscript nonmutable sequence with checking
; 1107 : if (size() <= _Pos)
; 1108 : _Xran();
; 1109 : return (*(this->_Myfirst + _Pos));
; 1110 : }
; 1111 :
; 1112 : reference at(size_type _Pos)
; 1113 : { // subscript mutable sequence with checking
; 1114 : if (size() <= _Pos)
; 1115 : _Xran();
; 1116 : return (*(this->_Myfirst + _Pos));
; 1117 : }
; 1118 :
; 1119 : const_reference operator[](size_type _Pos) const
; 1120 : { // subscript nonmutable sequence
; 1121 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1122 : if (size() <= _Pos)
; 1123 : { // report error
; 1124 : _DEBUG_ERROR("vector subscript out of range");
; 1125 : _SCL_SECURE_OUT_OF_RANGE;
; 1126 : }
; 1127 :
; 1128 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1129 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
; 1130 : #endif /* _ITERATOR_DEBUG_LEVEL */
; 1131 :
; 1132 : return (*(this->_Myfirst + _Pos));
; 1133 : }
; 1134 :
; 1135 : reference operator[](size_type _Pos)
; 1136 : { // subscript mutable sequence
; 1137 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1138 : if (size() <= _Pos)
; 1139 : { // report error
; 1140 : _DEBUG_ERROR("vector subscript out of range");
; 1141 : _SCL_SECURE_OUT_OF_RANGE;
; 1142 : }
; 1143 :
; 1144 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1145 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
; 1146 : #endif /* _ITERATOR_DEBUG_LEVEL */
; 1147 :
; 1148 : return (*(this->_Myfirst + _Pos));
; 1149 : }
; 1150 :
; 1151 : #if _HAS_CPP0X
; 1152 : pointer data() _NOEXCEPT
; 1153 : { // return address of first element
; 1154 : return (this->_Myfirst);
; 1155 : }
; 1156 :
; 1157 : const_pointer data() const _NOEXCEPT
; 1158 : { // return address of first element
; 1159 : return (this->_Myfirst);
; 1160 : }
; 1161 : #endif /* _HAS_CPP0X */
; 1162 :
; 1163 : reference front()
; 1164 : { // return first element of mutable sequence
; 1165 : return (*begin());
; 1166 : }
; 1167 :
; 1168 : const_reference front() const
; 1169 : { // return first element of nonmutable sequence
; 1170 : return (*begin());
; 1171 : }
; 1172 :
; 1173 : reference back()
; 1174 : { // return last element of mutable sequence
; 1175 : return (*(end() - 1));
; 1176 : }
; 1177 :
; 1178 : const_reference back() const
; 1179 : { // return last element of nonmutable sequence
; 1180 : return (*(end() - 1));
; 1181 : }
; 1182 :
; 1183 : void push_back(const value_type& _Val)
; 1184 : { // insert element at end
; 1185 : if (_Inside(_STD addressof(_Val)))
; 1186 : { // push back an element
; 1187 : size_type _Idx = _STD addressof(_Val) - this->_Myfirst;
; 1188 : if (this->_Mylast == this->_Myend)
; 1189 : _Reserve(1);
; 1190 : _Orphan_range(this->_Mylast, this->_Mylast);
; 1191 : this->_Getal().construct(this->_Mylast,
; 1192 : this->_Myfirst[_Idx]);
; 1193 : ++this->_Mylast;
; 1194 : }
; 1195 : else
; 1196 : { // push back a non-element
; 1197 : if (this->_Mylast == this->_Myend)
; 1198 : _Reserve(1);
; 1199 : _Orphan_range(this->_Mylast, this->_Mylast);
; 1200 : this->_Getal().construct(this->_Mylast,
; 1201 : _Val);
; 1202 : ++this->_Mylast;
; 1203 : }
; 1204 : }
; 1205 :
; 1206 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1207 : void pop_back()
; 1208 : { // erase element at end
; 1209 : if (empty())
; 1210 : _DEBUG_ERROR("vector empty before pop");
; 1211 : else
; 1212 : { // erase last element
; 1213 : _Orphan_range(this->_Mylast - 1, this->_Mylast);
; 1214 : this->_Getal().destroy(this->_Mylast - 1);
; 1215 : --this->_Mylast;
; 1216 : }
; 1217 : }
; 1218 :
; 1219 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1220 : void pop_back()
; 1221 : { // erase element at end
; 1222 : if (!empty())
; 1223 : { // erase last element
; 1224 : this->_Getal().destroy(this->_Mylast - 1);
; 1225 : --this->_Mylast;
; 1226 : }
; 1227 : }
; 1228 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1229 :
; 1230 : template<class _Iter>
; 1231 : typename enable_if<_Is_iterator<_Iter>::value,
; 1232 : void>::type
; 1233 : assign(_Iter _First, _Iter _Last)
; 1234 : { // assign [_First, _Last), input iterators
; 1235 : erase(begin(), end());
; 1236 : insert(begin(), _First, _Last);
; 1237 : }
; 1238 :
; 1239 : void assign(size_type _Count, const value_type& _Val)
; 1240 : { // assign _Count * _Val
; 1241 : _Assign_n(_Count, _Val);
; 1242 : }
; 1243 :
; 1244 : iterator insert(const_iterator _Where, const _Ty& _Val)
; 1245 : { // insert _Val at _Where
; 1246 : return (_Insert_n(_Where, (size_type)1, _Val));
; 1247 : }
; 1248 :
; 1249 : iterator insert(const_iterator _Where, size_type _Count,
; 1250 : const _Ty& _Val)
; 1251 : { // insert _Count * _Val at _Where
; 1252 : return (_Insert_n(_Where, _Count, _Val));
; 1253 : }
; 1254 :
; 1255 : template<class _Iter>
; 1256 : typename enable_if<_Is_iterator<_Iter>::value,
; 1257 : iterator>::type
; 1258 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1259 : { // insert [_First, _Last) at _Where
; 1260 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
; 1261 : _Insert(_Where, _First, _Last, _Iter_cat(_First));
; 1262 : return (begin() + _Off);
; 1263 : }
; 1264 :
; 1265 : template<class _Iter>
; 1266 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
; 1267 : input_iterator_tag)
; 1268 : { // insert [_First, _Last) at _Where, input iterators
; 1269 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
; 1270 :
; 1271 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1272 : if (size() < _Off)
; 1273 : _DEBUG_ERROR("vector insert iterator outside range");
; 1274 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1275 :
; 1276 : if (_First != _Last)
; 1277 : { // worth doing, gather at end and rotate into place
; 1278 : size_type _Oldsize = size();
; 1279 :
; 1280 : _TRY_BEGIN
; 1281 : for (; _First != _Last; ++_First)
; 1282 : push_back(*_First); // append
; 1283 :
; 1284 : _CATCH_ALL
; 1285 : erase(begin() + _Oldsize, end());
; 1286 : _RERAISE;
; 1287 : _CATCH_END
; 1288 :
; 1289 : _STD rotate(begin() + _Off, begin() + _Oldsize, end());
; 1290 : }
; 1291 : }
; 1292 :
; 1293 : template<class _Iter>
; 1294 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
; 1295 : forward_iterator_tag)
; 1296 : { // insert [_First, _Last) at _Where, forward iterators
; 1297 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1298 : if (_VICONT(_Where) != this
; 1299 : || _VIPTR(_Where) < this->_Myfirst
; 1300 : || this->_Mylast < _VIPTR(_Where))
; 1301 : _DEBUG_ERROR("vector insert iterator outside range");
; 1302 : _DEBUG_RANGE(_First, _Last);
; 1303 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1304 :
; 1305 : size_type _Count = 0;
; 1306 : _Distance(_First, _Last, _Count);
; 1307 :
; 1308 : if (_Count == 0)
; 1309 : ;
; 1310 : else if (_Unused_capacity() < _Count)
; 1311 : { // not enough room, reallocate
; 1312 : if (max_size() - size() < _Count)
; 1313 : _Xlen(); // result too long
; 1314 :
; 1315 : size_type _Capacity = _Grow_to(size() + _Count);
; 1316 : pointer _Newvec = this->_Getal().allocate(_Capacity);
; 1317 : pointer _Ptr = _Newvec;
; 1318 :
; 1319 : _TRY_BEGIN
; 1320 : _Ptr = _Umove(this->_Myfirst, _VIPTR(_Where),
; 1321 : _Newvec); // copy prefix
; 1322 : _Ptr = _Ucopy(_First, _Last, _Ptr); // add new stuff
; 1323 : _Umove(_VIPTR(_Where), this->_Mylast,
; 1324 : _Ptr); // copy suffix
; 1325 : _CATCH_ALL
; 1326 : _Destroy(_Newvec, _Ptr);
; 1327 : this->_Getal().deallocate(_Newvec, _Capacity);
; 1328 : _RERAISE;
; 1329 : _CATCH_END
; 1330 :
; 1331 : _Count += size();
; 1332 : if (this->_Myfirst != pointer())
; 1333 : { // destroy and deallocate old array
; 1334 : _Destroy(this->_Myfirst, this->_Mylast);
; 1335 : this->_Getal().deallocate(this->_Myfirst,
; 1336 : this->_Myend - this->_Myfirst);
; 1337 : }
; 1338 :
; 1339 : this->_Orphan_all();
; 1340 : this->_Myend = _Newvec + _Capacity;
; 1341 : this->_Mylast = _Newvec + _Count;
; 1342 : this->_Myfirst = _Newvec;
; 1343 : }
; 1344 : else
; 1345 : { // new stuff fits, append and rotate into place
; 1346 : _Ucopy(_First, _Last, this->_Mylast);
; 1347 : _STD rotate(_VIPTR(_Where), this->_Mylast,
; 1348 : this->_Mylast + _Count);
; 1349 : this->_Mylast += _Count;
; 1350 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
; 1351 : }
; 1352 : }
; 1353 :
; 1354 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1355 : iterator erase(const_iterator _Where)
; 1356 : { // erase element at where
; 1357 : if (_VICONT(_Where) != this
; 1358 : || _VIPTR(_Where) < this->_Myfirst
; 1359 : || this->_Mylast <= _VIPTR(_Where))
; 1360 : _DEBUG_ERROR("vector erase iterator outside range");
; 1361 : _Move(_VIPTR(_Where) + 1, this->_Mylast, _VIPTR(_Where));
; 1362 : _Destroy(this->_Mylast - 1, this->_Mylast);
; 1363 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
; 1364 : --this->_Mylast;
; 1365 : return (_Make_iter(_Where));
; 1366 : }
; 1367 :
; 1368 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1369 : iterator erase(const_iterator _Where)
; 1370 : { // erase element at where
; 1371 : _Move(_VIPTR(_Where) + 1, this->_Mylast,
; 1372 : _VIPTR(_Where));
; 1373 : _Destroy(this->_Mylast - 1, this->_Mylast);
; 1374 : --this->_Mylast;
; 1375 : return (_Make_iter(_Where));
; 1376 : }
; 1377 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1378 :
; 1379 : iterator erase(const_iterator _First_arg,
; 1380 : const_iterator _Last_arg)
; 1381 : { // erase [_First, _Last)
; 1382 : if (_First_arg == begin() && _Last_arg == end())
; 1383 : clear();
; 1384 : else if (_First_arg != _Last_arg)
; 1385 : { // clear partial
; 1386 : iterator _First = _Make_iter(_First_arg);
; 1387 : iterator _Last = _Make_iter(_Last_arg);
; 1388 :
; 1389 : if (_First != _Last)
; 1390 : { // worth doing, copy down over hole
; 1391 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1392 : if (_Last < _First || _VICONT(_First) != this
; 1393 : || _VIPTR(_First) < this->_Myfirst
; 1394 : || this->_Mylast < _VIPTR(_Last))
; 1395 : _DEBUG_ERROR("vector erase iterator outside range");
; 1396 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
; 1397 : _VIPTR(_First));
; 1398 : _Orphan_range(_VIPTR(_First), this->_Mylast);
; 1399 :
; 1400 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1401 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
; 1402 : _VIPTR(_First));
; 1403 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1404 :
; 1405 : _Destroy(_Ptr, this->_Mylast);
; 1406 : this->_Mylast = _Ptr;
; 1407 : }
; 1408 : }
; 1409 : return (_Make_iter(_First_arg));
; 1410 : }
; 1411 :
; 1412 : void clear() _NOEXCEPT
; 1413 : { // erase all
; 1414 : this->_Orphan_all();
; 1415 : _Destroy(this->_Myfirst, this->_Mylast);
; 1416 : this->_Mylast = this->_Myfirst;
; 1417 : }
; 1418 :
; 1419 : void swap(_Myt& _Right)
; 1420 : { // exchange contents with _Right
; 1421 : if (this == &_Right)
; 1422 : ; // same object, do nothing
; 1423 : else if (this->_Getal() == _Right._Getal())
; 1424 : { // same allocator, swap control information
; 1425 : this->_Swap_all(_Right);
; 1426 : _Swap_adl(this->_Myfirst, _Right._Myfirst);
; 1427 : _Swap_adl(this->_Mylast, _Right._Mylast);
; 1428 : _Swap_adl(this->_Myend, _Right._Myend);
; 1429 : }
; 1430 :
; 1431 : #if _HAS_CPP0X
; 1432 : else if (_Alty::propagate_on_container_swap::value)
; 1433 : { // swap allocators and control information
; 1434 : this->_Swap_alloc(_Right);
; 1435 : _Swap_adl(this->_Myfirst, _Right._Myfirst);
; 1436 : _Swap_adl(this->_Mylast, _Right._Mylast);
; 1437 : _Swap_adl(this->_Myend, _Right._Myend);
; 1438 : }
; 1439 : #endif /* _HAS_CPP0X */
; 1440 :
; 1441 : else
; 1442 : { // different allocator, do multiple moves
; 1443 : _Myt _Ts = _Move(*this);
; 1444 :
; 1445 : *this = _Move(_Right);
; 1446 : _Right = _Move(_Ts);
; 1447 : }
; 1448 : }
; 1449 :
; 1450 : protected:
; 1451 : void _Assign_n(size_type _Count, const value_type& _Val)
; 1452 : { // assign _Count * _Val
; 1453 : value_type _Tmp = _Val; // in case _Val is in sequence
; 1454 : erase(begin(), end());
; 1455 : insert(begin(), _Count, _Tmp);
; 1456 : }
; 1457 :
; 1458 : bool _Buy(size_type _Capacity)
; 1459 : { // allocate array with _Capacity elements
; 1460 : this->_Myfirst = pointer();
; 1461 : this->_Mylast = pointer();
; 1462 : this->_Myend = pointer();
; 1463 :
; 1464 : if (_Capacity == 0)
; 1465 : return (false);
; 1466 : else if (max_size() < _Capacity)
; 1467 : _Xlen(); // result too long
; 1468 : else
; 1469 : { // nonempty array, allocate storage
; 1470 : this->_Myfirst = this->_Getal().allocate(_Capacity);
; 1471 : this->_Mylast = this->_Myfirst;
; 1472 : this->_Myend = this->_Myfirst + _Capacity;
; 1473 : }
; 1474 : return (true);
; 1475 : }
; 1476 :
; 1477 : void _Destroy(pointer _First, pointer _Last)
; 1478 : { // destroy [_First, _Last) using allocator
; 1479 : _Alty _Alval(this->_Getal());
; 1480 : _Destroy_range(_First, _Last, _Alval);
; 1481 : }
; 1482 :
; 1483 : size_type _Grow_to(size_type _Count) const
; 1484 : { // grow by 50% or at least to _Count
; 1485 : size_type _Capacity = capacity();
; 1486 :
; 1487 : _Capacity = max_size() - _Capacity / 2 < _Capacity
; 1488 : ? 0 : _Capacity + _Capacity / 2; // try to grow by 50%
; 1489 : if (_Capacity < _Count)
; 1490 : _Capacity = _Count;
; 1491 : return (_Capacity);
; 1492 : }
; 1493 :
; 1494 : bool _Inside(const value_type *_Ptr) const
; 1495 : { // test if _Ptr points inside vector
; 1496 : return (_Ptr < this->_Mylast && this->_Myfirst <= _Ptr);
; 1497 : }
; 1498 :
; 1499 : void _Reallocate(size_type _Count)
; 1500 : { // move to array of exactly _Count elements
; 1501 : pointer _Ptr = this->_Getal().allocate(_Count);
; 1502 :
; 1503 : _TRY_BEGIN
; 1504 : _Umove(this->_Myfirst, this->_Mylast, _Ptr);
; 1505 : _CATCH_ALL
; 1506 : this->_Getal().deallocate(_Ptr, _Count);
; 1507 : _RERAISE;
; 1508 : _CATCH_END
; 1509 :
; 1510 : size_type _Size = size();
; 1511 : if (this->_Myfirst != pointer())
; 1512 : { // destroy and deallocate old array
; 1513 : _Destroy(this->_Myfirst, this->_Mylast);
; 1514 : this->_Getal().deallocate(this->_Myfirst,
; 1515 : this->_Myend - this->_Myfirst);
; 1516 : }
; 1517 :
; 1518 : this->_Orphan_all();
; 1519 : this->_Myend = _Ptr + _Count;
; 1520 : this->_Mylast = _Ptr + _Size;
; 1521 : this->_Myfirst = _Ptr;
; 1522 : }
; 1523 :
; 1524 : void _Reserve(size_type _Count)
; 1525 : { // ensure room for _Count new elements, grow exponentially
; 1526 : if (_Unused_capacity() < _Count)
; 1527 : { // need more room, try to get it
; 1528 : if (max_size() - size() < _Count)
; 1529 : _Xlen();
; 1530 : _Reallocate(_Grow_to(size() + _Count));
; 1531 : }
; 1532 : }
; 1533 :
; 1534 : void _Tidy()
; 1535 : { // free all storage
; 1536 : if (this->_Myfirst != pointer())
mov eax, DWORD PTR [esi]
test eax, eax
je SHORT $LN3@vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; 586 : ::operator delete(_Ptr);
push eax
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1542 : this->_Myfirst = pointer();
mov DWORD PTR [esi], 0
; 1543 : this->_Mylast = pointer();
mov DWORD PTR [esi+4], 0
; 1544 : this->_Myend = pointer();
mov DWORD PTR [esi+8], 0
$LN3@vector:
pop esi
; 900 : _Tidy();
; 901 : }
ret 0
??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ ENDP ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ??A?$vector@NV?$allocator@N@std@@@std@@QAEAANI@Z
_TEXT SEGMENT
__Pos$ = 8 ; size = 4
??A?$vector@NV?$allocator@N@std@@@std@@QAEAANI@Z PROC ; std::vector<double,std::allocator<double> >::operator[], COMDAT
; _this$ = ecx
; 1136 : { // subscript mutable sequence
push ebp
mov ebp, esp
; 1137 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1138 : if (size() <= _Pos)
; 1139 : { // report error
; 1140 : _DEBUG_ERROR("vector subscript out of range");
; 1141 : _SCL_SECURE_OUT_OF_RANGE;
; 1142 : }
; 1143 :
; 1144 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1145 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
; 1146 : #endif /* _ITERATOR_DEBUG_LEVEL */
; 1147 :
; 1148 : return (*(this->_Myfirst + _Pos));
mov ecx, DWORD PTR [ecx]
mov eax, DWORD PTR __Pos$[ebp]
lea eax, DWORD PTR [ecx+eax*8]
; 1149 : }
pop ebp
ret 4
??A?$vector@NV?$allocator@N@std@@@std@@QAEAANI@Z ENDP ; std::vector<double,std::allocator<double> >::operator[]
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; COMDAT ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z
_TEXT SEGMENT
__Ptr$ = 8 ; size = 4
?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z PROC ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign, COMDAT
; _this$ = ecx
; 1142 : { // assign [_Ptr, <null>)
push ebp
mov ebp, esp
push esi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 523 : : _CSTD strlen(_First));
mov esi, DWORD PTR __Ptr$[ebp]
cmp BYTE PTR [esi], 0
jne SHORT $LN5@assign
xor edx, edx
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push edx
push esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
pop esi
; 1145 : }
pop ebp
ret 4
$LN5@assign:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 523 : : _CSTD strlen(_First));
mov edx, esi
push edi
lea edi, DWORD PTR [edx+1]
$LL7@assign:
mov al, BYTE PTR [edx]
inc edx
test al, al
jne SHORT $LL7@assign
sub edx, edi
pop edi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
push edx
push esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
pop esi
; 1145 : }
pop ebp
ret 4
?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z ENDP ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; COMDAT ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ
_TEXT SEGMENT
?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ PROC ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::size, COMDAT
; _this$ = ecx
; 1733 : return (this->_Mysize);
mov eax, DWORD PTR [ecx+16]
; 1734 : }
ret 0
?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ENDP ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::size
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; COMDAT ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEX_NI@Z
_TEXT SEGMENT
__Built$ = 8 ; size = 1
__Newsize$ = 12 ; size = 4
?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEX_NI@Z PROC ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Tidy, COMDAT
; _this$ = ecx
; 2253 : { // initialize buffer, deallocating any storage
push ebp
mov ebp, esp
; 2254 : if (!_Built)
cmp BYTE PTR __Built$[ebp], 0
push esi
push edi
mov edi, DWORD PTR __Newsize$[ebp]
mov esi, ecx
je SHORT $LN19@Tidy
; 2255 : ;
; 2256 : else if (this->_BUF_SIZE <= this->_Myres)
cmp DWORD PTR [esi+20], 16 ; 00000010H
jb SHORT $LN19@Tidy
; 2257 : { // copy any leftovers to small buffer and deallocate
; 2258 : pointer _Ptr = this->_Bx._Ptr;
push ebx
mov ebx, DWORD PTR [esi]
; 2259 : this->_Getal().destroy(&this->_Bx._Ptr);
; 2260 : if (0 < _Newsize)
test edi, edi
je SHORT $LN14@Tidy
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 530 : : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
push edi
push ebx
push esi
call _memcpy
add esp, 12 ; 0000000cH
$LN14@Tidy:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; 586 : ::operator delete(_Ptr);
push ebx
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
pop ebx
$LN19@Tidy:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
mov DWORD PTR [esi+16], edi
; 2261 : _Traits::copy(this->_Bx._Buf,
; 2262 : _STD addressof(*_Ptr), _Newsize);
; 2263 : this->_Getal().deallocate(_Ptr, this->_Myres + 1);
; 2264 : }
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
mov DWORD PTR [esi+20], 15 ; 0000000fH
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 564 : _Left = _Right;
mov BYTE PTR [edi+esi], 0
pop edi
pop esi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 2267 : }
pop ebp
ret 8
?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEX_NI@Z ENDP ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Tidy
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; COMDAT ??0?$allocator@D@std@@QAE@XZ
_TEXT SEGMENT
??0?$allocator@D@std@@QAE@XZ PROC ; std::allocator<char>::allocator<char>, COMDAT
; _this$ = ecx
; 566 : { // construct default allocator (do nothing)
; 567 : }
mov eax, ecx
ret 0
??0?$allocator@D@std@@QAE@XZ ENDP ; std::allocator<char>::allocator<char>
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; COMDAT ??0?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QAE@ABV?$allocator@D@1@@Z
_TEXT SEGMENT
___formal$dead$ = 8 ; size = 4
??0?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QAE@ABV?$allocator@D@1@@Z PROC ; std::_String_alloc<0,std::_String_base_types<char,std::allocator<char> > >::_String_alloc<0,std::_String_base_types<char,std::allocator<char> > >, COMDAT
; _this$ = ecx
; 498 : _Mysize = 0;
mov DWORD PTR [ecx+16], 0
; 499 : _Myres = 0;
mov DWORD PTR [ecx+20], 0
; 636 : { // construct allocator from _Al
; 637 : }
mov eax, ecx
ret 4
??0?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QAE@ABV?$allocator@D@1@@Z ENDP ; std::_String_alloc<0,std::_String_base_types<char,std::allocator<char> > >::_String_alloc<0,std::_String_base_types<char,std::allocator<char> > >
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; COMDAT ?_Getal@?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QBE?AU?$_Wrap_alloc@V?$allocator@D@std@@@2@XZ
_TEXT SEGMENT
___$ReturnUdt$ = 8 ; size = 4
?_Getal@?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QBE?AU?$_Wrap_alloc@V?$allocator@D@std@@@2@XZ PROC ; std::_String_alloc<0,std::_String_base_types<char,std::allocator<char> > >::_Getal, COMDAT
; _this$dead$ = ecx
; 688 : { // get reference to allocator
push ebp
mov ebp, esp
; 689 : return (_Alty());
mov eax, DWORD PTR ___$ReturnUdt$[ebp]
; 690 : }
pop ebp
ret 4
?_Getal@?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QBE?AU?$_Wrap_alloc@V?$allocator@D@std@@@2@XZ ENDP ; std::_String_alloc<0,std::_String_base_types<char,std::allocator<char> > >::_Getal
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; COMDAT ?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QBEPBDXZ
_TEXT SEGMENT
?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QBEPBDXZ PROC ; std::_String_val<std::_Simple_types<char> >::_Myptr, COMDAT
; _this$ = ecx
; 522 : return (this->_BUF_SIZE <= this->_Myres
; 523 : ? _STD addressof(*this->_Bx._Ptr)
; 524 : : this->_Bx._Buf);
cmp DWORD PTR [ecx+20], 16 ; 00000010H
jb SHORT $LN3@Myptr
mov eax, DWORD PTR [ecx]
; 525 : }
ret 0
$LN3@Myptr:
; 522 : return (this->_BUF_SIZE <= this->_Myres
; 523 : ? _STD addressof(*this->_Bx._Ptr)
; 524 : : this->_Bx._Buf);
mov eax, ecx
; 525 : }
ret 0
?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QBEPBDXZ ENDP ; std::_String_val<std::_Simple_types<char> >::_Myptr
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ
_TEXT SEGMENT
?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ PROC ; std::vector<int,std::allocator<int> >::_Tidy, COMDAT
; _this$ = ecx
; 1535 : { // free all storage
push esi
mov esi, ecx
; 1536 : if (this->_Myfirst != pointer())
mov eax, DWORD PTR [esi]
test eax, eax
je SHORT $LN1@Tidy
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; 586 : ::operator delete(_Ptr);
push eax
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1542 : this->_Myfirst = pointer();
mov DWORD PTR [esi], 0
; 1543 : this->_Mylast = pointer();
mov DWORD PTR [esi+4], 0
; 1544 : this->_Myend = pointer();
mov DWORD PTR [esi+8], 0
$LN1@Tidy:
pop esi
; 1545 : }
; 1546 : }
ret 0
?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ ENDP ; std::vector<int,std::allocator<int> >::_Tidy
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; COMDAT ??0?$allocator@H@std@@QAE@XZ
_TEXT SEGMENT
??0?$allocator@H@std@@QAE@XZ PROC ; std::allocator<int>::allocator<int>, COMDAT
; _this$ = ecx
; 566 : { // construct default allocator (do nothing)
; 567 : }
mov eax, ecx
ret 0
??0?$allocator@H@std@@QAE@XZ ENDP ; std::allocator<int>::allocator<int>
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ??0?$_Vector_alloc@$0A@U?$_Vec_base_types@HV?$allocator@H@std@@@std@@@std@@QAE@ABV?$allocator@H@1@@Z
_TEXT SEGMENT
___formal$dead$ = 8 ; size = 4
??0?$_Vector_alloc@$0A@U?$_Vec_base_types@HV?$allocator@H@std@@@std@@@std@@QAE@ABV?$allocator@H@1@@Z PROC ; std::_Vector_alloc<0,std::_Vec_base_types<int,std::allocator<int> > >::_Vector_alloc<0,std::_Vec_base_types<int,std::allocator<int> > >, COMDAT
; _this$ = ecx
; 486 : _Myfirst = pointer();
mov DWORD PTR [ecx], 0
; 487 : _Mylast = pointer();
mov DWORD PTR [ecx+4], 0
; 488 : _Myend = pointer();
mov DWORD PTR [ecx+8], 0
; 594 : { // construct allocator from _Al
; 595 : }
mov eax, ecx
ret 4
??0?$_Vector_alloc@$0A@U?$_Vec_base_types@HV?$allocator@H@std@@@std@@@std@@QAE@ABV?$allocator@H@1@@Z ENDP ; std::_Vector_alloc<0,std::_Vec_base_types<int,std::allocator<int> > >::_Vector_alloc<0,std::_Vec_base_types<int,std::allocator<int> > >
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z
_TEXT SEGMENT
__Newsize$ = 8 ; size = 4
?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z PROC ; std::vector<double,std::allocator<double> >::resize, COMDAT
; _this$ = ecx
; 1059 : { // determine new length, padding as needed
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
push esi
; 1087 : return (this->_Mylast - this->_Myfirst);
mov eax, DWORD PTR [ebx+4]
mov edx, DWORD PTR [ebx]
; 1060 : if (_Newsize < size())
mov esi, DWORD PTR __Newsize$[ebp]
; 1087 : return (this->_Mylast - this->_Myfirst);
mov ecx, eax
sub ecx, edx
sar ecx, 3
push edi
; 1060 : if (_Newsize < size())
cmp ecx, esi
jbe SHORT $LN135@resize
; 170 : _Ptr += _Off;
lea esi, DWORD PTR [edx+esi*8]
; 171 : return (*this);
; 172 : }
; 173 :
; 174 : _Myiter operator+(difference_type _Off) const
; 175 : { // return this + integer
; 176 : _Myiter _Tmp = *this;
; 177 : return (_Tmp += _Off);
; 178 : }
; 179 :
; 180 : _Myiter& operator-=(difference_type _Off)
; 181 : { // decrement by integer
; 182 : return (*this += -_Off);
; 183 : }
; 184 :
; 185 : _Myiter operator-(difference_type _Off) const
; 186 : { // return this - integer
; 187 : _Myiter _Tmp = *this;
; 188 : return (_Tmp -= _Off);
; 189 : }
; 190 :
; 191 : difference_type operator-(const _Myiter& _Right) const
; 192 : { // return difference of iterators
; 193 : _Compat(_Right);
; 194 : return (this->_Ptr - _Right._Ptr);
; 195 : }
; 196 :
; 197 : reference operator[](difference_type _Off) const
; 198 : { // subscript
; 199 : return (*(*this + _Off));
; 200 : }
; 201 :
; 202 : bool operator==(const _Myiter& _Right) const
; 203 : { // test for iterator equality
; 204 : _Compat(_Right);
; 205 : return (this->_Ptr == _Right._Ptr);
cmp esi, edx
; 1088 : }
; 1089 :
; 1090 : size_type max_size() const _NOEXCEPT
; 1091 : { // return maximum possible length of sequence
; 1092 : return (this->_Getal().max_size());
; 1093 : }
; 1094 :
; 1095 : bool empty() const _NOEXCEPT
; 1096 : { // test if sequence is empty
; 1097 : return (this->_Myfirst == this->_Mylast);
; 1098 : }
; 1099 :
; 1100 : _Alloc get_allocator() const _NOEXCEPT
; 1101 : { // return allocator object for values
; 1102 : return (this->_Getal());
; 1103 : }
; 1104 :
; 1105 : const_reference at(size_type _Pos) const
; 1106 : { // subscript nonmutable sequence with checking
; 1107 : if (size() <= _Pos)
; 1108 : _Xran();
; 1109 : return (*(this->_Myfirst + _Pos));
; 1110 : }
; 1111 :
; 1112 : reference at(size_type _Pos)
; 1113 : { // subscript mutable sequence with checking
; 1114 : if (size() <= _Pos)
; 1115 : _Xran();
; 1116 : return (*(this->_Myfirst + _Pos));
; 1117 : }
; 1118 :
; 1119 : const_reference operator[](size_type _Pos) const
; 1120 : { // subscript nonmutable sequence
; 1121 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1122 : if (size() <= _Pos)
; 1123 : { // report error
; 1124 : _DEBUG_ERROR("vector subscript out of range");
; 1125 : _SCL_SECURE_OUT_OF_RANGE;
; 1126 : }
; 1127 :
; 1128 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1129 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
; 1130 : #endif /* _ITERATOR_DEBUG_LEVEL */
; 1131 :
; 1132 : return (*(this->_Myfirst + _Pos));
; 1133 : }
; 1134 :
; 1135 : reference operator[](size_type _Pos)
; 1136 : { // subscript mutable sequence
; 1137 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1138 : if (size() <= _Pos)
; 1139 : { // report error
; 1140 : _DEBUG_ERROR("vector subscript out of range");
; 1141 : _SCL_SECURE_OUT_OF_RANGE;
; 1142 : }
; 1143 :
; 1144 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1145 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
; 1146 : #endif /* _ITERATOR_DEBUG_LEVEL */
; 1147 :
; 1148 : return (*(this->_Myfirst + _Pos));
; 1149 : }
; 1150 :
; 1151 : #if _HAS_CPP0X
; 1152 : pointer data() _NOEXCEPT
; 1153 : { // return address of first element
; 1154 : return (this->_Myfirst);
; 1155 : }
; 1156 :
; 1157 : const_pointer data() const _NOEXCEPT
; 1158 : { // return address of first element
; 1159 : return (this->_Myfirst);
; 1160 : }
; 1161 : #endif /* _HAS_CPP0X */
; 1162 :
; 1163 : reference front()
; 1164 : { // return first element of mutable sequence
; 1165 : return (*begin());
; 1166 : }
; 1167 :
; 1168 : const_reference front() const
; 1169 : { // return first element of nonmutable sequence
; 1170 : return (*begin());
; 1171 : }
; 1172 :
; 1173 : reference back()
; 1174 : { // return last element of mutable sequence
; 1175 : return (*(end() - 1));
; 1176 : }
; 1177 :
; 1178 : const_reference back() const
; 1179 : { // return last element of nonmutable sequence
; 1180 : return (*(end() - 1));
; 1181 : }
; 1182 :
; 1183 : void push_back(const value_type& _Val)
; 1184 : { // insert element at end
; 1185 : if (_Inside(_STD addressof(_Val)))
; 1186 : { // push back an element
; 1187 : size_type _Idx = _STD addressof(_Val) - this->_Myfirst;
; 1188 : if (this->_Mylast == this->_Myend)
; 1189 : _Reserve(1);
; 1190 : _Orphan_range(this->_Mylast, this->_Mylast);
; 1191 : this->_Getal().construct(this->_Mylast,
; 1192 : this->_Myfirst[_Idx]);
; 1193 : ++this->_Mylast;
; 1194 : }
; 1195 : else
; 1196 : { // push back a non-element
; 1197 : if (this->_Mylast == this->_Myend)
; 1198 : _Reserve(1);
; 1199 : _Orphan_range(this->_Mylast, this->_Mylast);
; 1200 : this->_Getal().construct(this->_Mylast,
; 1201 : _Val);
; 1202 : ++this->_Mylast;
; 1203 : }
; 1204 : }
; 1205 :
; 1206 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1207 : void pop_back()
; 1208 : { // erase element at end
; 1209 : if (empty())
; 1210 : _DEBUG_ERROR("vector empty before pop");
; 1211 : else
; 1212 : { // erase last element
; 1213 : _Orphan_range(this->_Mylast - 1, this->_Mylast);
; 1214 : this->_Getal().destroy(this->_Mylast - 1);
; 1215 : --this->_Mylast;
; 1216 : }
; 1217 : }
; 1218 :
; 1219 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1220 : void pop_back()
; 1221 : { // erase element at end
; 1222 : if (!empty())
; 1223 : { // erase last element
; 1224 : this->_Getal().destroy(this->_Mylast - 1);
; 1225 : --this->_Mylast;
; 1226 : }
; 1227 : }
; 1228 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1229 :
; 1230 : template<class _Iter>
; 1231 : typename enable_if<_Is_iterator<_Iter>::value,
; 1232 : void>::type
; 1233 : assign(_Iter _First, _Iter _Last)
; 1234 : { // assign [_First, _Last), input iterators
; 1235 : erase(begin(), end());
; 1236 : insert(begin(), _First, _Last);
; 1237 : }
; 1238 :
; 1239 : void assign(size_type _Count, const value_type& _Val)
; 1240 : { // assign _Count * _Val
; 1241 : _Assign_n(_Count, _Val);
; 1242 : }
; 1243 :
; 1244 : iterator insert(const_iterator _Where, const _Ty& _Val)
; 1245 : { // insert _Val at _Where
; 1246 : return (_Insert_n(_Where, (size_type)1, _Val));
; 1247 : }
; 1248 :
; 1249 : iterator insert(const_iterator _Where, size_type _Count,
; 1250 : const _Ty& _Val)
; 1251 : { // insert _Count * _Val at _Where
; 1252 : return (_Insert_n(_Where, _Count, _Val));
; 1253 : }
; 1254 :
; 1255 : template<class _Iter>
; 1256 : typename enable_if<_Is_iterator<_Iter>::value,
; 1257 : iterator>::type
; 1258 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1259 : { // insert [_First, _Last) at _Where
; 1260 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
; 1261 : _Insert(_Where, _First, _Last, _Iter_cat(_First));
; 1262 : return (begin() + _Off);
; 1263 : }
; 1264 :
; 1265 : template<class _Iter>
; 1266 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
; 1267 : input_iterator_tag)
; 1268 : { // insert [_First, _Last) at _Where, input iterators
; 1269 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
; 1270 :
; 1271 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1272 : if (size() < _Off)
; 1273 : _DEBUG_ERROR("vector insert iterator outside range");
; 1274 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1275 :
; 1276 : if (_First != _Last)
; 1277 : { // worth doing, gather at end and rotate into place
; 1278 : size_type _Oldsize = size();
; 1279 :
; 1280 : _TRY_BEGIN
; 1281 : for (; _First != _Last; ++_First)
; 1282 : push_back(*_First); // append
; 1283 :
; 1284 : _CATCH_ALL
; 1285 : erase(begin() + _Oldsize, end());
; 1286 : _RERAISE;
; 1287 : _CATCH_END
; 1288 :
; 1289 : _STD rotate(begin() + _Off, begin() + _Oldsize, end());
; 1290 : }
; 1291 : }
; 1292 :
; 1293 : template<class _Iter>
; 1294 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
; 1295 : forward_iterator_tag)
; 1296 : { // insert [_First, _Last) at _Where, forward iterators
; 1297 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1298 : if (_VICONT(_Where) != this
; 1299 : || _VIPTR(_Where) < this->_Myfirst
; 1300 : || this->_Mylast < _VIPTR(_Where))
; 1301 : _DEBUG_ERROR("vector insert iterator outside range");
; 1302 : _DEBUG_RANGE(_First, _Last);
; 1303 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1304 :
; 1305 : size_type _Count = 0;
; 1306 : _Distance(_First, _Last, _Count);
; 1307 :
; 1308 : if (_Count == 0)
; 1309 : ;
; 1310 : else if (_Unused_capacity() < _Count)
; 1311 : { // not enough room, reallocate
; 1312 : if (max_size() - size() < _Count)
; 1313 : _Xlen(); // result too long
; 1314 :
; 1315 : size_type _Capacity = _Grow_to(size() + _Count);
; 1316 : pointer _Newvec = this->_Getal().allocate(_Capacity);
; 1317 : pointer _Ptr = _Newvec;
; 1318 :
; 1319 : _TRY_BEGIN
; 1320 : _Ptr = _Umove(this->_Myfirst, _VIPTR(_Where),
; 1321 : _Newvec); // copy prefix
; 1322 : _Ptr = _Ucopy(_First, _Last, _Ptr); // add new stuff
; 1323 : _Umove(_VIPTR(_Where), this->_Mylast,
; 1324 : _Ptr); // copy suffix
; 1325 : _CATCH_ALL
; 1326 : _Destroy(_Newvec, _Ptr);
; 1327 : this->_Getal().deallocate(_Newvec, _Capacity);
; 1328 : _RERAISE;
; 1329 : _CATCH_END
; 1330 :
; 1331 : _Count += size();
; 1332 : if (this->_Myfirst != pointer())
; 1333 : { // destroy and deallocate old array
; 1334 : _Destroy(this->_Myfirst, this->_Mylast);
; 1335 : this->_Getal().deallocate(this->_Myfirst,
; 1336 : this->_Myend - this->_Myfirst);
; 1337 : }
; 1338 :
; 1339 : this->_Orphan_all();
; 1340 : this->_Myend = _Newvec + _Capacity;
; 1341 : this->_Mylast = _Newvec + _Count;
; 1342 : this->_Myfirst = _Newvec;
; 1343 : }
; 1344 : else
; 1345 : { // new stuff fits, append and rotate into place
; 1346 : _Ucopy(_First, _Last, this->_Mylast);
; 1347 : _STD rotate(_VIPTR(_Where), this->_Mylast,
; 1348 : this->_Mylast + _Count);
; 1349 : this->_Mylast += _Count;
; 1350 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
; 1351 : }
; 1352 : }
; 1353 :
; 1354 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1355 : iterator erase(const_iterator _Where)
; 1356 : { // erase element at where
; 1357 : if (_VICONT(_Where) != this
; 1358 : || _VIPTR(_Where) < this->_Myfirst
; 1359 : || this->_Mylast <= _VIPTR(_Where))
; 1360 : _DEBUG_ERROR("vector erase iterator outside range");
; 1361 : _Move(_VIPTR(_Where) + 1, this->_Mylast, _VIPTR(_Where));
; 1362 : _Destroy(this->_Mylast - 1, this->_Mylast);
; 1363 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
; 1364 : --this->_Mylast;
; 1365 : return (_Make_iter(_Where));
; 1366 : }
; 1367 :
; 1368 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1369 : iterator erase(const_iterator _Where)
; 1370 : { // erase element at where
; 1371 : _Move(_VIPTR(_Where) + 1, this->_Mylast,
; 1372 : _VIPTR(_Where));
; 1373 : _Destroy(this->_Mylast - 1, this->_Mylast);
; 1374 : --this->_Mylast;
; 1375 : return (_Make_iter(_Where));
; 1376 : }
; 1377 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1378 :
; 1379 : iterator erase(const_iterator _First_arg,
; 1380 : const_iterator _Last_arg)
; 1381 : { // erase [_First, _Last)
; 1382 : if (_First_arg == begin() && _Last_arg == end())
jne SHORT $LN38@resize
pop edi
pop esi
; 1385 : { // clear partial
; 1386 : iterator _First = _Make_iter(_First_arg);
; 1387 : iterator _Last = _Make_iter(_Last_arg);
; 1388 :
; 1389 : if (_First != _Last)
; 1390 : { // worth doing, copy down over hole
; 1391 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1392 : if (_Last < _First || _VICONT(_First) != this
; 1393 : || _VIPTR(_First) < this->_Myfirst
; 1394 : || this->_Mylast < _VIPTR(_Last))
; 1395 : _DEBUG_ERROR("vector erase iterator outside range");
; 1396 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
; 1397 : _VIPTR(_First));
; 1398 : _Orphan_range(_VIPTR(_First), this->_Mylast);
; 1399 :
; 1400 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1401 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
; 1402 : _VIPTR(_First));
; 1403 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1404 :
; 1405 : _Destroy(_Ptr, this->_Mylast);
; 1406 : this->_Mylast = _Ptr;
; 1407 : }
; 1408 : }
; 1409 : return (_Make_iter(_First_arg));
; 1410 : }
; 1411 :
; 1412 : void clear() _NOEXCEPT
; 1413 : { // erase all
; 1414 : this->_Orphan_all();
; 1415 : _Destroy(this->_Myfirst, this->_Mylast);
; 1416 : this->_Mylast = this->_Myfirst;
mov DWORD PTR [ebx+4], edx
pop ebx
; 1074 : }
; 1075 : }
pop ebp
ret 4
$LN38@resize:
; 171 : return (*this);
; 172 : }
; 173 :
; 174 : _Myiter operator+(difference_type _Off) const
; 175 : { // return this + integer
; 176 : _Myiter _Tmp = *this;
; 177 : return (_Tmp += _Off);
; 178 : }
; 179 :
; 180 : _Myiter& operator-=(difference_type _Off)
; 181 : { // decrement by integer
; 182 : return (*this += -_Off);
; 183 : }
; 184 :
; 185 : _Myiter operator-(difference_type _Off) const
; 186 : { // return this - integer
; 187 : _Myiter _Tmp = *this;
; 188 : return (_Tmp -= _Off);
; 189 : }
; 190 :
; 191 : difference_type operator-(const _Myiter& _Right) const
; 192 : { // return difference of iterators
; 193 : _Compat(_Right);
; 194 : return (this->_Ptr - _Right._Ptr);
; 195 : }
; 196 :
; 197 : reference operator[](difference_type _Off) const
; 198 : { // subscript
; 199 : return (*(*this + _Off));
; 200 : }
; 201 :
; 202 : bool operator==(const _Myiter& _Right) const
; 203 : { // test for iterator equality
; 204 : _Compat(_Right);
; 205 : return (this->_Ptr == _Right._Ptr);
cmp esi, eax
; 1383 : clear();
; 1384 : else if (_First_arg != _Last_arg)
je SHORT $LN2@resize
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
; 2475 : ptrdiff_t _Count = _Last - _First;
mov ecx, eax
sub ecx, eax
sar ecx, 3
; 2476 : _CSTD memmove(&*_Dest, &*_First,
; 2477 : _Count * sizeof (*_First));
lea edi, DWORD PTR [ecx*8]
push edi
push eax
push esi
call DWORD PTR __imp__memmove
add esp, 12 ; 0000000cH
; 2478 : return (_Dest + _Count);
lea eax, DWORD PTR [edi+esi]
pop edi
pop esi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1073 : this->_Mylast += _Newsize - size();
mov DWORD PTR [ebx+4], eax
pop ebx
; 1074 : }
; 1075 : }
pop ebp
ret 4
$LN135@resize:
; 1061 : erase(begin() + _Newsize, end());
; 1062 : else if (size() < _Newsize)
jae SHORT $LN2@resize
; 1063 : { // pad as needed
; 1064 : _Alty _Alval(this->_Getal());
; 1065 : _Reserve(_Newsize - size());
mov eax, esi
sub eax, ecx
push eax
mov ecx, ebx
call ?_Reserve@?$vector@NV?$allocator@N@std@@@std@@IAEXI@Z ; std::vector<double,std::allocator<double> >::_Reserve
; 1087 : return (this->_Mylast - this->_Myfirst);
mov edi, DWORD PTR [ebx+4]
mov eax, edi
sub eax, DWORD PTR [ebx]
; 1066 : _TRY_BEGIN
; 1067 : _Uninitialized_default_fill_n(this->_Mylast, _Newsize - size(),
; 1068 : _Alval);
mov ecx, esi
; 1087 : return (this->_Mylast - this->_Myfirst);
sar eax, 3
; 1066 : _TRY_BEGIN
; 1067 : _Uninitialized_default_fill_n(this->_Mylast, _Newsize - size(),
; 1068 : _Alval);
sub ecx, eax
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
; 2678 : for (; 0 < _Count; --_Count, ++_Dest)
je SHORT $LN127@resize
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1087 : return (this->_Mylast - this->_Myfirst);
and ecx, 536870911 ; 1fffffffH
add ecx, ecx
xor eax, eax
rep stosd
$LN127@resize:
mov ecx, DWORD PTR [ebx+4]
mov eax, ecx
sub eax, DWORD PTR [ebx]
sar eax, 3
; 1073 : this->_Mylast += _Newsize - size();
sub esi, eax
lea eax, DWORD PTR [ecx+esi*8]
mov DWORD PTR [ebx+4], eax
$LN2@resize:
pop edi
pop esi
pop ebx
; 1074 : }
; 1075 : }
pop ebp
ret 4
?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ENDP ; std::vector<double,std::allocator<double> >::resize
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ?_Tidy@?$vector@NV?$allocator@N@std@@@std@@IAEXXZ
_TEXT SEGMENT
?_Tidy@?$vector@NV?$allocator@N@std@@@std@@IAEXXZ PROC ; std::vector<double,std::allocator<double> >::_Tidy, COMDAT
; _this$ = ecx
; 1535 : { // free all storage
push esi
mov esi, ecx
; 1536 : if (this->_Myfirst != pointer())
mov eax, DWORD PTR [esi]
test eax, eax
je SHORT $LN1@Tidy
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; 586 : ::operator delete(_Ptr);
push eax
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; 1542 : this->_Myfirst = pointer();
mov DWORD PTR [esi], 0
; 1543 : this->_Mylast = pointer();
mov DWORD PTR [esi+4], 0
; 1544 : this->_Myend = pointer();
mov DWORD PTR [esi+8], 0
$LN1@Tidy:
pop esi
; 1545 : }
; 1546 : }
ret 0
?_Tidy@?$vector@NV?$allocator@N@std@@@std@@IAEXXZ ENDP ; std::vector<double,std::allocator<double> >::_Tidy
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
; COMDAT ??0?$allocator@N@std@@QAE@XZ
_TEXT SEGMENT
??0?$allocator@N@std@@QAE@XZ PROC ; std::allocator<double>::allocator<double>, COMDAT
; _this$ = ecx
; 566 : { // construct default allocator (do nothing)
; 567 : }
mov eax, ecx
ret 0
??0?$allocator@N@std@@QAE@XZ ENDP ; std::allocator<double>::allocator<double>
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
; COMDAT ??0?$_Vector_alloc@$0A@U?$_Vec_base_types@NV?$allocator@N@std@@@std@@@std@@QAE@ABV?$allocator@N@1@@Z
_TEXT SEGMENT
___formal$dead$ = 8 ; size = 4
??0?$_Vector_alloc@$0A@U?$_Vec_base_types@NV?$allocator@N@std@@@std@@@std@@QAE@ABV?$allocator@N@1@@Z PROC ; std::_Vector_alloc<0,std::_Vec_base_types<double,std::allocator<double> > >::_Vector_alloc<0,std::_Vec_base_types<double,std::allocator<double> > >, COMDAT
; _this$ = ecx
; 486 : _Myfirst = pointer();
mov DWORD PTR [ecx], 0
; 487 : _Mylast = pointer();
mov DWORD PTR [ecx+4], 0
; 488 : _Myend = pointer();
mov DWORD PTR [ecx+8], 0
; 594 : { // construct allocator from _Al
; 595 : }
mov eax, ecx
ret 4
??0?$_Vector_alloc@$0A@U?$_Vec_base_types@NV?$allocator@N@std@@@std@@@std@@QAE@ABV?$allocator@N@1@@Z ENDP ; std::_Vector_alloc<0,std::_Vec_base_types<double,std::allocator<double> > >::_Vector_alloc<0,std::_Vec_base_types<double,std::allocator<double> > >
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; COMDAT ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z
_TEXT SEGMENT
__Ptr$ = 8 ; size = 4
__Count$ = 12 ; size = 4
?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z PROC ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign, COMDAT
; _this$ = ecx
; 1123 : { // assign [_Ptr, _Ptr + _Count)
push ebp
mov ebp, esp
push ebx
; 2234 : }
; 2235 :
; 2236 : bool _Inside(const _Elem *_Ptr)
; 2237 : { // test if _Ptr points inside string
; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
mov ebx, DWORD PTR __Ptr$[ebp]
push esi
; 1123 : { // assign [_Ptr, _Ptr + _Count)
mov esi, ecx
; 2234 : }
; 2235 :
; 2236 : bool _Inside(const _Elem *_Ptr)
; 2237 : { // test if _Ptr points inside string
; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
test ebx, ebx
je SHORT $LN2@assign
; 517 : : this->_Bx._Buf);
mov ecx, DWORD PTR [esi+20]
cmp ecx, 16 ; 00000010H
jb SHORT $LN12@assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; 88 : reinterpret_cast<const volatile char&>(_Val)))));
mov eax, DWORD PTR [esi]
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 517 : : this->_Bx._Buf);
jmp SHORT $LN13@assign
$LN12@assign:
mov eax, esi
$LN13@assign:
; 2234 : }
; 2235 :
; 2236 : bool _Inside(const _Elem *_Ptr)
; 2237 : { // test if _Ptr points inside string
; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
cmp ebx, eax
jb SHORT $LN2@assign
; 517 : : this->_Bx._Buf);
cmp ecx, 16 ; 00000010H
jb SHORT $LN18@assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; 88 : reinterpret_cast<const volatile char&>(_Val)))));
mov edx, DWORD PTR [esi]
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 517 : : this->_Bx._Buf);
jmp SHORT $LN19@assign
$LN18@assign:
mov edx, esi
$LN19@assign:
; 2234 : }
; 2235 :
; 2236 : bool _Inside(const _Elem *_Ptr)
; 2237 : { // test if _Ptr points inside string
; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
mov eax, DWORD PTR [esi+16]
add eax, edx
cmp eax, ebx
jbe SHORT $LN2@assign
; 517 : : this->_Bx._Buf);
cmp ecx, 16 ; 00000010H
jb SHORT $LN24@assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; 88 : reinterpret_cast<const volatile char&>(_Val)))));
mov eax, DWORD PTR [esi]
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1131 : _Ptr - this->_Myptr(), _Count)); // substring
push DWORD PTR __Count$[ebp]
sub ebx, eax
push ebx
push esi
mov ecx, esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
pop esi
pop ebx
; 1139 : }
pop ebp
ret 8
$LN24@assign:
; 1131 : _Ptr - this->_Myptr(), _Count)); // substring
push DWORD PTR __Count$[ebp]
; 517 : : this->_Bx._Buf);
mov eax, esi
; 1131 : _Ptr - this->_Myptr(), _Count)); // substring
sub ebx, eax
push ebx
push esi
mov ecx, esi
call ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign
pop esi
pop ebx
; 1139 : }
pop ebp
ret 8
$LN2@assign:
push edi
; 2219 : }
; 2220 :
; 2221 : bool _Grow(size_type _Newsize,
; 2222 : bool _Trim = false)
; 2223 : { // ensure buffer is big enough, trim to size if _Trim is true
; 2224 : if (max_size() < _Newsize)
mov edi, DWORD PTR __Count$[ebp]
cmp edi, -2 ; fffffffeH
jbe SHORT $LN33@assign
; 2240 : return (false); // don't ask
; 2241 : else
; 2242 : return (true);
; 2243 : }
; 2244 :
; 2245 : static size_type _Pdif(const_iterator _P2,
; 2246 : const_iterator _P1)
; 2247 : { // compute safe iterator difference
; 2248 : return (_STRING_ITER_BASE(_P2) == 0 ? 0 : _P2 - _P1);
; 2249 : }
; 2250 :
; 2251 : void _Tidy(bool _Built = false,
; 2252 : size_type _Newsize = 0)
; 2253 : { // initialize buffer, deallocating any storage
; 2254 : if (!_Built)
; 2255 : ;
; 2256 : else if (this->_BUF_SIZE <= this->_Myres)
; 2257 : { // copy any leftovers to small buffer and deallocate
; 2258 : pointer _Ptr = this->_Bx._Ptr;
; 2259 : this->_Getal().destroy(&this->_Bx._Ptr);
; 2260 : if (0 < _Newsize)
; 2261 : _Traits::copy(this->_Bx._Buf,
; 2262 : _STD addressof(*_Ptr), _Newsize);
; 2263 : this->_Getal().deallocate(_Ptr, this->_Myres + 1);
; 2264 : }
; 2265 : this->_Myres = this->_BUF_SIZE - 1;
; 2266 : _Eos(_Newsize);
; 2267 : }
; 2268 :
; 2269 : __declspec(noreturn) void _Xlen() const
; 2270 : { // report a length_error
; 2271 : _Xlength_error("string too long");
push OFFSET ??_C@_0BA@JFNIOLAK@string?5too?5long?$AA@
call DWORD PTR __imp_?_Xlength_error@std@@YAXPBD@Z
$LN119@assign:
$LN33@assign:
; 2225 : _Xlen(); // result too long
; 2226 : if (this->_Myres < _Newsize)
mov eax, DWORD PTR [esi+20]
cmp eax, edi
jae SHORT $LN32@assign
; 2227 : _Copy(_Newsize, this->_Mysize); // reallocate to grow
push DWORD PTR [esi+16]
mov ecx, esi
push edi
call ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Copy
; 2232 : _Eos(0); // new size is zero, just null terminate
; 2233 : return (0 < _Newsize); // return true only if more work to do
test edi, edi
; 1132 :
; 1133 : if (_Grow(_Count))
je SHORT $LN112@assign
$LN117@assign:
; 517 : : this->_Bx._Buf);
cmp DWORD PTR [esi+20], 16 ; 00000010H
jb SHORT $LN96@assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; 88 : reinterpret_cast<const volatile char&>(_Val)))));
mov eax, DWORD PTR [esi]
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 517 : : this->_Bx._Buf);
jmp SHORT $LN97@assign
$LN32@assign:
; 2228 : else if (_Trim && _Newsize < this->_BUF_SIZE)
; 2229 : _Tidy(true, // copy and deallocate if trimming to small string
; 2230 : _Newsize < this->_Mysize ? _Newsize : this->_Mysize);
; 2231 : else if (_Newsize == 0)
test edi, edi
jne SHORT $LN117@assign
; 1140 :
; 1141 : _Myt& assign(const _Elem *_Ptr)
; 1142 : { // assign [_Ptr, <null>)
; 1143 : _DEBUG_POINTER(_Ptr);
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
; 1145 : }
; 1146 :
; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
; 1148 : { // assign _Count * _Ch
; 1149 : if (_Count == npos)
; 1150 : _Xlen(); // result too long
; 1151 :
; 1152 : if (_Grow(_Count))
; 1153 : { // make room and assign new stuff
; 1154 : _Chassign(0, _Count, _Ch);
; 1155 : _Eos(_Count);
; 1156 : }
; 1157 : return (*this);
; 1158 : }
; 1159 :
; 1160 : template<class _Iter>
; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
; 1162 : _Myt&>::type
; 1163 : assign(_Iter _First, _Iter _Last)
; 1164 : { // assign [First, _Last), input iterators
; 1165 : return (replace(begin(), end(), _First, _Last));
; 1166 : }
; 1167 :
; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
; 1169 : { // assign [First, _Last), const pointers
; 1170 : return (replace(begin(), end(), _First, _Last));
; 1171 : }
; 1172 :
; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
; 1174 : { // assign [First, _Last), const_iterators
; 1175 : return (replace(begin(), end(), _First, _Last));
; 1176 : }
; 1177 :
; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
; 1179 : { // insert _Right at _Off
; 1180 : return (insert(_Off, _Right, 0, npos));
; 1181 : }
; 1182 :
; 1183 : _Myt& insert(size_type _Off,
; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1187 : _Xran(); // _Off or _Roff off end
; 1188 : size_type _Num = _Right.size() - _Roff;
; 1189 : if (_Num < _Count)
; 1190 : _Count = _Num; // trim _Count to size
; 1191 : if (npos - this->_Mysize <= _Count)
; 1192 : _Xlen(); // result too long
; 1193 :
; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1195 : { // make room and insert new stuff
; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1197 : this->_Myptr() + _Off,
; 1198 : this->_Mysize - _Off); // empty out hole
; 1199 : if (this == &_Right)
; 1200 : _Traits::move(this->_Myptr() + _Off,
; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
; 1202 : _Count); // substring
; 1203 : else
; 1204 : _Traits::copy(this->_Myptr() + _Off,
; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1206 : _Eos(_Num);
; 1207 : }
; 1208 : return (*this);
; 1209 : }
; 1210 :
; 1211 : _Myt& insert(size_type _Off,
; 1212 : const _Elem *_Ptr, size_type _Count)
; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1215 : if (_Count != 0)
; 1216 : _DEBUG_POINTER(_Ptr);
; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1218 :
; 1219 : if (_Inside(_Ptr))
; 1220 : return (insert(_Off, *this,
; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
; 1222 : if (this->_Mysize < _Off)
; 1223 : _Xran(); // _Off off end
; 1224 : if (npos - this->_Mysize <= _Count)
; 1225 : _Xlen(); // result too long
; 1226 : size_type _Num;
; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1228 : { // make room and insert new stuff
; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1230 : this->_Myptr() + _Off,
; 1231 : this->_Mysize - _Off); // empty out hole
; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1233 : _Eos(_Num);
; 1234 : }
; 1235 : return (*this);
; 1236 : }
; 1237 :
; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
; 1239 : { // insert [_Ptr, <null>) at _Off
; 1240 : _DEBUG_POINTER(_Ptr);
; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
; 1242 : }
; 1243 :
; 1244 : _Myt& insert(size_type _Off,
; 1245 : size_type _Count, _Elem _Ch)
; 1246 : { // insert _Count * _Ch at _Off
; 1247 : if (this->_Mysize < _Off)
; 1248 : _Xran(); // _Off off end
; 1249 : if (npos - this->_Mysize <= _Count)
; 1250 : _Xlen(); // result too long
; 1251 : size_type _Num;
; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1253 : { // make room and insert new stuff
; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1255 : this->_Myptr() + _Off,
; 1256 : this->_Mysize - _Off); // empty out hole
; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1258 : _Eos(_Num);
; 1259 : }
; 1260 : return (*this);
; 1261 : }
; 1262 :
; 1263 : iterator insert(const_iterator _Where)
; 1264 : { // insert <null> at _Where
; 1265 : return (insert(_Where, _Elem()));
; 1266 : }
; 1267 :
; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
; 1269 : { // insert _Ch at _Where
; 1270 : size_type _Off = _Pdif(_Where, begin());
; 1271 : insert(_Off, 1, _Ch);
; 1272 : return (begin() + _Off);
; 1273 : }
; 1274 :
; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
; 1276 : { // insert _Count * _Elem at _Where
; 1277 : size_type _Off = _Pdif(_Where, begin());
; 1278 : insert(_Off, _Count, _Ch);
; 1279 : return (begin() + _Off);
; 1280 : }
; 1281 :
; 1282 : template<class _Iter>
; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
; 1284 : iterator>::type
; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1286 : { // insert [_First, _Last) at _Where, input iterators
; 1287 : size_type _Off = _Pdif(_Where, begin());
; 1288 : replace(_Where, _Where, _First, _Last);
; 1289 : return (begin() + _Off);
; 1290 : }
; 1291 :
; 1292 : iterator insert(const_iterator _Where,
; 1293 : const_pointer _First, const_pointer _Last)
; 1294 : { // insert [_First, _Last) at _Where, const pointers
; 1295 : size_type _Off = _Pdif(_Where, begin());
; 1296 : replace(_Where, _Where, _First, _Last);
; 1297 : return (begin() + _Off);
; 1298 : }
; 1299 :
; 1300 : iterator insert(const_iterator _Where,
; 1301 : const_iterator _First, const_iterator _Last)
; 1302 : { // insert [_First, _Last) at _Where, const_iterators
; 1303 : size_type _Off = _Pdif(_Where, begin());
; 1304 : replace(_Where, _Where, _First, _Last);
; 1305 : return (begin() + _Off);
; 1306 : }
; 1307 :
; 1308 : _Myt& erase(size_type _Off = 0)
; 1309 : { // erase elements [_Off, ...)
; 1310 : if (this->_Mysize < _Off)
; 1311 : _Xran(); // _Off off end
; 1312 : _Eos(_Off);
; 1313 : return (*this);
; 1314 : }
; 1315 :
; 1316 : _Myt& erase(size_type _Off, size_type _Count)
; 1317 : { // erase elements [_Off, _Off + _Count)
; 1318 : if (this->_Mysize < _Off)
; 1319 : _Xran(); // _Off off end
; 1320 : if (this->_Mysize - _Off <= _Count)
; 1321 : _Eos(_Off); // erase elements [_Off, ...)
; 1322 : else if (0 < _Count)
; 1323 : { // move elements down
; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
; 1325 : size_type _Newsize = this->_Mysize - _Count;
; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
; 1327 : _Eos(_Newsize);
; 1328 : }
; 1329 : return (*this);
; 1330 : }
; 1331 :
; 1332 : iterator erase(const_iterator _Where)
; 1333 : { // erase element at _Where
; 1334 : size_type _Count = _Pdif(_Where, begin());
; 1335 : erase(_Count, 1);
; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1337 : }
; 1338 :
; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
; 1340 : { // erase substring [_First, _Last)
; 1341 : _DEBUG_RANGE(_First, _Last);
; 1342 : size_type _Count = _Pdif(_First, begin());
; 1343 : erase(_Count, _Pdif(_Last, _First));
; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1345 : }
; 1346 :
; 1347 : void clear() _NOEXCEPT
; 1348 : { // erase all
; 1349 : _Eos(0);
; 1350 : }
; 1351 :
; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
; 1353 : { // replace [_Off, _Off + _N0) with _Right
; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
; 1355 : }
; 1356 :
; 1357 : _Myt& replace(size_type _Off,
; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1361 : _Xran(); // _Off or _Roff off end
; 1362 : if (this->_Mysize - _Off < _N0)
; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1364 : size_type _Num = _Right.size() - _Roff;
; 1365 : if (_Num < _Count)
; 1366 : _Count = _Num; // trim _Count to size
; 1367 : if (npos - _Count <= this->_Mysize - _N0)
; 1368 : _Xlen(); // result too long
; 1369 :
; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
; 1372 : if (this->_Mysize < _Newsize)
; 1373 : _Grow(_Newsize);
; 1374 :
; 1375 : if (this != &_Right)
; 1376 : { // no overlap, just move down and copy in new stuff
; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
; 1379 : _Traits::copy(this->_Myptr() + _Off,
; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1381 : }
; 1382 : else if (_Count <= _N0)
; 1383 : { // hole doesn't get larger, just copy in substring
; 1384 : _Traits::move(this->_Myptr() + _Off,
; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1388 : }
; 1389 : else if (_Roff <= _Off)
; 1390 : { // hole gets larger, substring begins before hole
; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1393 : _Traits::move(this->_Myptr() + _Off,
; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
; 1395 : }
; 1396 : else if (_Off + _N0 <= _Roff)
; 1397 : { // hole gets larger, substring begins after hole
; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1400 : _Traits::move(this->_Myptr() + _Off,
; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
; 1402 : _Count); // fill hole
; 1403 : }
; 1404 : else
; 1405 : { // hole gets larger, substring begins in hole
; 1406 : _Traits::move(this->_Myptr() + _Off,
; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
; 1411 : this->_Myptr() + _Roff + _Count,
; 1412 : _Count - _N0); // fill rest of new hole
; 1413 : }
; 1414 :
; 1415 : _Eos(_Newsize);
; 1416 : return (*this);
; 1417 : }
; 1418 :
; 1419 : _Myt& replace(size_type _Off,
; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1423 : if (_Count != 0)
; 1424 : _DEBUG_POINTER(_Ptr);
; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1426 :
; 1427 : if (_Inside(_Ptr))
; 1428 : return (replace(_Off, _N0, *this,
; 1429 : _Ptr - this->_Myptr(),
; 1430 : _Count)); // substring, replace carefully
; 1431 : if (this->_Mysize < _Off)
; 1432 : _Xran(); // _Off off end
; 1433 : if (this->_Mysize - _Off < _N0)
; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1435 : if (npos - _Count <= this->_Mysize - _N0)
; 1436 : _Xlen(); // result too long
; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1438 :
; 1439 : if (_Count < _N0)
; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1441 : this->_Myptr() + _Off + _N0,
; 1442 : _Nm); // smaller hole, move tail up
; 1443 : size_type _Num;
; 1444 : if ((0 < _Count || 0 < _N0)
; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1446 : { // make room and rearrange
; 1447 : if (_N0 < _Count)
; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1451 : _Eos(_Num);
; 1452 : }
; 1453 : return (*this);
; 1454 : }
; 1455 :
; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
; 1458 : _DEBUG_POINTER(_Ptr);
; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 1460 : }
; 1461 :
; 1462 : _Myt& replace(size_type _Off,
; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
; 1465 : if (this->_Mysize < _Off)
; 1466 : _Xran(); // _Off off end
; 1467 : if (this->_Mysize - _Off < _N0)
; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1469 : if (npos - _Count <= this->_Mysize - _N0)
; 1470 : _Xlen(); // result too long
; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1472 :
; 1473 : if (_Count < _N0)
; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1475 : this->_Myptr() + _Off + _N0,
; 1476 : _Nm); // smaller hole, move tail up
; 1477 : size_type _Num;
; 1478 : if ((0 < _Count || 0 < _N0)
; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1480 : { // make room and rearrange
; 1481 : if (_N0 < _Count)
; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1485 : _Eos(_Num);
; 1486 : }
; 1487 : return (*this);
; 1488 : }
; 1489 :
; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1491 : const _Myt& _Right)
; 1492 : { // replace [_First, _Last) with _Right
; 1493 : return (replace(
; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
; 1495 : }
; 1496 :
; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1498 : const _Elem *_Ptr, size_type _Count)
; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
; 1500 : return (replace(
; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
; 1502 : }
; 1503 :
; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1505 : const _Elem *_Ptr)
; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
; 1507 : return (replace(
; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
; 1509 : }
; 1510 :
; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1512 : size_type _Count, _Elem _Ch)
; 1513 : { // replace [_First, _Last) with _Count * _Ch
; 1514 : return (replace(
; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
; 1516 : }
; 1517 :
; 1518 : template<class _Iter>
; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
; 1520 : _Myt&>::type
; 1521 : replace(const_iterator _First, const_iterator _Last,
; 1522 : _Iter _First2, _Iter _Last2)
; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
; 1524 : _Myt _Right(_First2, _Last2);
; 1525 : replace(_First, _Last, _Right);
; 1526 : return (*this);
; 1527 : }
; 1528 :
; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1530 : const_pointer _First2, const_pointer _Last2)
; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1532 : if (_First2 == _Last2)
; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1534 : else
; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1536 : &*_First2, _Last2 - _First2);
; 1537 : return (*this);
; 1538 : }
; 1539 :
; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1541 : pointer _First2, pointer _Last2)
; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1543 : if (_First2 == _Last2)
; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1545 : else
; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1547 : &*_First2, _Last2 - _First2);
; 1548 : return (*this);
; 1549 : }
; 1550 :
; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1552 : const_iterator _First2, const_iterator _Last2)
; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1554 : if (_First2 == _Last2)
; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1556 : else
; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1558 : &*_First2, _Last2 - _First2);
; 1559 : return (*this);
; 1560 : }
; 1561 :
; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1563 : iterator _First2, iterator _Last2)
; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1565 : if (_First2 == _Last2)
; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1567 : else
; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1569 : &*_First2, _Last2 - _First2);
; 1570 : return (*this);
; 1571 : }
; 1572 :
; 1573 : iterator begin() _NOEXCEPT
; 1574 : { // return iterator for beginning of mutable sequence
; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
; 1576 : }
; 1577 :
; 1578 : const_iterator begin() const _NOEXCEPT
; 1579 : { // return iterator for beginning of nonmutable sequence
; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
; 1581 : }
; 1582 :
; 1583 : iterator end() _NOEXCEPT
; 1584 : { // return iterator for end of mutable sequence
; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
; 1586 : }
; 1587 :
; 1588 : const_iterator end() const _NOEXCEPT
; 1589 : { // return iterator for end of nonmutable sequence
; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
; 1591 : }
; 1592 :
; 1593 : reverse_iterator rbegin() _NOEXCEPT
; 1594 : { // return iterator for beginning of reversed mutable sequence
; 1595 : return (reverse_iterator(end()));
; 1596 : }
; 1597 :
; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
; 1599 : { // return iterator for beginning of reversed nonmutable sequence
; 1600 : return (const_reverse_iterator(end()));
; 1601 : }
; 1602 :
; 1603 : reverse_iterator rend() _NOEXCEPT
; 1604 : { // return iterator for end of reversed mutable sequence
; 1605 : return (reverse_iterator(begin()));
; 1606 : }
; 1607 :
; 1608 : const_reverse_iterator rend() const _NOEXCEPT
; 1609 : { // return iterator for end of reversed nonmutable sequence
; 1610 : return (const_reverse_iterator(begin()));
; 1611 : }
; 1612 :
; 1613 : #if _HAS_CPP0X
; 1614 : const_iterator cbegin() const _NOEXCEPT
; 1615 : { // return iterator for beginning of nonmutable sequence
; 1616 : return (((const _Myt *)this)->begin());
; 1617 : }
; 1618 :
; 1619 : const_iterator cend() const _NOEXCEPT
; 1620 : { // return iterator for end of nonmutable sequence
; 1621 : return (((const _Myt *)this)->end());
; 1622 : }
; 1623 :
; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
; 1625 : { // return iterator for beginning of reversed nonmutable sequence
; 1626 : return (((const _Myt *)this)->rbegin());
; 1627 : }
; 1628 :
; 1629 : const_reverse_iterator crend() const _NOEXCEPT
; 1630 : { // return iterator for end of reversed nonmutable sequence
; 1631 : return (((const _Myt *)this)->rend());
; 1632 : }
; 1633 :
; 1634 : void shrink_to_fit()
; 1635 : { // reduce capacity
; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
; 1637 : { // worth shrinking, do it
; 1638 : _Myt _Tmp(*this);
; 1639 : swap(_Tmp);
; 1640 : }
; 1641 : }
; 1642 : #endif /* _HAS_CPP0X */
; 1643 :
; 1644 : reference at(size_type _Off)
; 1645 : { // subscript mutable sequence with checking
; 1646 : if (this->_Mysize <= _Off)
; 1647 : _Xran(); // _Off off end
; 1648 : return (this->_Myptr()[_Off]);
; 1649 : }
; 1650 :
; 1651 : const_reference at(size_type _Off) const
; 1652 : { // subscript nonmutable sequence with checking
; 1653 : if (this->_Mysize <= _Off)
; 1654 : _Xran(); // _Off off end
; 1655 : return (this->_Myptr()[_Off]);
; 1656 : }
; 1657 :
; 1658 : reference operator[](size_type _Off)
; 1659 : { // subscript mutable sequence
; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1661 : if (this->_Mysize < _Off) // sic
; 1662 : _DEBUG_ERROR("string subscript out of range");
; 1663 :
; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1667 :
; 1668 : return (this->_Myptr()[_Off]);
; 1669 : }
; 1670 :
; 1671 : const_reference operator[](size_type _Off) const
; 1672 : { // subscript nonmutable sequence
; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1674 : if (this->_Mysize < _Off) // sic
; 1675 : _DEBUG_ERROR("string subscript out of range");
; 1676 :
; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1680 :
; 1681 : return (this->_Myptr()[_Off]);
; 1682 : }
; 1683 :
; 1684 : void push_back(_Elem _Ch)
; 1685 : { // insert element at end
; 1686 : insert(end(), _Ch);
; 1687 : }
; 1688 :
; 1689 : #if _HAS_CPP0X
; 1690 : void pop_back()
; 1691 : { // erase element at end
; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
; 1693 : }
; 1694 :
; 1695 : reference front()
; 1696 : { // return first element of mutable sequence
; 1697 : return (*begin());
; 1698 : }
; 1699 :
; 1700 : const_reference front() const
; 1701 : { // return first element of nonmutable sequence
; 1702 : return (*begin());
; 1703 : }
; 1704 :
; 1705 : reference back()
; 1706 : { // return last element of mutable sequence
; 1707 : return (*(end() - 1));
; 1708 : }
; 1709 :
; 1710 : const_reference back() const
; 1711 : { // return last element of nonmutable sequence
; 1712 : return (*(end() - 1));
; 1713 : }
; 1714 : #endif /* _HAS_CPP0X */
; 1715 :
; 1716 : const _Elem *c_str() const _NOEXCEPT
; 1717 : { // return pointer to null-terminated nonmutable array
; 1718 : return (this->_Myptr());
; 1719 : }
; 1720 :
; 1721 : const _Elem *data() const _NOEXCEPT
; 1722 : { // return pointer to nonmutable array
; 1723 : return (c_str());
; 1724 : }
; 1725 :
; 1726 : size_type length() const _NOEXCEPT
; 1727 : { // return length of sequence
; 1728 : return (this->_Mysize);
; 1729 : }
; 1730 :
; 1731 : size_type size() const _NOEXCEPT
; 1732 : { // return length of sequence
; 1733 : return (this->_Mysize);
; 1734 : }
; 1735 :
; 1736 : size_type max_size() const _NOEXCEPT
; 1737 : { // return maximum possible length of sequence
; 1738 : size_type _Num = this->_Getal().max_size();
; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
; 1740 : }
; 1741 :
; 1742 : void resize(size_type _Newsize)
; 1743 : { // determine new length, padding with null elements as needed
; 1744 : resize(_Newsize, _Elem());
; 1745 : }
; 1746 :
; 1747 : void resize(size_type _Newsize, _Elem _Ch)
; 1748 : { // determine new length, padding with _Ch elements as needed
; 1749 : if (_Newsize <= this->_Mysize)
; 1750 : _Eos(_Newsize);
; 1751 : else
; 1752 : append(_Newsize - this->_Mysize, _Ch);
; 1753 : }
; 1754 :
; 1755 : size_type capacity() const _NOEXCEPT
; 1756 : { // return current length of allocated storage
; 1757 : return (this->_Myres);
; 1758 : }
; 1759 :
; 1760 : void reserve(size_type _Newcap = 0)
; 1761 : { // determine new minimum length of allocated storage
; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
; 1763 : { // change reservation
; 1764 : size_type _Size = this->_Mysize;
; 1765 : if (_Grow(_Newcap, true))
; 1766 : _Eos(_Size);
; 1767 : }
; 1768 : }
; 1769 :
; 1770 : bool empty() const _NOEXCEPT
; 1771 : { // test if sequence is empty
; 1772 : return (this->_Mysize == 0);
; 1773 : }
; 1774 :
; 1775 : _SCL_INSECURE_DEPRECATE
; 1776 :
; 1777 : size_type copy(_Elem *_Ptr,
; 1778 : size_type _Count, size_type _Off = 0) const
; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1781 : if (_Count != 0)
; 1782 : _DEBUG_POINTER(_Ptr);
; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1784 :
; 1785 : if (this->_Mysize < _Off)
; 1786 : _Xran(); // _Off off end
; 1787 : if (this->_Mysize - _Off < _Count)
; 1788 : _Count = this->_Mysize - _Off;
; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
; 1790 : return (_Count);
; 1791 : }
; 1792 :
; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
; 1794 : size_type _Count, size_type _Off = 0) const
; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1797 : if (_Count != 0)
; 1798 : _DEBUG_POINTER(_Dest);
; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1800 :
; 1801 : if (this->_Mysize < _Off)
; 1802 : _Xran(); // _Off off end
; 1803 : if (this->_Mysize - _Off < _Count)
; 1804 : _Count = this->_Mysize - _Off;
; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
; 1806 : return (_Count);
; 1807 : }
; 1808 :
; 1809 : void _Swap_bx(_Myt& _Right)
; 1810 : { // exchange _Bx with _Right._Bx
; 1811 : if (this->_BUF_SIZE <= this->_Myres)
; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
; 1814 : else
; 1815 : { // swap large with small
; 1816 : pointer _Ptr = this->_Bx._Ptr;
; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
; 1818 : _Traits::copy(this->_Bx._Buf,
; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
; 1821 : }
; 1822 : else
; 1823 : if (_Right._Myres < this->_BUF_SIZE)
; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
; 1825 : else
; 1826 : { // swap small with large
; 1827 : pointer _Ptr = _Right._Bx._Ptr;
; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
; 1829 : _Traits::copy(_Right._Bx._Buf,
; 1830 : this->_Bx._Buf, this->_Mysize + 1);
; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 1832 : }
; 1833 : }
; 1834 :
; 1835 : void swap(_Myt& _Right)
; 1836 : { // exchange contents with _Right
; 1837 : if (this == &_Right)
; 1838 : ; // same object, do nothing
; 1839 : else if (this->_Getal() == _Right._Getal())
; 1840 : { // same allocator, swap control information
; 1841 : this->_Swap_all(_Right);
; 1842 : _Swap_bx(_Right);
; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
; 1844 : _STD swap(this->_Myres, _Right._Myres);
; 1845 : }
; 1846 :
; 1847 : #if _HAS_CPP0X
; 1848 : else if (_Alty::propagate_on_container_swap::value)
; 1849 : { // swap allocators and control information
; 1850 : this->_Swap_alloc(_Right);
; 1851 : _Swap_bx(_Right);
; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
; 1854 : _STD swap(this->_Myres, _Right._Myres);
; 1855 : }
; 1856 : #endif /* _HAS_CPP0X */
; 1857 :
; 1858 : else
; 1859 : { // different allocator, do multiple assigns
; 1860 : _Myt _Tmp = *this;
; 1861 :
; 1862 : *this = _Right;
; 1863 : _Right = _Tmp;
; 1864 : }
; 1865 : }
; 1866 :
; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
; 1868 : { // look for _Right beginning at or after _Off
; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
; 1870 : }
; 1871 :
; 1872 : size_type find(const _Elem *_Ptr,
; 1873 : size_type _Off, size_type _Count) const
; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1876 : if (_Count != 0)
; 1877 : _DEBUG_POINTER(_Ptr);
; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1879 :
; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
; 1881 : return (_Off); // null string always matches (if inside string)
; 1882 :
; 1883 : size_type _Nm;
; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
; 1885 : { // room for match, look for it
; 1886 : const _Elem *_Uptr, *_Vptr;
; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1891 : return (_Uptr - this->_Myptr()); // found a match
; 1892 : }
; 1893 :
; 1894 : return (npos); // no match
; 1895 : }
; 1896 :
; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
; 1899 : _DEBUG_POINTER(_Ptr);
; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
; 1901 : }
; 1902 :
; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
; 1904 : { // look for _Ch at or after _Off
; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1906 : }
; 1907 :
; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
; 1909 : { // look for _Right beginning before _Off
; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
; 1911 : }
; 1912 :
; 1913 : size_type rfind(const _Elem *_Ptr,
; 1914 : size_type _Off, size_type _Count) const
; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1917 : if (_Count != 0)
; 1918 : _DEBUG_POINTER(_Ptr);
; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1920 :
; 1921 : if (_Count == 0)
; 1922 : return (_Off < this->_Mysize ? _Off
; 1923 : : this->_Mysize); // null always matches
; 1924 : if (_Count <= this->_Mysize)
; 1925 : { // room for match, look for it
; 1926 : const _Elem *_Uptr = this->_Myptr() +
; 1927 : (_Off < this->_Mysize - _Count ? _Off
; 1928 : : this->_Mysize - _Count);
; 1929 : for (; ; --_Uptr)
; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1932 : return (_Uptr - this->_Myptr()); // found a match
; 1933 : else if (_Uptr == this->_Myptr())
; 1934 : break; // at beginning, no more chance for match
; 1935 : }
; 1936 :
; 1937 : return (npos); // no match
; 1938 : }
; 1939 :
; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
; 1941 : { // look for [_Ptr, <null>) beginning before _Off
; 1942 : _DEBUG_POINTER(_Ptr);
; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
; 1944 : }
; 1945 :
; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
; 1947 : { // look for _Ch before _Off
; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 1949 : }
; 1950 :
; 1951 : size_type find_first_of(const _Myt& _Right,
; 1952 : size_type _Off = 0) const _NOEXCEPT
; 1953 : { // look for one of _Right at or after _Off
; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
; 1955 : }
; 1956 :
; 1957 : size_type find_first_of(const _Elem *_Ptr,
; 1958 : size_type _Off, size_type _Count) const
; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1961 : if (_Count != 0)
; 1962 : _DEBUG_POINTER(_Ptr);
; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1964 :
; 1965 : if (0 < _Count && _Off < this->_Mysize)
; 1966 : { // room for match, look for it
; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 1969 : _Uptr < _Vptr; ++_Uptr)
; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 1971 : return (_Uptr - this->_Myptr()); // found a match
; 1972 : }
; 1973 :
; 1974 : return (npos); // no match
; 1975 : }
; 1976 :
; 1977 : size_type find_first_of(const _Elem *_Ptr,
; 1978 : size_type _Off = 0) const
; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
; 1980 : _DEBUG_POINTER(_Ptr);
; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 1982 : }
; 1983 :
; 1984 : size_type find_first_of(_Elem _Ch,
; 1985 : size_type _Off = 0) const
; 1986 : { // look for _Ch at or after _Off
; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1988 : }
; 1989 :
; 1990 : size_type find_last_of(const _Myt& _Right,
; 1991 : size_type _Off = npos) const _NOEXCEPT
; 1992 : { // look for one of _Right before _Off
; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
; 1994 : }
; 1995 :
; 1996 : size_type find_last_of(const _Elem *_Ptr,
; 1997 : size_type _Off, size_type _Count) const
; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2000 : if (_Count != 0)
; 2001 : _DEBUG_POINTER(_Ptr);
; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2003 :
; 2004 : if (0 < _Count && 0 < this->_Mysize)
; 2005 : { // worth searching, do it
; 2006 : const _Elem *_Uptr = this->_Myptr()
; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2008 : for (; ; --_Uptr)
; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 2010 : return (_Uptr - this->_Myptr()); // found a match
; 2011 : else if (_Uptr == this->_Myptr())
; 2012 : break; // at beginning, no more chance for match
; 2013 : }
; 2014 :
; 2015 : return (npos); // no match
; 2016 : }
; 2017 :
; 2018 : size_type find_last_of(const _Elem *_Ptr,
; 2019 : size_type _Off = npos) const
; 2020 : { // look for one of [_Ptr, <null>) before _Off
; 2021 : _DEBUG_POINTER(_Ptr);
; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2023 : }
; 2024 :
; 2025 : size_type find_last_of(_Elem _Ch,
; 2026 : size_type _Off = npos) const
; 2027 : { // look for _Ch before _Off
; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 2029 : }
; 2030 :
; 2031 : size_type find_first_not_of(const _Myt& _Right,
; 2032 : size_type _Off = 0) const _NOEXCEPT
; 2033 : { // look for none of _Right at or after _Off
; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
; 2035 : _Right.size()));
; 2036 : }
; 2037 :
; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
; 2039 : size_type _Off, size_type _Count) const
; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2042 : if (_Count != 0)
; 2043 : _DEBUG_POINTER(_Ptr);
; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2045 :
; 2046 : if (_Off < this->_Mysize)
; 2047 : { // room for match, look for it
; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 2050 : _Uptr < _Vptr; ++_Uptr)
; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2052 : return (_Uptr - this->_Myptr());
; 2053 : }
; 2054 : return (npos);
; 2055 : }
; 2056 :
; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
; 2058 : size_type _Off = 0) const
; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
; 2060 : _DEBUG_POINTER(_Ptr);
; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2062 : }
; 2063 :
; 2064 : size_type find_first_not_of(_Elem _Ch,
; 2065 : size_type _Off = 0) const
; 2066 : { // look for non _Ch at or after _Off
; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
; 2068 : }
; 2069 :
; 2070 : size_type find_last_not_of(const _Myt& _Right,
; 2071 : size_type _Off = npos) const _NOEXCEPT
; 2072 : { // look for none of _Right before _Off
; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
; 2074 : }
; 2075 :
; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
; 2077 : size_type _Off, size_type _Count) const
; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2080 : if (_Count != 0)
; 2081 : _DEBUG_POINTER(_Ptr);
; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2083 :
; 2084 : if (0 < this->_Mysize)
; 2085 : { // worth searching, do it
; 2086 : const _Elem *_Uptr = this->_Myptr()
; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2088 : for (; ; --_Uptr)
; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2090 : return (_Uptr - this->_Myptr());
; 2091 : else if (_Uptr == this->_Myptr())
; 2092 : break;
; 2093 : }
; 2094 : return (npos);
; 2095 : }
; 2096 :
; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
; 2098 : size_type _Off = npos) const
; 2099 : { // look for none of [_Ptr, <null>) before _Off
; 2100 : _DEBUG_POINTER(_Ptr);
; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2102 : }
; 2103 :
; 2104 : size_type find_last_not_of(_Elem _Ch,
; 2105 : size_type _Off = npos) const
; 2106 : { // look for non _Ch before _Off
; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
; 2108 : }
; 2109 :
; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
; 2111 : { // return [_Off, _Off + _Count) as new string
; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
; 2113 : }
; 2114 :
; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
; 2116 : { // compare [0, _Mysize) with _Right
; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
; 2118 : }
; 2119 :
; 2120 : int compare(size_type _Off, size_type _N0,
; 2121 : const _Myt& _Right) const
; 2122 : { // compare [_Off, _Off + _N0) with _Right
; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
; 2124 : }
; 2125 :
; 2126 : int compare(size_type _Off,
; 2127 : size_type _N0, const _Myt& _Right,
; 2128 : size_type _Roff, size_type _Count) const
; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 2130 : if (_Right.size() < _Roff)
; 2131 : _Xran(); // _Off off end
; 2132 : if (_Right._Mysize - _Roff < _Count)
; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
; 2135 : }
; 2136 :
; 2137 : int compare(const _Elem *_Ptr) const
; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
; 2139 : _DEBUG_POINTER(_Ptr);
; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
; 2141 : }
; 2142 :
; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
; 2145 : _DEBUG_POINTER(_Ptr);
; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 2147 : }
; 2148 :
; 2149 : int compare(size_type _Off,
; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2153 : if (_Count != 0)
; 2154 : _DEBUG_POINTER(_Ptr);
; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2156 :
; 2157 : if (this->_Mysize < _Off)
; 2158 : _Xran(); // _Off off end
; 2159 : if (this->_Mysize - _Off < _N0)
; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 2161 :
; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
; 2163 : _N0 < _Count ? _N0 : _Count);
; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
; 2165 : : _N0 == _Count ? 0 : +1);
; 2166 : }
; 2167 :
; 2168 : allocator_type get_allocator() const _NOEXCEPT
; 2169 : { // return allocator object for values
; 2170 : return (this->_Getal());
; 2171 : }
; 2172 :
; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
; 2174 : { // assign _Count copies of _Ch beginning at _Off
; 2175 : if (_Count == 1)
; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
; 2177 : else
; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
; 2179 : }
; 2180 :
; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
; 2182 : { // copy _Oldlen elements to newly allocated buffer
; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
; 2184 : if (max_size() < _Newres)
; 2185 : _Newres = _Newsize; // undo roundup if too big
; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
; 2187 : ;
; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
; 2189 : _Newres = this->_Myres
; 2190 : + this->_Myres / 2; // grow exponentially if possible
; 2191 : else
; 2192 : _Newres = max_size(); // settle for max_size()
; 2193 :
; 2194 : _Elem *_Ptr;
; 2195 : _TRY_BEGIN
; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2197 : _CATCH_ALL
; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
; 2199 : _TRY_BEGIN
; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2201 : _CATCH_ALL
; 2202 : _Tidy(true); // failed again, discard storage and reraise
; 2203 : _RERAISE;
; 2204 : _CATCH_END
; 2205 : _CATCH_END
; 2206 :
; 2207 : if (0 < _Oldlen)
; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
; 2209 : _Oldlen); // copy existing elements
; 2210 : _Tidy(true);
; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 2212 : this->_Myres = _Newres;
; 2213 : _Eos(_Oldlen);
; 2214 : }
; 2215 :
; 2216 : void _Eos(size_type _Newsize)
; 2217 : { // set new length and null terminator
; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
mov DWORD PTR [esi+16], edi
; 517 : : this->_Bx._Buf);
cmp eax, 16 ; 00000010H
jb SHORT $LN87@assign
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
; 88 : reinterpret_cast<const volatile char&>(_Val)))));
mov eax, DWORD PTR [esi]
pop edi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 564 : _Left = _Right;
mov BYTE PTR [eax], 0
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1138 : return (*this);
mov eax, esi
pop esi
pop ebx
; 1139 : }
pop ebp
ret 8
$LN87@assign:
pop edi
; 517 : : this->_Bx._Buf);
mov eax, esi
pop esi
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 564 : _Left = _Right;
mov BYTE PTR [eax], 0
pop ebx
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 1139 : }
pop ebp
ret 8
$LN96@assign:
; 517 : : this->_Bx._Buf);
mov eax, esi
$LN97@assign:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
; 530 : : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
test edi, edi
je SHORT $LN103@assign
push edi
push ebx
push eax
call _memcpy
add esp, 12 ; 0000000cH
$LN103@assign:
; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
; 517 : : this->_Bx._Buf);
cmp DWORD PTR [esi+20], 16 ; 00000010H
; 1140 :
; 1141 : _Myt& assign(const _Elem *_Ptr)
; 1142 : { // assign [_Ptr, <null>)
; 1143 : _DEBUG_POINTER(_Ptr);
; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
; 1145 : }
; 1146 :
; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
; 1148 : { // assign _Count * _Ch
; 1149 : if (_Count == npos)
; 1150 : _Xlen(); // result too long
; 1151 :
; 1152 : if (_Grow(_Count))
; 1153 : { // make room and assign new stuff
; 1154 : _Chassign(0, _Count, _Ch);
; 1155 : _Eos(_Count);
; 1156 : }
; 1157 : return (*this);
; 1158 : }
; 1159 :
; 1160 : template<class _Iter>
; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
; 1162 : _Myt&>::type
; 1163 : assign(_Iter _First, _Iter _Last)
; 1164 : { // assign [First, _Last), input iterators
; 1165 : return (replace(begin(), end(), _First, _Last));
; 1166 : }
; 1167 :
; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
; 1169 : { // assign [First, _Last), const pointers
; 1170 : return (replace(begin(), end(), _First, _Last));
; 1171 : }
; 1172 :
; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
; 1174 : { // assign [First, _Last), const_iterators
; 1175 : return (replace(begin(), end(), _First, _Last));
; 1176 : }
; 1177 :
; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
; 1179 : { // insert _Right at _Off
; 1180 : return (insert(_Off, _Right, 0, npos));
; 1181 : }
; 1182 :
; 1183 : _Myt& insert(size_type _Off,
; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1187 : _Xran(); // _Off or _Roff off end
; 1188 : size_type _Num = _Right.size() - _Roff;
; 1189 : if (_Num < _Count)
; 1190 : _Count = _Num; // trim _Count to size
; 1191 : if (npos - this->_Mysize <= _Count)
; 1192 : _Xlen(); // result too long
; 1193 :
; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1195 : { // make room and insert new stuff
; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1197 : this->_Myptr() + _Off,
; 1198 : this->_Mysize - _Off); // empty out hole
; 1199 : if (this == &_Right)
; 1200 : _Traits::move(this->_Myptr() + _Off,
; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
; 1202 : _Count); // substring
; 1203 : else
; 1204 : _Traits::copy(this->_Myptr() + _Off,
; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1206 : _Eos(_Num);
; 1207 : }
; 1208 : return (*this);
; 1209 : }
; 1210 :
; 1211 : _Myt& insert(size_type _Off,
; 1212 : const _Elem *_Ptr, size_type _Count)
; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1215 : if (_Count != 0)
; 1216 : _DEBUG_POINTER(_Ptr);
; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1218 :
; 1219 : if (_Inside(_Ptr))
; 1220 : return (insert(_Off, *this,
; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
; 1222 : if (this->_Mysize < _Off)
; 1223 : _Xran(); // _Off off end
; 1224 : if (npos - this->_Mysize <= _Count)
; 1225 : _Xlen(); // result too long
; 1226 : size_type _Num;
; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1228 : { // make room and insert new stuff
; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1230 : this->_Myptr() + _Off,
; 1231 : this->_Mysize - _Off); // empty out hole
; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1233 : _Eos(_Num);
; 1234 : }
; 1235 : return (*this);
; 1236 : }
; 1237 :
; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
; 1239 : { // insert [_Ptr, <null>) at _Off
; 1240 : _DEBUG_POINTER(_Ptr);
; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
; 1242 : }
; 1243 :
; 1244 : _Myt& insert(size_type _Off,
; 1245 : size_type _Count, _Elem _Ch)
; 1246 : { // insert _Count * _Ch at _Off
; 1247 : if (this->_Mysize < _Off)
; 1248 : _Xran(); // _Off off end
; 1249 : if (npos - this->_Mysize <= _Count)
; 1250 : _Xlen(); // result too long
; 1251 : size_type _Num;
; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
; 1253 : { // make room and insert new stuff
; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1255 : this->_Myptr() + _Off,
; 1256 : this->_Mysize - _Off); // empty out hole
; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1258 : _Eos(_Num);
; 1259 : }
; 1260 : return (*this);
; 1261 : }
; 1262 :
; 1263 : iterator insert(const_iterator _Where)
; 1264 : { // insert <null> at _Where
; 1265 : return (insert(_Where, _Elem()));
; 1266 : }
; 1267 :
; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
; 1269 : { // insert _Ch at _Where
; 1270 : size_type _Off = _Pdif(_Where, begin());
; 1271 : insert(_Off, 1, _Ch);
; 1272 : return (begin() + _Off);
; 1273 : }
; 1274 :
; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
; 1276 : { // insert _Count * _Elem at _Where
; 1277 : size_type _Off = _Pdif(_Where, begin());
; 1278 : insert(_Off, _Count, _Ch);
; 1279 : return (begin() + _Off);
; 1280 : }
; 1281 :
; 1282 : template<class _Iter>
; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
; 1284 : iterator>::type
; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
; 1286 : { // insert [_First, _Last) at _Where, input iterators
; 1287 : size_type _Off = _Pdif(_Where, begin());
; 1288 : replace(_Where, _Where, _First, _Last);
; 1289 : return (begin() + _Off);
; 1290 : }
; 1291 :
; 1292 : iterator insert(const_iterator _Where,
; 1293 : const_pointer _First, const_pointer _Last)
; 1294 : { // insert [_First, _Last) at _Where, const pointers
; 1295 : size_type _Off = _Pdif(_Where, begin());
; 1296 : replace(_Where, _Where, _First, _Last);
; 1297 : return (begin() + _Off);
; 1298 : }
; 1299 :
; 1300 : iterator insert(const_iterator _Where,
; 1301 : const_iterator _First, const_iterator _Last)
; 1302 : { // insert [_First, _Last) at _Where, const_iterators
; 1303 : size_type _Off = _Pdif(_Where, begin());
; 1304 : replace(_Where, _Where, _First, _Last);
; 1305 : return (begin() + _Off);
; 1306 : }
; 1307 :
; 1308 : _Myt& erase(size_type _Off = 0)
; 1309 : { // erase elements [_Off, ...)
; 1310 : if (this->_Mysize < _Off)
; 1311 : _Xran(); // _Off off end
; 1312 : _Eos(_Off);
; 1313 : return (*this);
; 1314 : }
; 1315 :
; 1316 : _Myt& erase(size_type _Off, size_type _Count)
; 1317 : { // erase elements [_Off, _Off + _Count)
; 1318 : if (this->_Mysize < _Off)
; 1319 : _Xran(); // _Off off end
; 1320 : if (this->_Mysize - _Off <= _Count)
; 1321 : _Eos(_Off); // erase elements [_Off, ...)
; 1322 : else if (0 < _Count)
; 1323 : { // move elements down
; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
; 1325 : size_type _Newsize = this->_Mysize - _Count;
; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
; 1327 : _Eos(_Newsize);
; 1328 : }
; 1329 : return (*this);
; 1330 : }
; 1331 :
; 1332 : iterator erase(const_iterator _Where)
; 1333 : { // erase element at _Where
; 1334 : size_type _Count = _Pdif(_Where, begin());
; 1335 : erase(_Count, 1);
; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1337 : }
; 1338 :
; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
; 1340 : { // erase substring [_First, _Last)
; 1341 : _DEBUG_RANGE(_First, _Last);
; 1342 : size_type _Count = _Pdif(_First, begin());
; 1343 : erase(_Count, _Pdif(_Last, _First));
; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
; 1345 : }
; 1346 :
; 1347 : void clear() _NOEXCEPT
; 1348 : { // erase all
; 1349 : _Eos(0);
; 1350 : }
; 1351 :
; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
; 1353 : { // replace [_Off, _Off + _N0) with _Right
; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
; 1355 : }
; 1356 :
; 1357 : _Myt& replace(size_type _Off,
; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
; 1361 : _Xran(); // _Off or _Roff off end
; 1362 : if (this->_Mysize - _Off < _N0)
; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1364 : size_type _Num = _Right.size() - _Roff;
; 1365 : if (_Num < _Count)
; 1366 : _Count = _Num; // trim _Count to size
; 1367 : if (npos - _Count <= this->_Mysize - _N0)
; 1368 : _Xlen(); // result too long
; 1369 :
; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
; 1372 : if (this->_Mysize < _Newsize)
; 1373 : _Grow(_Newsize);
; 1374 :
; 1375 : if (this != &_Right)
; 1376 : { // no overlap, just move down and copy in new stuff
; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
; 1379 : _Traits::copy(this->_Myptr() + _Off,
; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
; 1381 : }
; 1382 : else if (_Count <= _N0)
; 1383 : { // hole doesn't get larger, just copy in substring
; 1384 : _Traits::move(this->_Myptr() + _Off,
; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1388 : }
; 1389 : else if (_Roff <= _Off)
; 1390 : { // hole gets larger, substring begins before hole
; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1393 : _Traits::move(this->_Myptr() + _Off,
; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
; 1395 : }
; 1396 : else if (_Off + _N0 <= _Roff)
; 1397 : { // hole gets larger, substring begins after hole
; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1400 : _Traits::move(this->_Myptr() + _Off,
; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
; 1402 : _Count); // fill hole
; 1403 : }
; 1404 : else
; 1405 : { // hole gets larger, substring begins in hole
; 1406 : _Traits::move(this->_Myptr() + _Off,
; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
; 1411 : this->_Myptr() + _Roff + _Count,
; 1412 : _Count - _N0); // fill rest of new hole
; 1413 : }
; 1414 :
; 1415 : _Eos(_Newsize);
; 1416 : return (*this);
; 1417 : }
; 1418 :
; 1419 : _Myt& replace(size_type _Off,
; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1423 : if (_Count != 0)
; 1424 : _DEBUG_POINTER(_Ptr);
; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1426 :
; 1427 : if (_Inside(_Ptr))
; 1428 : return (replace(_Off, _N0, *this,
; 1429 : _Ptr - this->_Myptr(),
; 1430 : _Count)); // substring, replace carefully
; 1431 : if (this->_Mysize < _Off)
; 1432 : _Xran(); // _Off off end
; 1433 : if (this->_Mysize - _Off < _N0)
; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1435 : if (npos - _Count <= this->_Mysize - _N0)
; 1436 : _Xlen(); // result too long
; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1438 :
; 1439 : if (_Count < _N0)
; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1441 : this->_Myptr() + _Off + _N0,
; 1442 : _Nm); // smaller hole, move tail up
; 1443 : size_type _Num;
; 1444 : if ((0 < _Count || 0 < _N0)
; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1446 : { // make room and rearrange
; 1447 : if (_N0 < _Count)
; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
; 1451 : _Eos(_Num);
; 1452 : }
; 1453 : return (*this);
; 1454 : }
; 1455 :
; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
; 1458 : _DEBUG_POINTER(_Ptr);
; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 1460 : }
; 1461 :
; 1462 : _Myt& replace(size_type _Off,
; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
; 1465 : if (this->_Mysize < _Off)
; 1466 : _Xran(); // _Off off end
; 1467 : if (this->_Mysize - _Off < _N0)
; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 1469 : if (npos - _Count <= this->_Mysize - _N0)
; 1470 : _Xlen(); // result too long
; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
; 1472 :
; 1473 : if (_Count < _N0)
; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1475 : this->_Myptr() + _Off + _N0,
; 1476 : _Nm); // smaller hole, move tail up
; 1477 : size_type _Num;
; 1478 : if ((0 < _Count || 0 < _N0)
; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
; 1480 : { // make room and rearrange
; 1481 : if (_N0 < _Count)
; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
; 1485 : _Eos(_Num);
; 1486 : }
; 1487 : return (*this);
; 1488 : }
; 1489 :
; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1491 : const _Myt& _Right)
; 1492 : { // replace [_First, _Last) with _Right
; 1493 : return (replace(
; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
; 1495 : }
; 1496 :
; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1498 : const _Elem *_Ptr, size_type _Count)
; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
; 1500 : return (replace(
; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
; 1502 : }
; 1503 :
; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1505 : const _Elem *_Ptr)
; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
; 1507 : return (replace(
; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
; 1509 : }
; 1510 :
; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1512 : size_type _Count, _Elem _Ch)
; 1513 : { // replace [_First, _Last) with _Count * _Ch
; 1514 : return (replace(
; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
; 1516 : }
; 1517 :
; 1518 : template<class _Iter>
; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
; 1520 : _Myt&>::type
; 1521 : replace(const_iterator _First, const_iterator _Last,
; 1522 : _Iter _First2, _Iter _Last2)
; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
; 1524 : _Myt _Right(_First2, _Last2);
; 1525 : replace(_First, _Last, _Right);
; 1526 : return (*this);
; 1527 : }
; 1528 :
; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1530 : const_pointer _First2, const_pointer _Last2)
; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1532 : if (_First2 == _Last2)
; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1534 : else
; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1536 : &*_First2, _Last2 - _First2);
; 1537 : return (*this);
; 1538 : }
; 1539 :
; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1541 : pointer _First2, pointer _Last2)
; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
; 1543 : if (_First2 == _Last2)
; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1545 : else
; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1547 : &*_First2, _Last2 - _First2);
; 1548 : return (*this);
; 1549 : }
; 1550 :
; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1552 : const_iterator _First2, const_iterator _Last2)
; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1554 : if (_First2 == _Last2)
; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1556 : else
; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1558 : &*_First2, _Last2 - _First2);
; 1559 : return (*this);
; 1560 : }
; 1561 :
; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
; 1563 : iterator _First2, iterator _Last2)
; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
; 1565 : if (_First2 == _Last2)
; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
; 1567 : else
; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
; 1569 : &*_First2, _Last2 - _First2);
; 1570 : return (*this);
; 1571 : }
; 1572 :
; 1573 : iterator begin() _NOEXCEPT
; 1574 : { // return iterator for beginning of mutable sequence
; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
; 1576 : }
; 1577 :
; 1578 : const_iterator begin() const _NOEXCEPT
; 1579 : { // return iterator for beginning of nonmutable sequence
; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
; 1581 : }
; 1582 :
; 1583 : iterator end() _NOEXCEPT
; 1584 : { // return iterator for end of mutable sequence
; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
; 1586 : }
; 1587 :
; 1588 : const_iterator end() const _NOEXCEPT
; 1589 : { // return iterator for end of nonmutable sequence
; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
; 1591 : }
; 1592 :
; 1593 : reverse_iterator rbegin() _NOEXCEPT
; 1594 : { // return iterator for beginning of reversed mutable sequence
; 1595 : return (reverse_iterator(end()));
; 1596 : }
; 1597 :
; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
; 1599 : { // return iterator for beginning of reversed nonmutable sequence
; 1600 : return (const_reverse_iterator(end()));
; 1601 : }
; 1602 :
; 1603 : reverse_iterator rend() _NOEXCEPT
; 1604 : { // return iterator for end of reversed mutable sequence
; 1605 : return (reverse_iterator(begin()));
; 1606 : }
; 1607 :
; 1608 : const_reverse_iterator rend() const _NOEXCEPT
; 1609 : { // return iterator for end of reversed nonmutable sequence
; 1610 : return (const_reverse_iterator(begin()));
; 1611 : }
; 1612 :
; 1613 : #if _HAS_CPP0X
; 1614 : const_iterator cbegin() const _NOEXCEPT
; 1615 : { // return iterator for beginning of nonmutable sequence
; 1616 : return (((const _Myt *)this)->begin());
; 1617 : }
; 1618 :
; 1619 : const_iterator cend() const _NOEXCEPT
; 1620 : { // return iterator for end of nonmutable sequence
; 1621 : return (((const _Myt *)this)->end());
; 1622 : }
; 1623 :
; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
; 1625 : { // return iterator for beginning of reversed nonmutable sequence
; 1626 : return (((const _Myt *)this)->rbegin());
; 1627 : }
; 1628 :
; 1629 : const_reverse_iterator crend() const _NOEXCEPT
; 1630 : { // return iterator for end of reversed nonmutable sequence
; 1631 : return (((const _Myt *)this)->rend());
; 1632 : }
; 1633 :
; 1634 : void shrink_to_fit()
; 1635 : { // reduce capacity
; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
; 1637 : { // worth shrinking, do it
; 1638 : _Myt _Tmp(*this);
; 1639 : swap(_Tmp);
; 1640 : }
; 1641 : }
; 1642 : #endif /* _HAS_CPP0X */
; 1643 :
; 1644 : reference at(size_type _Off)
; 1645 : { // subscript mutable sequence with checking
; 1646 : if (this->_Mysize <= _Off)
; 1647 : _Xran(); // _Off off end
; 1648 : return (this->_Myptr()[_Off]);
; 1649 : }
; 1650 :
; 1651 : const_reference at(size_type _Off) const
; 1652 : { // subscript nonmutable sequence with checking
; 1653 : if (this->_Mysize <= _Off)
; 1654 : _Xran(); // _Off off end
; 1655 : return (this->_Myptr()[_Off]);
; 1656 : }
; 1657 :
; 1658 : reference operator[](size_type _Off)
; 1659 : { // subscript mutable sequence
; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1661 : if (this->_Mysize < _Off) // sic
; 1662 : _DEBUG_ERROR("string subscript out of range");
; 1663 :
; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1667 :
; 1668 : return (this->_Myptr()[_Off]);
; 1669 : }
; 1670 :
; 1671 : const_reference operator[](size_type _Off) const
; 1672 : { // subscript nonmutable sequence
; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1674 : if (this->_Mysize < _Off) // sic
; 1675 : _DEBUG_ERROR("string subscript out of range");
; 1676 :
; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1680 :
; 1681 : return (this->_Myptr()[_Off]);
; 1682 : }
; 1683 :
; 1684 : void push_back(_Elem _Ch)
; 1685 : { // insert element at end
; 1686 : insert(end(), _Ch);
; 1687 : }
; 1688 :
; 1689 : #if _HAS_CPP0X
; 1690 : void pop_back()
; 1691 : { // erase element at end
; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
; 1693 : }
; 1694 :
; 1695 : reference front()
; 1696 : { // return first element of mutable sequence
; 1697 : return (*begin());
; 1698 : }
; 1699 :
; 1700 : const_reference front() const
; 1701 : { // return first element of nonmutable sequence
; 1702 : return (*begin());
; 1703 : }
; 1704 :
; 1705 : reference back()
; 1706 : { // return last element of mutable sequence
; 1707 : return (*(end() - 1));
; 1708 : }
; 1709 :
; 1710 : const_reference back() const
; 1711 : { // return last element of nonmutable sequence
; 1712 : return (*(end() - 1));
; 1713 : }
; 1714 : #endif /* _HAS_CPP0X */
; 1715 :
; 1716 : const _Elem *c_str() const _NOEXCEPT
; 1717 : { // return pointer to null-terminated nonmutable array
; 1718 : return (this->_Myptr());
; 1719 : }
; 1720 :
; 1721 : const _Elem *data() const _NOEXCEPT
; 1722 : { // return pointer to nonmutable array
; 1723 : return (c_str());
; 1724 : }
; 1725 :
; 1726 : size_type length() const _NOEXCEPT
; 1727 : { // return length of sequence
; 1728 : return (this->_Mysize);
; 1729 : }
; 1730 :
; 1731 : size_type size() const _NOEXCEPT
; 1732 : { // return length of sequence
; 1733 : return (this->_Mysize);
; 1734 : }
; 1735 :
; 1736 : size_type max_size() const _NOEXCEPT
; 1737 : { // return maximum possible length of sequence
; 1738 : size_type _Num = this->_Getal().max_size();
; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
; 1740 : }
; 1741 :
; 1742 : void resize(size_type _Newsize)
; 1743 : { // determine new length, padding with null elements as needed
; 1744 : resize(_Newsize, _Elem());
; 1745 : }
; 1746 :
; 1747 : void resize(size_type _Newsize, _Elem _Ch)
; 1748 : { // determine new length, padding with _Ch elements as needed
; 1749 : if (_Newsize <= this->_Mysize)
; 1750 : _Eos(_Newsize);
; 1751 : else
; 1752 : append(_Newsize - this->_Mysize, _Ch);
; 1753 : }
; 1754 :
; 1755 : size_type capacity() const _NOEXCEPT
; 1756 : { // return current length of allocated storage
; 1757 : return (this->_Myres);
; 1758 : }
; 1759 :
; 1760 : void reserve(size_type _Newcap = 0)
; 1761 : { // determine new minimum length of allocated storage
; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
; 1763 : { // change reservation
; 1764 : size_type _Size = this->_Mysize;
; 1765 : if (_Grow(_Newcap, true))
; 1766 : _Eos(_Size);
; 1767 : }
; 1768 : }
; 1769 :
; 1770 : bool empty() const _NOEXCEPT
; 1771 : { // test if sequence is empty
; 1772 : return (this->_Mysize == 0);
; 1773 : }
; 1774 :
; 1775 : _SCL_INSECURE_DEPRECATE
; 1776 :
; 1777 : size_type copy(_Elem *_Ptr,
; 1778 : size_type _Count, size_type _Off = 0) const
; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1781 : if (_Count != 0)
; 1782 : _DEBUG_POINTER(_Ptr);
; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1784 :
; 1785 : if (this->_Mysize < _Off)
; 1786 : _Xran(); // _Off off end
; 1787 : if (this->_Mysize - _Off < _Count)
; 1788 : _Count = this->_Mysize - _Off;
; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
; 1790 : return (_Count);
; 1791 : }
; 1792 :
; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
; 1794 : size_type _Count, size_type _Off = 0) const
; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1797 : if (_Count != 0)
; 1798 : _DEBUG_POINTER(_Dest);
; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1800 :
; 1801 : if (this->_Mysize < _Off)
; 1802 : _Xran(); // _Off off end
; 1803 : if (this->_Mysize - _Off < _Count)
; 1804 : _Count = this->_Mysize - _Off;
; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
; 1806 : return (_Count);
; 1807 : }
; 1808 :
; 1809 : void _Swap_bx(_Myt& _Right)
; 1810 : { // exchange _Bx with _Right._Bx
; 1811 : if (this->_BUF_SIZE <= this->_Myres)
; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
; 1814 : else
; 1815 : { // swap large with small
; 1816 : pointer _Ptr = this->_Bx._Ptr;
; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
; 1818 : _Traits::copy(this->_Bx._Buf,
; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
; 1821 : }
; 1822 : else
; 1823 : if (_Right._Myres < this->_BUF_SIZE)
; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
; 1825 : else
; 1826 : { // swap small with large
; 1827 : pointer _Ptr = _Right._Bx._Ptr;
; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
; 1829 : _Traits::copy(_Right._Bx._Buf,
; 1830 : this->_Bx._Buf, this->_Mysize + 1);
; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 1832 : }
; 1833 : }
; 1834 :
; 1835 : void swap(_Myt& _Right)
; 1836 : { // exchange contents with _Right
; 1837 : if (this == &_Right)
; 1838 : ; // same object, do nothing
; 1839 : else if (this->_Getal() == _Right._Getal())
; 1840 : { // same allocator, swap control information
; 1841 : this->_Swap_all(_Right);
; 1842 : _Swap_bx(_Right);
; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
; 1844 : _STD swap(this->_Myres, _Right._Myres);
; 1845 : }
; 1846 :
; 1847 : #if _HAS_CPP0X
; 1848 : else if (_Alty::propagate_on_container_swap::value)
; 1849 : { // swap allocators and control information
; 1850 : this->_Swap_alloc(_Right);
; 1851 : _Swap_bx(_Right);
; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
; 1854 : _STD swap(this->_Myres, _Right._Myres);
; 1855 : }
; 1856 : #endif /* _HAS_CPP0X */
; 1857 :
; 1858 : else
; 1859 : { // different allocator, do multiple assigns
; 1860 : _Myt _Tmp = *this;
; 1861 :
; 1862 : *this = _Right;
; 1863 : _Right = _Tmp;
; 1864 : }
; 1865 : }
; 1866 :
; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
; 1868 : { // look for _Right beginning at or after _Off
; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
; 1870 : }
; 1871 :
; 1872 : size_type find(const _Elem *_Ptr,
; 1873 : size_type _Off, size_type _Count) const
; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1876 : if (_Count != 0)
; 1877 : _DEBUG_POINTER(_Ptr);
; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1879 :
; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
; 1881 : return (_Off); // null string always matches (if inside string)
; 1882 :
; 1883 : size_type _Nm;
; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
; 1885 : { // room for match, look for it
; 1886 : const _Elem *_Uptr, *_Vptr;
; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1891 : return (_Uptr - this->_Myptr()); // found a match
; 1892 : }
; 1893 :
; 1894 : return (npos); // no match
; 1895 : }
; 1896 :
; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
; 1899 : _DEBUG_POINTER(_Ptr);
; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
; 1901 : }
; 1902 :
; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
; 1904 : { // look for _Ch at or after _Off
; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1906 : }
; 1907 :
; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
; 1909 : { // look for _Right beginning before _Off
; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
; 1911 : }
; 1912 :
; 1913 : size_type rfind(const _Elem *_Ptr,
; 1914 : size_type _Off, size_type _Count) const
; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1917 : if (_Count != 0)
; 1918 : _DEBUG_POINTER(_Ptr);
; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1920 :
; 1921 : if (_Count == 0)
; 1922 : return (_Off < this->_Mysize ? _Off
; 1923 : : this->_Mysize); // null always matches
; 1924 : if (_Count <= this->_Mysize)
; 1925 : { // room for match, look for it
; 1926 : const _Elem *_Uptr = this->_Myptr() +
; 1927 : (_Off < this->_Mysize - _Count ? _Off
; 1928 : : this->_Mysize - _Count);
; 1929 : for (; ; --_Uptr)
; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
; 1932 : return (_Uptr - this->_Myptr()); // found a match
; 1933 : else if (_Uptr == this->_Myptr())
; 1934 : break; // at beginning, no more chance for match
; 1935 : }
; 1936 :
; 1937 : return (npos); // no match
; 1938 : }
; 1939 :
; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
; 1941 : { // look for [_Ptr, <null>) beginning before _Off
; 1942 : _DEBUG_POINTER(_Ptr);
; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
; 1944 : }
; 1945 :
; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
; 1947 : { // look for _Ch before _Off
; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 1949 : }
; 1950 :
; 1951 : size_type find_first_of(const _Myt& _Right,
; 1952 : size_type _Off = 0) const _NOEXCEPT
; 1953 : { // look for one of _Right at or after _Off
; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
; 1955 : }
; 1956 :
; 1957 : size_type find_first_of(const _Elem *_Ptr,
; 1958 : size_type _Off, size_type _Count) const
; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
; 1961 : if (_Count != 0)
; 1962 : _DEBUG_POINTER(_Ptr);
; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 1964 :
; 1965 : if (0 < _Count && _Off < this->_Mysize)
; 1966 : { // room for match, look for it
; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 1969 : _Uptr < _Vptr; ++_Uptr)
; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 1971 : return (_Uptr - this->_Myptr()); // found a match
; 1972 : }
; 1973 :
; 1974 : return (npos); // no match
; 1975 : }
; 1976 :
; 1977 : size_type find_first_of(const _Elem *_Ptr,
; 1978 : size_type _Off = 0) const
; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
; 1980 : _DEBUG_POINTER(_Ptr);
; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 1982 : }
; 1983 :
; 1984 : size_type find_first_of(_Elem _Ch,
; 1985 : size_type _Off = 0) const
; 1986 : { // look for _Ch at or after _Off
; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
; 1988 : }
; 1989 :
; 1990 : size_type find_last_of(const _Myt& _Right,
; 1991 : size_type _Off = npos) const _NOEXCEPT
; 1992 : { // look for one of _Right before _Off
; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
; 1994 : }
; 1995 :
; 1996 : size_type find_last_of(const _Elem *_Ptr,
; 1997 : size_type _Off, size_type _Count) const
; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2000 : if (_Count != 0)
; 2001 : _DEBUG_POINTER(_Ptr);
; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2003 :
; 2004 : if (0 < _Count && 0 < this->_Mysize)
; 2005 : { // worth searching, do it
; 2006 : const _Elem *_Uptr = this->_Myptr()
; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2008 : for (; ; --_Uptr)
; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
; 2010 : return (_Uptr - this->_Myptr()); // found a match
; 2011 : else if (_Uptr == this->_Myptr())
; 2012 : break; // at beginning, no more chance for match
; 2013 : }
; 2014 :
; 2015 : return (npos); // no match
; 2016 : }
; 2017 :
; 2018 : size_type find_last_of(const _Elem *_Ptr,
; 2019 : size_type _Off = npos) const
; 2020 : { // look for one of [_Ptr, <null>) before _Off
; 2021 : _DEBUG_POINTER(_Ptr);
; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2023 : }
; 2024 :
; 2025 : size_type find_last_of(_Elem _Ch,
; 2026 : size_type _Off = npos) const
; 2027 : { // look for _Ch before _Off
; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
; 2029 : }
; 2030 :
; 2031 : size_type find_first_not_of(const _Myt& _Right,
; 2032 : size_type _Off = 0) const _NOEXCEPT
; 2033 : { // look for none of _Right at or after _Off
; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
; 2035 : _Right.size()));
; 2036 : }
; 2037 :
; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
; 2039 : size_type _Off, size_type _Count) const
; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2042 : if (_Count != 0)
; 2043 : _DEBUG_POINTER(_Ptr);
; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2045 :
; 2046 : if (_Off < this->_Mysize)
; 2047 : { // room for match, look for it
; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
; 2050 : _Uptr < _Vptr; ++_Uptr)
; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2052 : return (_Uptr - this->_Myptr());
; 2053 : }
; 2054 : return (npos);
; 2055 : }
; 2056 :
; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
; 2058 : size_type _Off = 0) const
; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
; 2060 : _DEBUG_POINTER(_Ptr);
; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2062 : }
; 2063 :
; 2064 : size_type find_first_not_of(_Elem _Ch,
; 2065 : size_type _Off = 0) const
; 2066 : { // look for non _Ch at or after _Off
; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
; 2068 : }
; 2069 :
; 2070 : size_type find_last_not_of(const _Myt& _Right,
; 2071 : size_type _Off = npos) const _NOEXCEPT
; 2072 : { // look for none of _Right before _Off
; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
; 2074 : }
; 2075 :
; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
; 2077 : size_type _Off, size_type _Count) const
; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2080 : if (_Count != 0)
; 2081 : _DEBUG_POINTER(_Ptr);
; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2083 :
; 2084 : if (0 < this->_Mysize)
; 2085 : { // worth searching, do it
; 2086 : const _Elem *_Uptr = this->_Myptr()
; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
; 2088 : for (; ; --_Uptr)
; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
; 2090 : return (_Uptr - this->_Myptr());
; 2091 : else if (_Uptr == this->_Myptr())
; 2092 : break;
; 2093 : }
; 2094 : return (npos);
; 2095 : }
; 2096 :
; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
; 2098 : size_type _Off = npos) const
; 2099 : { // look for none of [_Ptr, <null>) before _Off
; 2100 : _DEBUG_POINTER(_Ptr);
; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
; 2102 : }
; 2103 :
; 2104 : size_type find_last_not_of(_Elem _Ch,
; 2105 : size_type _Off = npos) const
; 2106 : { // look for non _Ch before _Off
; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
; 2108 : }
; 2109 :
; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
; 2111 : { // return [_Off, _Off + _Count) as new string
; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
; 2113 : }
; 2114 :
; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
; 2116 : { // compare [0, _Mysize) with _Right
; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
; 2118 : }
; 2119 :
; 2120 : int compare(size_type _Off, size_type _N0,
; 2121 : const _Myt& _Right) const
; 2122 : { // compare [_Off, _Off + _N0) with _Right
; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
; 2124 : }
; 2125 :
; 2126 : int compare(size_type _Off,
; 2127 : size_type _N0, const _Myt& _Right,
; 2128 : size_type _Roff, size_type _Count) const
; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
; 2130 : if (_Right.size() < _Roff)
; 2131 : _Xran(); // _Off off end
; 2132 : if (_Right._Mysize - _Roff < _Count)
; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
; 2135 : }
; 2136 :
; 2137 : int compare(const _Elem *_Ptr) const
; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
; 2139 : _DEBUG_POINTER(_Ptr);
; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
; 2141 : }
; 2142 :
; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
; 2145 : _DEBUG_POINTER(_Ptr);
; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
; 2147 : }
; 2148 :
; 2149 : int compare(size_type _Off,
; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
; 2153 : if (_Count != 0)
; 2154 : _DEBUG_POINTER(_Ptr);
; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
; 2156 :
; 2157 : if (this->_Mysize < _Off)
; 2158 : _Xran(); // _Off off end
; 2159 : if (this->_Mysize - _Off < _N0)
; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
; 2161 :
; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
; 2163 : _N0 < _Count ? _N0 : _Count);
; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
; 2165 : : _N0 == _Count ? 0 : +1);
; 2166 : }
; 2167 :
; 2168 : allocator_type get_allocator() const _NOEXCEPT
; 2169 : { // return allocator object for values
; 2170 : return (this->_Getal());
; 2171 : }
; 2172 :
; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
; 2174 : { // assign _Count copies of _Ch beginning at _Off
; 2175 : if (_Count == 1)
; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
; 2177 : else
; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
; 2179 : }
; 2180 :
; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
; 2182 : { // copy _Oldlen elements to newly allocated buffer
; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
; 2184 : if (max_size() < _Newres)
; 2185 : _Newres = _Newsize; // undo roundup if too big
; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
; 2187 : ;
; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
; 2189 : _Newres = this->_Myres
; 2190 : + this->_Myres / 2; // grow exponentially if possible
; 2191 : else
; 2192 : _Newres = max_size(); // settle for max_size()
; 2193 :
; 2194 : _Elem *_Ptr;
; 2195 : _TRY_BEGIN
; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2197 : _CATCH_ALL
; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
; 2199 : _TRY_BEGIN
; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
; 2201 : _CATCH_ALL
; 2202 : _Tidy(true); // failed again, discard storage and reraise
; 2203 : _RERAISE;
; 2204 : _CATCH_END
; 2205 : _CATCH_END
; 2206 :
; 2207 : if (0 < _Oldlen)
; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
; 2209 : _Oldlen); // copy existing elements
; 2210 : _Tidy(true);
; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
; 2212 : this->_Myres = _Newres;
; 2213 : _Eos(_Oldlen);
; 2214 : }
; 2215 :
; 2216 : void _Eos(size_type _Newsize)
; 2217 : { // set new length and null terminator
; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());