1. ; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.51106.1
  2.  
  3. TITLE E:\????????????????\any\any\any.cpp
  4. .686P
  5. .XMM
  6. include listing.inc
  7. .model flat
  8.  
  9. INCLUDELIB OLDNAMES
  10.  
  11. PUBLIC ??_C@_07DCLBNMLN@generic?$AA@ ; `string'
  12. PUBLIC ??_C@_0O@BFJCFAAK@unknown?5error?$AA@ ; `string'
  13. PUBLIC ??_C@_08LLGCOLLL@iostream?$AA@ ; `string'
  14. PUBLIC ??_C@_0BG@PADBLCHM@iostream?5stream?5error?$AA@ ; `string'
  15. PUBLIC ??_C@_06FHFOAHML@system?$AA@ ; `string'
  16. PUBLIC ??_C@_0BI@CFPLBAOH@invalid?5string?5position?$AA@ ; `string'
  17. PUBLIC ??_C@_0BA@JFNIOLAK@string?5too?5long?$AA@ ; `string'
  18. PUBLIC ??_C@_0BD@OLBABOEK@vector?$DMT?$DO?5too?5long?$AA@ ; `string'
  19. PUBLIC ??_R2_System_error_category@std@@8 ; std::_System_error_category::`RTTI Base Class Array'
  20. PUBLIC ??_R2_Iostream_error_category@std@@8 ; std::_Iostream_error_category::`RTTI Base Class Array'
  21. PUBLIC ??_R2_Generic_error_category@std@@8 ; std::_Generic_error_category::`RTTI Base Class Array'
  22. PUBLIC ??_R2error_category@std@@8 ; std::error_category::`RTTI Base Class Array'
  23. PUBLIC ??_R1A@?0A@EA@_System_error_category@std@@8 ; std::_System_error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
  24. PUBLIC ??_R1A@?0A@EA@_Iostream_error_category@std@@8 ; std::_Iostream_error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
  25. PUBLIC ??_R1A@?0A@EA@_Generic_error_category@std@@8 ; std::_Generic_error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
  26. PUBLIC ??_R1A@?0A@EA@error_category@std@@8 ; std::error_category::`RTTI Base Class Descriptor at (0,-1,0,64)'
  27. PUBLIC ??_R3_System_error_category@std@@8 ; std::_System_error_category::`RTTI Class Hierarchy Descriptor'
  28. PUBLIC ??_R0?AV_System_error_category@std@@@8 ; std::_System_error_category `RTTI Type Descriptor'
  29. PUBLIC ??_R3_Iostream_error_category@std@@8 ; std::_Iostream_error_category::`RTTI Class Hierarchy Descriptor'
  30. PUBLIC ??_R0?AV_Iostream_error_category@std@@@8 ; std::_Iostream_error_category `RTTI Type Descriptor'
  31. PUBLIC ??_R3_Generic_error_category@std@@8 ; std::_Generic_error_category::`RTTI Class Hierarchy Descriptor'
  32. PUBLIC ??_R0?AV_Generic_error_category@std@@@8 ; std::_Generic_error_category `RTTI Type Descriptor'
  33. PUBLIC ??_R3error_category@std@@8 ; std::error_category::`RTTI Class Hierarchy Descriptor'
  34. PUBLIC ??_R0?AVerror_category@std@@@8 ; std::error_category `RTTI Type Descriptor'
  35. PUBLIC ??_R4_System_error_category@std@@6B@ ; std::_System_error_category::`RTTI Complete Object Locator'
  36. PUBLIC ??_R4_Iostream_error_category@std@@6B@ ; std::_Iostream_error_category::`RTTI Complete Object Locator'
  37. PUBLIC ??_R4_Generic_error_category@std@@6B@ ; std::_Generic_error_category::`RTTI Complete Object Locator'
  38. PUBLIC ??_R4error_category@std@@6B@ ; std::error_category::`RTTI Complete Object Locator'
  39. PUBLIC ??_7_System_error_category@std@@6B@ ; std::_System_error_category::`vftable'
  40. PUBLIC ??_7_Iostream_error_category@std@@6B@ ; std::_Iostream_error_category::`vftable'
  41. PUBLIC ??_7_Generic_error_category@std@@6B@ ; std::_Generic_error_category::`vftable'
  42. PUBLIC ??_7error_category@std@@6B@ ; std::error_category::`vftable'
  43. 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
  44. PUBLIC ?value@?$integral_constant@_N$00@std@@2_NB ; std::integral_constant<bool,1>::value
  45. PUBLIC ?value@?$integral_constant@_N$0A@@std@@2_NB ; std::integral_constant<bool,0>::value
  46. EXTRN __imp_?_Orphan_all@_Container_base0@std@@QAEXXZ:PROC
  47. EXTRN __imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z:PROC
  48. EXTRN __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z:PROC
  49. EXTRN __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z:PROC
  50. EXTRN __imp___purecall:PROC
  51. EXTRN __imp_?_Xbad_alloc@std@@YAXXZ:PROC
  52. EXTRN _atexit:PROC
  53. EXTRN __imp_?_Xlength_error@std@@YAXPBD@Z:PROC
  54. EXTRN __imp_?_Xout_of_range@std@@YAXPBD@Z:PROC
  55. EXTRN __imp__getchar:PROC
  56. EXTRN __imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A:BYTE
  57. EXTRN __imp__clock:PROC
  58. EXTRN __imp_?_Winerror_map@std@@YAPBDH@Z:PROC
  59. EXTRN __imp_?_Syserror_map@std@@YAPBDH@Z:PROC
  60. EXTRN __imp_??2@YAPAXI@Z:PROC
  61. EXTRN ??_7type_info@@6B@:QWORD ; type_info::`vftable'
  62. EXTRN __imp__memmove:PROC
  63. EXTRN __imp_??3@YAXPAX@Z:PROC
  64. EXTRN @__security_check_cookie@4:PROC
  65. EXTRN __purecall:PROC
  66. ; COMDAT ?value@?$integral_constant@_N$0A@@std@@2_NB
  67. CONST SEGMENT
  68. ?value@?$integral_constant@_N$0A@@std@@2_NB DB 00H ; std::integral_constant<bool,0>::value
  69. CONST ENDS
  70. ; COMDAT ?value@?$integral_constant@_N$00@std@@2_NB
  71. CONST SEGMENT
  72. ?value@?$integral_constant@_N$00@std@@2_NB DB 01H ; std::integral_constant<bool,1>::value
  73. CONST ENDS
  74. ; COMDAT ?value@?$_Sizeof@U_Nil@std@@U12@U12@U12@U12@U12@U12@U12@@std@@2IB
  75. CONST SEGMENT
  76. ?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
  77. CONST ENDS
  78. ; COMDAT ??_7error_category@std@@6B@
  79. CONST SEGMENT
  80. ??_7error_category@std@@6B@ DD FLAT:??_R4error_category@std@@6B@ ; std::error_category::`vftable'
  81. DD FLAT:??_Eerror_category@std@@UAEPAXI@Z
  82. DD FLAT:__purecall
  83. DD FLAT:__purecall
  84. DD FLAT:?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z
  85. DD FLAT:?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
  86. DD FLAT:?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
  87. CONST ENDS
  88. ; COMDAT ??_7_Generic_error_category@std@@6B@
  89. CONST SEGMENT
  90. ??_7_Generic_error_category@std@@6B@ DD FLAT:??_R4_Generic_error_category@std@@6B@ ; std::_Generic_error_category::`vftable'
  91. DD FLAT:??_E_Generic_error_category@std@@UAEPAXI@Z
  92. DD FLAT:?name@_Generic_error_category@std@@UBEPBDXZ
  93. DD FLAT:?message@_Generic_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
  94. DD FLAT:?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z
  95. DD FLAT:?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
  96. DD FLAT:?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
  97. CONST ENDS
  98. ; COMDAT ??_7_Iostream_error_category@std@@6B@
  99. CONST SEGMENT
  100. ??_7_Iostream_error_category@std@@6B@ DD FLAT:??_R4_Iostream_error_category@std@@6B@ ; std::_Iostream_error_category::`vftable'
  101. DD FLAT:??_E_Iostream_error_category@std@@UAEPAXI@Z
  102. DD FLAT:?name@_Iostream_error_category@std@@UBEPBDXZ
  103. DD FLAT:?message@_Iostream_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
  104. DD FLAT:?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z
  105. DD FLAT:?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
  106. DD FLAT:?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
  107. CONST ENDS
  108. ; COMDAT ??_7_System_error_category@std@@6B@
  109. CONST SEGMENT
  110. ??_7_System_error_category@std@@6B@ DD FLAT:??_R4_System_error_category@std@@6B@ ; std::_System_error_category::`vftable'
  111. DD FLAT:??_E_System_error_category@std@@UAEPAXI@Z
  112. DD FLAT:?name@_System_error_category@std@@UBEPBDXZ
  113. DD FLAT:?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
  114. DD FLAT:?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z
  115. DD FLAT:?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
  116. DD FLAT:?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
  117. CONST ENDS
  118. ; COMDAT ??_R4error_category@std@@6B@
  119. rdata$r SEGMENT
  120. ??_R4error_category@std@@6B@ DD 00H ; std::error_category::`RTTI Complete Object Locator'
  121. DD 00H
  122. DD 00H
  123. DD FLAT:??_R0?AVerror_category@std@@@8
  124. DD FLAT:??_R3error_category@std@@8
  125. rdata$r ENDS
  126. ; COMDAT ??_R4_Generic_error_category@std@@6B@
  127. rdata$r SEGMENT
  128. ??_R4_Generic_error_category@std@@6B@ DD 00H ; std::_Generic_error_category::`RTTI Complete Object Locator'
  129. DD 00H
  130. DD 00H
  131. DD FLAT:??_R0?AV_Generic_error_category@std@@@8
  132. DD FLAT:??_R3_Generic_error_category@std@@8
  133. rdata$r ENDS
  134. ; COMDAT ??_R4_Iostream_error_category@std@@6B@
  135. rdata$r SEGMENT
  136. ??_R4_Iostream_error_category@std@@6B@ DD 00H ; std::_Iostream_error_category::`RTTI Complete Object Locator'
  137. DD 00H
  138. DD 00H
  139. DD FLAT:??_R0?AV_Iostream_error_category@std@@@8
  140. DD FLAT:??_R3_Iostream_error_category@std@@8
  141. rdata$r ENDS
  142. ; COMDAT ??_R4_System_error_category@std@@6B@
  143. rdata$r SEGMENT
  144. ??_R4_System_error_category@std@@6B@ DD 00H ; std::_System_error_category::`RTTI Complete Object Locator'
  145. DD 00H
  146. DD 00H
  147. DD FLAT:??_R0?AV_System_error_category@std@@@8
  148. DD FLAT:??_R3_System_error_category@std@@8
  149. rdata$r ENDS
  150. ; COMDAT ??_R0?AVerror_category@std@@@8
  151. _DATA SEGMENT
  152. ??_R0?AVerror_category@std@@@8 DD FLAT:??_7type_info@@6B@ ; std::error_category `RTTI Type Descriptor'
  153. DD 00H
  154. DB '.?AVerror_category@std@@', 00H
  155. _DATA ENDS
  156. ; COMDAT ??_R3error_category@std@@8
  157. rdata$r SEGMENT
  158. ??_R3error_category@std@@8 DD 00H ; std::error_category::`RTTI Class Hierarchy Descriptor'
  159. DD 00H
  160. DD 01H
  161. DD FLAT:??_R2error_category@std@@8
  162. rdata$r ENDS
  163. ; COMDAT ??_R0?AV_Generic_error_category@std@@@8
  164. _DATA SEGMENT
  165. ??_R0?AV_Generic_error_category@std@@@8 DD FLAT:??_7type_info@@6B@ ; std::_Generic_error_category `RTTI Type Descriptor'
  166. DD 00H
  167. DB '.?AV_Generic_error_category@std@@', 00H
  168. _DATA ENDS
  169. ; COMDAT ??_R3_Generic_error_category@std@@8
  170. rdata$r SEGMENT
  171. ??_R3_Generic_error_category@std@@8 DD 00H ; std::_Generic_error_category::`RTTI Class Hierarchy Descriptor'
  172. DD 00H
  173. DD 02H
  174. DD FLAT:??_R2_Generic_error_category@std@@8
  175. rdata$r ENDS
  176. ; COMDAT ??_R0?AV_Iostream_error_category@std@@@8
  177. _DATA SEGMENT
  178. ??_R0?AV_Iostream_error_category@std@@@8 DD FLAT:??_7type_info@@6B@ ; std::_Iostream_error_category `RTTI Type Descriptor'
  179. DD 00H
  180. DB '.?AV_Iostream_error_category@std@@', 00H
  181. _DATA ENDS
  182. ; COMDAT ??_R3_Iostream_error_category@std@@8
  183. rdata$r SEGMENT
  184. ??_R3_Iostream_error_category@std@@8 DD 00H ; std::_Iostream_error_category::`RTTI Class Hierarchy Descriptor'
  185. DD 00H
  186. DD 03H
  187. DD FLAT:??_R2_Iostream_error_category@std@@8
  188. rdata$r ENDS
  189. ; COMDAT ??_R0?AV_System_error_category@std@@@8
  190. _DATA SEGMENT
  191. ??_R0?AV_System_error_category@std@@@8 DD FLAT:??_7type_info@@6B@ ; std::_System_error_category `RTTI Type Descriptor'
  192. DD 00H
  193. DB '.?AV_System_error_category@std@@', 00H
  194. _DATA ENDS
  195. ; COMDAT ??_R3_System_error_category@std@@8
  196. rdata$r SEGMENT
  197. ??_R3_System_error_category@std@@8 DD 00H ; std::_System_error_category::`RTTI Class Hierarchy Descriptor'
  198. DD 00H
  199. DD 03H
  200. DD FLAT:??_R2_System_error_category@std@@8
  201. rdata$r ENDS
  202. ; COMDAT ??_R1A@?0A@EA@error_category@std@@8
  203. rdata$r SEGMENT
  204. ??_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)'
  205. DD 00H
  206. DD 00H
  207. DD 0ffffffffH
  208. DD 00H
  209. DD 040H
  210. DD FLAT:??_R3error_category@std@@8
  211. rdata$r ENDS
  212. ; COMDAT ??_R1A@?0A@EA@_Generic_error_category@std@@8
  213. rdata$r SEGMENT
  214. ??_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)'
  215. DD 01H
  216. DD 00H
  217. DD 0ffffffffH
  218. DD 00H
  219. DD 040H
  220. DD FLAT:??_R3_Generic_error_category@std@@8
  221. rdata$r ENDS
  222. ; COMDAT ??_R1A@?0A@EA@_Iostream_error_category@std@@8
  223. rdata$r SEGMENT
  224. ??_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)'
  225. DD 02H
  226. DD 00H
  227. DD 0ffffffffH
  228. DD 00H
  229. DD 040H
  230. DD FLAT:??_R3_Iostream_error_category@std@@8
  231. rdata$r ENDS
  232. ; COMDAT ??_R1A@?0A@EA@_System_error_category@std@@8
  233. rdata$r SEGMENT
  234. ??_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)'
  235. DD 02H
  236. DD 00H
  237. DD 0ffffffffH
  238. DD 00H
  239. DD 040H
  240. DD FLAT:??_R3_System_error_category@std@@8
  241. rdata$r ENDS
  242. ; COMDAT ??_R2error_category@std@@8
  243. rdata$r SEGMENT
  244. ??_R2error_category@std@@8 DD FLAT:??_R1A@?0A@EA@error_category@std@@8 ; std::error_category::`RTTI Base Class Array'
  245. rdata$r ENDS
  246. ; COMDAT ??_R2_Generic_error_category@std@@8
  247. rdata$r SEGMENT
  248. ??_R2_Generic_error_category@std@@8 DD FLAT:??_R1A@?0A@EA@_Generic_error_category@std@@8 ; std::_Generic_error_category::`RTTI Base Class Array'
  249. DD FLAT:??_R1A@?0A@EA@error_category@std@@8
  250. rdata$r ENDS
  251. ; COMDAT ??_R2_Iostream_error_category@std@@8
  252. rdata$r SEGMENT
  253. ??_R2_Iostream_error_category@std@@8 DD FLAT:??_R1A@?0A@EA@_Iostream_error_category@std@@8 ; std::_Iostream_error_category::`RTTI Base Class Array'
  254. DD FLAT:??_R1A@?0A@EA@_Generic_error_category@std@@8
  255. DD FLAT:??_R1A@?0A@EA@error_category@std@@8
  256. rdata$r ENDS
  257. ; COMDAT ??_R2_System_error_category@std@@8
  258. rdata$r SEGMENT
  259. ??_R2_System_error_category@std@@8 DD FLAT:??_R1A@?0A@EA@_System_error_category@std@@8 ; std::_System_error_category::`RTTI Base Class Array'
  260. DD FLAT:??_R1A@?0A@EA@_Generic_error_category@std@@8
  261. DD FLAT:??_R1A@?0A@EA@error_category@std@@8
  262. rdata$r ENDS
  263. ; COMDAT ??_C@_0BD@OLBABOEK@vector?$DMT?$DO?5too?5long?$AA@
  264. CONST SEGMENT
  265. ??_C@_0BD@OLBABOEK@vector?$DMT?$DO?5too?5long?$AA@ DB 'vector<T> too long'
  266. DB 00H ; `string'
  267. CONST ENDS
  268. ; COMDAT ??_C@_0BA@JFNIOLAK@string?5too?5long?$AA@
  269. CONST SEGMENT
  270. ??_C@_0BA@JFNIOLAK@string?5too?5long?$AA@ DB 'string too long', 00H ; `string'
  271. CONST ENDS
  272. ; COMDAT ??_C@_0BI@CFPLBAOH@invalid?5string?5position?$AA@
  273. CONST SEGMENT
  274. ??_C@_0BI@CFPLBAOH@invalid?5string?5position?$AA@ DB 'invalid string posi'
  275. DB 'tion', 00H ; `string'
  276. CONST ENDS
  277. ; COMDAT ??_C@_06FHFOAHML@system?$AA@
  278. CONST SEGMENT
  279. ??_C@_06FHFOAHML@system?$AA@ DB 'system', 00H ; `string'
  280. CONST ENDS
  281. ; COMDAT ??_C@_0BG@PADBLCHM@iostream?5stream?5error?$AA@
  282. CONST SEGMENT
  283. ??_C@_0BG@PADBLCHM@iostream?5stream?5error?$AA@ DB 'iostream stream error'
  284. DB 00H ; `string'
  285. CONST ENDS
  286. ; COMDAT ??_C@_08LLGCOLLL@iostream?$AA@
  287. CONST SEGMENT
  288. ??_C@_08LLGCOLLL@iostream?$AA@ DB 'iostream', 00H ; `string'
  289. CONST ENDS
  290. ; COMDAT ??_C@_0O@BFJCFAAK@unknown?5error?$AA@
  291. CONST SEGMENT
  292. ??_C@_0O@BFJCFAAK@unknown?5error?$AA@ DB 'unknown error', 00H ; `string'
  293. CONST ENDS
  294. ; COMDAT ??_C@_07DCLBNMLN@generic?$AA@
  295. CONST SEGMENT
  296. ??_C@_07DCLBNMLN@generic?$AA@ DB 'generic', 00H ; `string'
  297. CONST ENDS
  298. 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>
  299. PUBLIC ??$_Fill_n@PANIN@std@@YAPANPANIABN@Z ; std::_Fill_n<double *,unsigned int,double>
  300. PUBLIC ??$destroy@PAD@?$allocator@D@std@@QAEXPAPAD@Z ; std::allocator<char>::destroy<char *>
  301. PUBLIC ??$construct@PADAAPAD@?$allocator@D@std@@QAEXPAPADAAPAD@Z ; std::allocator<char>::construct<char *,char * &>
  302. 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> > >
  303. 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> > >
  304. PUBLIC ??$_Move@PANPAN@std@@YAPANPAN00U_Scalar_ptr_iterator_tag@0@@Z ; std::_Move<double *,double *>
  305. 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> > >
  306. PUBLIC ??$_Ptr_cat@HH@std@@YA?AU_Scalar_ptr_iterator_tag@0@PAH0@Z ; std::_Ptr_cat<int,int>
  307. 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>
  308. PUBLIC ??$_Ptr_cat@NN@std@@YA?AU_Scalar_ptr_iterator_tag@0@PAN0@Z ; std::_Ptr_cat<double,double>
  309. PUBLIC ??$_Val_type@PAN@std@@YAPANPAN@Z ; std::_Val_type<double *>
  310. PUBLIC ??$destroy@PAD@?$allocator_traits@V?$allocator@D@std@@@std@@SAXAAV?$allocator@D@1@PAPAD@Z ; std::allocator_traits<std::allocator<char> >::destroy<char *>
  311. 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 * &>
  312. PUBLIC ??$forward@AAPAD@std@@YAAAPADAAPAD@Z ; std::forward<char * &>
  313. PUBLIC ??$_Allocate@D@std@@YAPADIPAD@Z ; std::_Allocate<char>
  314. PUBLIC ??$_Allocate@N@std@@YAPANIPAN@Z ; std::_Allocate<double>
  315. PUBLIC ??$_Umove@PAN@?$vector@NV?$allocator@N@std@@@std@@IAEPANPAN00@Z ; std::vector<double,std::allocator<double> >::_Umove<double *>
  316. 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> > >
  317. PUBLIC ??$_Move@PANPAN@std@@YAPANPAN00@Z ; std::_Move<double *,double *>
  318. 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> > >
  319. 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> > >
  320. PUBLIC ??$addressof@D@std@@YAPADAAD@Z ; std::addressof<char>
  321. PUBLIC ??$destroy@PAD@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAEXPAPAD@Z ; std::_Wrap_alloc<std::allocator<char> >::destroy<char *>
  322. PUBLIC ??$construct@PADAAPAD@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAEXPAPADAAPAD@Z ; std::_Wrap_alloc<std::allocator<char> >::construct<char *,char * &>
  323. PUBLIC ?max_size@?$allocator@D@std@@QBEIXZ ; std::allocator<char>::max_size
  324. PUBLIC ?max_size@?$allocator@N@std@@QBEIXZ ; std::allocator<double>::max_size
  325. PUBLIC ?max_size@?$allocator_traits@V?$allocator@D@std@@@std@@SAIABV?$allocator@D@2@@Z ; std::allocator_traits<std::allocator<char> >::max_size
  326. PUBLIC ?allocate@?$allocator@D@std@@QAEPADI@Z ; std::allocator<char>::allocate
  327. PUBLIC ?max_size@?$allocator_traits@V?$allocator@N@std@@@std@@SAIABV?$allocator@N@2@@Z ; std::allocator_traits<std::allocator<double> >::max_size
  328. PUBLIC ?allocate@?$allocator@N@std@@QAEPANI@Z ; std::allocator<double>::allocate
  329. PUBLIC ?max_size@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QBEIXZ ; std::_Wrap_alloc<std::allocator<char> >::max_size
  330. PUBLIC ?allocate@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAEPADI@Z ; std::_Wrap_alloc<std::allocator<char> >::allocate
  331. 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
  332. 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+=
  333. 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> > >
  334. PUBLIC ?max_size@?$_Wrap_alloc@V?$allocator@N@std@@@std@@QBEIXZ ; std::_Wrap_alloc<std::allocator<double> >::max_size
  335. PUBLIC ?allocate@?$_Wrap_alloc@V?$allocator@N@std@@@std@@QAEPANI@Z ; std::_Wrap_alloc<std::allocator<double> >::allocate
  336. PUBLIC ?capacity@?$vector@NV?$allocator@N@std@@@std@@QBEIXZ ; std::vector<double,std::allocator<double> >::capacity
  337. 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
  338. 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
  339. 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
  340. 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
  341. 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!=
  342. 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==
  343. 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+=
  344. 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> > >
  345. PUBLIC ??0?$_Wrap_alloc@V?$allocator@N@std@@@std@@QAE@XZ ; std::_Wrap_alloc<std::allocator<double> >::_Wrap_alloc<std::allocator<double> >
  346. PUBLIC ?deallocate@?$allocator@N@std@@QAEXPANI@Z ; std::allocator<double>::deallocate
  347. PUBLIC ?_Xlen@?$vector@NV?$allocator@N@std@@@std@@IBEXXZ ; std::vector<double,std::allocator<double> >::_Xlen
  348. PUBLIC ?_Reallocate@?$vector@NV?$allocator@N@std@@@std@@IAEXI@Z ; std::vector<double,std::allocator<double> >::_Reallocate
  349. PUBLIC ?_Grow_to@?$vector@NV?$allocator@N@std@@@std@@IBEII@Z ; std::vector<double,std::allocator<double> >::_Grow_to
  350. PUBLIC ?clear@?$vector@NV?$allocator@N@std@@@std@@QAEXXZ ; std::vector<double,std::allocator<double> >::clear
  351. PUBLIC ?max_size@?$vector@NV?$allocator@N@std@@@std@@QBEIXZ ; std::vector<double,std::allocator<double> >::max_size
  352. 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
  353. PUBLIC ?_Unused_capacity@?$vector@NV?$allocator@N@std@@@std@@QBEIXZ ; std::vector<double,std::allocator<double> >::_Unused_capacity
  354. PUBLIC ??0?$_Wrap_alloc@V?$allocator@H@std@@@std@@QAE@XZ ; std::_Wrap_alloc<std::allocator<int> >::_Wrap_alloc<std::allocator<int> >
  355. PUBLIC ?deallocate@?$allocator@H@std@@QAEXPAHI@Z ; std::allocator<int>::deallocate
  356. PUBLIC ?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QAEPADXZ ; std::_String_val<std::_Simple_types<char> >::_Myptr
  357. PUBLIC ?deallocate@?$allocator@D@std@@QAEXPADI@Z ; std::allocator<char>::deallocate
  358. 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
  359. 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
  360. 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
  361. 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
  362. 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+
  363. 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> >
  364. PUBLIC ?deallocate@?$_Wrap_alloc@V?$allocator@N@std@@@std@@QAEXPANI@Z ; std::_Wrap_alloc<std::allocator<double> >::deallocate
  365. 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
  366. PUBLIC ?_Reserve@?$vector@NV?$allocator@N@std@@@std@@IAEXI@Z ; std::vector<double,std::allocator<double> >::_Reserve
  367. PUBLIC ?_Destroy@?$vector@NV?$allocator@N@std@@@std@@IAEXPAN0@Z ; std::vector<double,std::allocator<double> >::_Destroy
  368. 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
  369. PUBLIC ?size@?$vector@NV?$allocator@N@std@@@std@@QBEIXZ ; std::vector<double,std::allocator<double> >::size
  370. 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
  371. 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
  372. 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> >
  373. PUBLIC ?deallocate@?$_Wrap_alloc@V?$allocator@H@std@@@std@@QAEXPAHI@Z ; std::_Wrap_alloc<std::allocator<int> >::deallocate
  374. 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
  375. PUBLIC ?_Destroy@?$vector@HV?$allocator@H@std@@@std@@IAEXPAH0@Z ; std::vector<int,std::allocator<int> >::_Destroy
  376. 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> >
  377. PUBLIC ?deallocate@?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAEXPADI@Z ; std::_Wrap_alloc<std::allocator<char> >::deallocate
  378. PUBLIC ??0?$_Wrap_alloc@V?$allocator@D@std@@@std@@QAE@XZ ; std::_Wrap_alloc<std::allocator<char> >::_Wrap_alloc<std::allocator<char> >
  379. 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
  380. 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
  381. 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
  382. 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> > >
  383. PUBLIC ??0?$allocator@N@std@@QAE@XZ ; std::allocator<double>::allocator<double>
  384. PUBLIC ?_Tidy@?$vector@NV?$allocator@N@std@@@std@@IAEXXZ ; std::vector<double,std::allocator<double> >::_Tidy
  385. PUBLIC ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ; std::vector<double,std::allocator<double> >::resize
  386. 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> > >
  387. PUBLIC ??0?$allocator@H@std@@QAE@XZ ; std::allocator<int>::allocator<int>
  388. PUBLIC ?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ ; std::vector<int,std::allocator<int> >::_Tidy
  389. PUBLIC ?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QBEPBDXZ ; std::_String_val<std::_Simple_types<char> >::_Myptr
  390. 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
  391. 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> > >
  392. PUBLIC ??0?$allocator@D@std@@QAE@XZ ; std::allocator<char>::allocator<char>
  393. 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
  394. 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
  395. 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
  396. PUBLIC ??A?$vector@NV?$allocator@N@std@@@std@@QAEAANI@Z ; std::vector<double,std::allocator<double> >::operator[]
  397. PUBLIC ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >
  398. PUBLIC ??0?$vector@NV?$allocator@N@std@@@std@@QAE@I@Z ; std::vector<double,std::allocator<double> >::vector<double,std::allocator<double> >
  399. PUBLIC ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >
  400. PUBLIC ??0?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ; std::vector<int,std::allocator<int> >::vector<int,std::allocator<int> >
  401. 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> >
  402. 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> >
  403. PUBLIC _main
  404. PUBLIC ?system_category@std@@YAABVerror_category@1@XZ ; std::system_category
  405. PUBLIC ?generic_category@std@@YAABVerror_category@1@XZ ; std::generic_category
  406. PUBLIC ??1_System_error_category@std@@UAE@XZ ; std::_System_error_category::~_System_error_category
  407. PUBLIC ??_G_System_error_category@std@@UAEPAXI@Z ; std::_System_error_category::`scalar deleting destructor'
  408. PUBLIC ?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z ; std::_System_error_category::default_error_condition
  409. 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
  410. PUBLIC ?name@_System_error_category@std@@UBEPBDXZ ; std::_System_error_category::name
  411. PUBLIC ??0_System_error_category@std@@QAE@XZ ; std::_System_error_category::_System_error_category
  412. PUBLIC ??1_Iostream_error_category@std@@UAE@XZ ; std::_Iostream_error_category::~_Iostream_error_category
  413. PUBLIC ??_G_Iostream_error_category@std@@UAEPAXI@Z ; std::_Iostream_error_category::`scalar deleting destructor'
  414. 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
  415. PUBLIC ?name@_Iostream_error_category@std@@UBEPBDXZ ; std::_Iostream_error_category::name
  416. PUBLIC ??0_Iostream_error_category@std@@QAE@XZ ; std::_Iostream_error_category::_Iostream_error_category
  417. PUBLIC ??1_Generic_error_category@std@@UAE@XZ ; std::_Generic_error_category::~_Generic_error_category
  418. PUBLIC ??_G_Generic_error_category@std@@UAEPAXI@Z ; std::_Generic_error_category::`scalar deleting destructor'
  419. 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
  420. PUBLIC ?name@_Generic_error_category@std@@UBEPBDXZ ; std::_Generic_error_category::name
  421. PUBLIC ??0_Generic_error_category@std@@QAE@XZ ; std::_Generic_error_category::_Generic_error_category
  422. PUBLIC ?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z ; std::error_category::equivalent
  423. PUBLIC ?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z ; std::error_category::equivalent
  424. PUBLIC ?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z ; std::error_category::default_error_condition
  425. PUBLIC ??8error_condition@std@@QBE_NABV01@@Z ; std::error_condition::operator==
  426. PUBLIC ?category@error_condition@std@@QBEABVerror_category@2@XZ ; std::error_condition::category
  427. PUBLIC ?value@error_condition@std@@QBEHXZ ; std::error_condition::value
  428. PUBLIC ??0error_condition@std@@QAE@HABVerror_category@1@@Z ; std::error_condition::error_condition
  429. PUBLIC ?category@error_code@std@@QBEABVerror_category@2@XZ ; std::error_code::category
  430. PUBLIC ?value@error_code@std@@QBEHXZ ; std::error_code::value
  431. PUBLIC ??_Gerror_category@std@@UAEPAXI@Z ; std::error_category::`scalar deleting destructor'
  432. PUBLIC ??8error_category@std@@QBE_NABV01@@Z ; std::error_category::operator==
  433. PUBLIC ??1error_category@std@@UAE@XZ ; std::error_category::~error_category
  434. PUBLIC ??0error_category@std@@QAE@XZ ; std::error_category::error_category
  435. PUBLIC ?_Adopt@_Iterator_base0@std@@QAEXPBX@Z ; std::_Iterator_base0::_Adopt
  436. PUBLIC ?assign@?$char_traits@D@std@@SAXAADABD@Z ; std::char_traits<char>::assign
  437. PUBLIC ?move@?$char_traits@D@std@@SAPADPADPBDI@Z ; std::char_traits<char>::move
  438. PUBLIC ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z ; std::char_traits<char>::copy
  439. PUBLIC ?length@?$char_traits@D@std@@SAIPBD@Z ; std::char_traits<char>::length
  440. PUBLIC ??3@YAXPAX0@Z ; operator delete
  441. PUBLIC ??2@YAPAXIPAX@Z ; operator new
  442. PUBLIC ?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A ; std::_Error_objects<int>::_Generic_object
  443. PUBLIC ?_Iostream_object@?$_Error_objects@H@std@@2V_Iostream_error_category@2@A ; std::_Error_objects<int>::_Iostream_object
  444. PUBLIC ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A ; std::_Error_objects<int>::_System_object
  445. PUBLIC __real@3ff0000000000000
  446. EXTRN ??_Eerror_category@std@@UAEPAXI@Z:PROC ; std::error_category::`vector deleting destructor'
  447. EXTRN ??_E_Generic_error_category@std@@UAEPAXI@Z:PROC ; std::_Generic_error_category::`vector deleting destructor'
  448. EXTRN ??_E_Iostream_error_category@std@@UAEPAXI@Z:PROC ; std::_Iostream_error_category::`vector deleting destructor'
  449. EXTRN ??_E_System_error_category@std@@UAEPAXI@Z:PROC ; std::_System_error_category::`vector deleting destructor'
  450. EXTRN __CxxThrowException@8:PROC
  451. EXTRN ___CxxFrameHandler3:PROC
  452. EXTRN __vcomp_barrier:PROC
  453. EXTRN __vcomp_for_static_end:PROC
  454. EXTRN __vcomp_for_static_simple_init:PROC
  455. EXTRN __vcomp_fork:PROC
  456. EXTRN __vcomp_set_num_threads:PROC
  457. EXTRN _memcpy:PROC
  458. EXTRN __You_must_link_with_Microsoft_OpenMP_library:DWORD
  459. EXTRN ___security_cookie:DWORD
  460. EXTRN __fltused:DWORD
  461. _piecewise_construct DB 01H DUP (?)
  462. _allocator_arg DB 01H DUP (?)
  463. _BSS ENDS
  464. ; COMDAT CRT$XCU
  465. CRT$XCU SEGMENT
  466. ?_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$
  467. CRT$XCU ENDS
  468. ; COMDAT __real@3ff0000000000000
  469. CONST SEGMENT
  470. __real@3ff0000000000000 DQ 03ff0000000000000r ; 1
  471. CONST ENDS
  472. ; COMDAT ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A
  473. _DATA SEGMENT
  474. ?_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
  475. _DATA ENDS
  476. ; COMDAT ?_Iostream_object@?$_Error_objects@H@std@@2V_Iostream_error_category@2@A
  477. _DATA SEGMENT
  478. ?_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
  479. _DATA ENDS
  480. ; COMDAT ?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A
  481. _DATA SEGMENT
  482. ?_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
  483. _DATA ENDS
  484. ; COMDAT xdata$x
  485. xdata$x SEGMENT
  486. __ehfuncinfo$_main DD 019930522H
  487. DD 04H
  488. DD FLAT:__unwindtable$_main
  489. DD 2 DUP(00H)
  490. DD 2 DUP(00H)
  491. DD 00H
  492. DD 01H
  493. __unwindtable$_main DD 0ffffffffH
  494. DD FLAT:__unwindfunclet$_main$0
  495. DD 00H
  496. DD FLAT:__unwindfunclet$_main$1
  497. DD 01H
  498. DD FLAT:__unwindfunclet$_main$2
  499. DD 02H
  500. DD FLAT:__unwindfunclet$_main$3
  501. xdata$x ENDS
  502. ; COMDAT xdata$x
  503. xdata$x SEGMENT
  504. __ehfuncinfo$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z DD 019930522H
  505. DD 04H
  506. DD FLAT:__unwindtable$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z
  507. DD 02H
  508. DD FLAT:__tryblocktable$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z
  509. DD 2 DUP(00H)
  510. DD 00H
  511. DD 01H
  512. __unwindtable$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z DD 0ffffffffH
  513. DD 00H
  514. DD 0ffffffffH
  515. DD 00H
  516. DD 01H
  517. DD 00H
  518. DD 01H
  519. DD 00H
  520. __tryblocktable$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z DD 02H
  521. DD 02H
  522. DD 03H
  523. DD 01H
  524. DD FLAT:__catchsym$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$4
  525. DD 00H
  526. DD 00H
  527. DD 03H
  528. DD 01H
  529. DD FLAT:__catchsym$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$5
  530. __catchsym$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$4 DD 040H
  531. DD 00H
  532. DD 00H
  533. DD FLAT:__catch$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$1
  534. __catchsym$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$5 DD 040H
  535. DD 00H
  536. DD 00H
  537. DD FLAT:__catch$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXII@Z$0
  538. xdata$x ENDS
  539. ; COMDAT CRT$XCU
  540. CRT$XCU SEGMENT
  541. ?_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$
  542. CRT$XCU ENDS
  543. ; COMDAT CRT$XCU
  544. CRT$XCU SEGMENT
  545. ?_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$
  546. CRT$XCU ENDS
  547. ; Function compile flags: /Ogtp
  548. ; File e:\программирование\any\any\any.cpp
  549. ; COMDAT _main$omp$1
  550. _TEXT SEGMENT
  551. _temp$1$ = -16 ; size = 8
  552. $T1 = -8 ; size = 4
  553. $T2 = -4 ; size = 4
  554. _vec1$ = 8 ; size = 4
  555. _main$omp$1 PROC ; COMDAT
  556. push ebp
  557. mov ebp, esp
  558. sub esp, 16 ; 00000010H
  559. push esi
  560.  
  561. ; 165 : for( i = 0; i<N1; i++){
  562.  
  563. lea eax, DWORD PTR $T1[ebp]
  564. push eax
  565. lea eax, DWORD PTR $T2[ebp]
  566. push eax
  567. push 1
  568. push 1
  569. xorps xmm0, xmm0
  570. push 999 ; 000003e7H
  571. push 0
  572. movsd QWORD PTR _temp$1$[ebp], xmm0
  573. call __vcomp_for_static_simple_init
  574. mov ecx, DWORD PTR $T2[ebp]
  575. mov esi, DWORD PTR $T1[ebp]
  576. add esp, 24 ; 00000018H
  577. cmp ecx, esi
  578. jg SHORT $LN20@main$omp$1
  579.  
  580. ; 162 : double temp = 0;
  581.  
  582. mov eax, DWORD PTR _vec1$[ebp]
  583. movsd xmm2, QWORD PTR _temp$1$[ebp]
  584. mov eax, DWORD PTR [eax]
  585. sub esi, ecx
  586. lea edx, DWORD PTR [eax+ecx*8]
  587. inc esi
  588. $LL2@main$omp$1:
  589.  
  590. ; 166 : for(j = 0; j<N2; j++){
  591.  
  592. xor ecx, ecx
  593. npad 10
  594. $LL18@main$omp$1:
  595. movd xmm1, ecx
  596. cvtdq2pd xmm1, xmm1
  597.  
  598. ; 167 : for( k = 0; k<dim; k++){
  599.  
  600. mov eax, 100 ; 00000064H
  601. npad 3
  602. $LL15@main$omp$1:
  603.  
  604. ; 168 : temp+= j;
  605.  
  606. movapd xmm0, xmm1
  607. addsd xmm2, xmm0
  608. addsd xmm2, xmm1
  609. addsd xmm2, xmm1
  610. addsd xmm2, xmm1
  611. addsd xmm2, xmm1
  612. addsd xmm2, xmm1
  613. addsd xmm2, xmm1
  614. addsd xmm2, xmm1
  615. addsd xmm2, xmm1
  616. addsd xmm2, xmm1
  617. dec eax
  618. jne SHORT $LL15@main$omp$1
  619.  
  620. ; 166 : for(j = 0; j<N2; j++){
  621.  
  622. inc ecx
  623. cmp ecx, 4000 ; 00000fa0H
  624. jl SHORT $LL18@main$omp$1
  625.  
  626. ; 169 : }
  627. ; 170 : }
  628. ; 171 : vec1[i]+=temp;
  629.  
  630. movsd xmm0, QWORD PTR [edx]
  631. addsd xmm0, xmm2
  632. add edx, 8
  633. xorps xmm2, xmm2
  634. movsd QWORD PTR [edx-8], xmm0
  635. dec esi
  636. jne SHORT $LL2@main$omp$1
  637. $LN20@main$omp$1:
  638.  
  639. ; 165 : for( i = 0; i<N1; i++){
  640.  
  641. call __vcomp_for_static_end
  642. call __vcomp_barrier
  643. pop esi
  644.  
  645. ; 172 : temp = 0;
  646.  
  647. mov esp, ebp
  648. pop ebp
  649. ret 0
  650. _main$omp$1 ENDP
  651. _TEXT ENDS
  652. ; Function compile flags: /Ogtp
  653. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\new
  654. ; COMDAT ??2@YAPAXIPAX@Z
  655. _TEXT SEGMENT
  656. ??2@YAPAXIPAX@Z PROC ; operator new, COMDAT
  657. ; ___formal$dead$ = ecx
  658. ; __Where$ = edx
  659.  
  660. ; 60 : return (_Where);
  661.  
  662. mov eax, edx
  663.  
  664. ; 61 : }
  665.  
  666. ret 0
  667. ??2@YAPAXIPAX@Z ENDP ; operator new
  668. _TEXT ENDS
  669. ; Function compile flags: /Ogtp
  670. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\new
  671. ; COMDAT ??3@YAXPAX0@Z
  672. _TEXT SEGMENT
  673. ??3@YAXPAX0@Z PROC ; operator delete, COMDAT
  674. ; ___formal$dead$ = ecx
  675. ; ___formal$dead$ = edx
  676.  
  677. ; 65 : }
  678.  
  679. ret 0
  680. ??3@YAXPAX0@Z ENDP ; operator delete
  681. _TEXT ENDS
  682. ; Function compile flags: /Ogtp
  683. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  684. ; COMDAT ?length@?$char_traits@D@std@@SAIPBD@Z
  685. _TEXT SEGMENT
  686. ?length@?$char_traits@D@std@@SAIPBD@Z PROC ; std::char_traits<char>::length, COMDAT
  687. ; __First$ = ecx
  688.  
  689. ; 522 : return (*_First == 0 ? 0
  690. ; 523 : : _CSTD strlen(_First));
  691.  
  692. cmp BYTE PTR [ecx], 0
  693. jne SHORT $LN3@length
  694. xor eax, eax
  695.  
  696. ; 524 : }
  697.  
  698. ret 0
  699. $LN3@length:
  700.  
  701. ; 522 : return (*_First == 0 ? 0
  702. ; 523 : : _CSTD strlen(_First));
  703.  
  704. lea edx, DWORD PTR [ecx+1]
  705. npad 5
  706. $LL5@length:
  707. mov al, BYTE PTR [ecx]
  708. inc ecx
  709. test al, al
  710. jne SHORT $LL5@length
  711. sub ecx, edx
  712. mov eax, ecx
  713.  
  714. ; 524 : }
  715.  
  716. ret 0
  717. ?length@?$char_traits@D@std@@SAIPBD@Z ENDP ; std::char_traits<char>::length
  718. _TEXT ENDS
  719. ; Function compile flags: /Ogtp
  720. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  721. ; COMDAT ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z
  722. _TEXT SEGMENT
  723. __Count$ = 8 ; size = 4
  724. ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z PROC ; std::char_traits<char>::copy, COMDAT
  725. ; __First1$ = ecx
  726. ; __First2$ = edx
  727.  
  728. ; 528 : { // copy [_First2, _First2 + _Count) to [_First1, ...)
  729.  
  730. push ebp
  731. mov ebp, esp
  732.  
  733. ; 529 : return (_Count == 0 ? _First1
  734. ; 530 : : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
  735.  
  736. mov eax, DWORD PTR __Count$[ebp]
  737. test eax, eax
  738. jne SHORT $LN3@copy
  739. mov eax, ecx
  740.  
  741. ; 531 : }
  742.  
  743. pop ebp
  744. ret 0
  745. $LN3@copy:
  746.  
  747. ; 529 : return (_Count == 0 ? _First1
  748. ; 530 : : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
  749.  
  750. push eax
  751. push edx
  752. push ecx
  753. call _memcpy
  754. add esp, 12 ; 0000000cH
  755.  
  756. ; 531 : }
  757.  
  758. pop ebp
  759. ret 0
  760. ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z ENDP ; std::char_traits<char>::copy
  761. _TEXT ENDS
  762. ; Function compile flags: /Ogtp
  763. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  764. ; COMDAT ?move@?$char_traits@D@std@@SAPADPADPBDI@Z
  765. _TEXT SEGMENT
  766. __Count$ = 8 ; size = 4
  767. ?move@?$char_traits@D@std@@SAPADPADPBDI@Z PROC ; std::char_traits<char>::move, COMDAT
  768. ; __First1$ = ecx
  769. ; __First2$ = edx
  770.  
  771. ; 551 : { // copy [_First2, _First2 + _Count) to [_First1, ...)
  772.  
  773. push ebp
  774. mov ebp, esp
  775.  
  776. ; 552 : return (_Count == 0 ? _First1
  777. ; 553 : : (_Elem *)_CSTD memmove(_First1, _First2, _Count));
  778.  
  779. mov eax, DWORD PTR __Count$[ebp]
  780. test eax, eax
  781. jne SHORT $LN3@move
  782. mov eax, ecx
  783.  
  784. ; 554 : }
  785.  
  786. pop ebp
  787. ret 0
  788. $LN3@move:
  789.  
  790. ; 552 : return (_Count == 0 ? _First1
  791. ; 553 : : (_Elem *)_CSTD memmove(_First1, _First2, _Count));
  792.  
  793. push eax
  794. push edx
  795. push ecx
  796. call DWORD PTR __imp__memmove
  797. add esp, 12 ; 0000000cH
  798.  
  799. ; 554 : }
  800.  
  801. pop ebp
  802. ret 0
  803. ?move@?$char_traits@D@std@@SAPADPADPBDI@Z ENDP ; std::char_traits<char>::move
  804. _TEXT ENDS
  805. ; Function compile flags: /Ogtp
  806. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  807. ; COMDAT ?assign@?$char_traits@D@std@@SAXAADABD@Z
  808. _TEXT SEGMENT
  809. ?assign@?$char_traits@D@std@@SAXAADABD@Z PROC ; std::char_traits<char>::assign, COMDAT
  810. ; __Left$ = ecx
  811. ; __Right$ = edx
  812.  
  813. ; 564 : _Left = _Right;
  814.  
  815. mov al, BYTE PTR [edx]
  816. mov BYTE PTR [ecx], al
  817.  
  818. ; 565 : }
  819.  
  820. ret 0
  821. ?assign@?$char_traits@D@std@@SAXAADABD@Z ENDP ; std::char_traits<char>::assign
  822. _TEXT ENDS
  823. ; Function compile flags: /Ogtp
  824. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
  825. ; COMDAT ?_Adopt@_Iterator_base0@std@@QAEXPBX@Z
  826. _TEXT SEGMENT
  827. ___formal$dead$ = 8 ; size = 4
  828. ?_Adopt@_Iterator_base0@std@@QAEXPBX@Z PROC ; std::_Iterator_base0::_Adopt, COMDAT
  829. ; _this$dead$ = ecx
  830.  
  831. ; 51 : }
  832.  
  833. ret 4
  834. ?_Adopt@_Iterator_base0@std@@QAEXPBX@Z ENDP ; std::_Iterator_base0::_Adopt
  835. _TEXT ENDS
  836. ; Function compile flags: /Ogtp
  837. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  838. ; COMDAT ??0error_category@std@@QAE@XZ
  839. _TEXT SEGMENT
  840. ??0error_category@std@@QAE@XZ PROC ; std::error_category::error_category, COMDAT
  841. ; _this$ = ecx
  842.  
  843. ; 162 : error_category()
  844.  
  845. mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
  846.  
  847. ; 163 : { // default constructor
  848. ; 164 : }
  849.  
  850. mov eax, ecx
  851. ret 0
  852. ??0error_category@std@@QAE@XZ ENDP ; std::error_category::error_category
  853. _TEXT ENDS
  854. ; Function compile flags: /Ogtp
  855. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  856. ; COMDAT ??1error_category@std@@UAE@XZ
  857. _TEXT SEGMENT
  858. ??1error_category@std@@UAE@XZ PROC ; std::error_category::~error_category, COMDAT
  859. ; _this$ = ecx
  860.  
  861. ; 167 : { // destroy the object
  862.  
  863. mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
  864.  
  865. ; 168 : }
  866.  
  867. ret 0
  868. ??1error_category@std@@UAE@XZ ENDP ; std::error_category::~error_category
  869. _TEXT ENDS
  870. ; Function compile flags: /Ogtp
  871. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  872. ; COMDAT ??8error_category@std@@QBE_NABV01@@Z
  873. _TEXT SEGMENT
  874. __Right$ = 8 ; size = 4
  875. ??8error_category@std@@QBE_NABV01@@Z PROC ; std::error_category::operator==, COMDAT
  876. ; _this$ = ecx
  877.  
  878. ; 184 : { // compare categories for equality
  879.  
  880. push ebp
  881. mov ebp, esp
  882.  
  883. ; 185 : return (this == &_Right);
  884.  
  885. xor eax, eax
  886. cmp ecx, DWORD PTR __Right$[ebp]
  887. sete al
  888.  
  889. ; 186 : }
  890.  
  891. pop ebp
  892. ret 4
  893. ??8error_category@std@@QBE_NABV01@@Z ENDP ; std::error_category::operator==
  894. _TEXT ENDS
  895. ; Function compile flags: /Ogtp
  896. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  897. ; COMDAT ??_Gerror_category@std@@UAEPAXI@Z
  898. _TEXT SEGMENT
  899. ___flags$ = 8 ; size = 4
  900. ??_Gerror_category@std@@UAEPAXI@Z PROC ; std::error_category::`scalar deleting destructor', COMDAT
  901. ; _this$ = ecx
  902. push ebp
  903. mov ebp, esp
  904. test BYTE PTR ___flags$[ebp], 1
  905. push esi
  906. mov esi, ecx
  907.  
  908. ; 167 : { // destroy the object
  909.  
  910. mov DWORD PTR [esi], OFFSET ??_7error_category@std@@6B@
  911. je SHORT $LN6@scalar
  912. push esi
  913. call DWORD PTR __imp_??3@YAXPAX@Z
  914. add esp, 4
  915. $LN6@scalar:
  916. mov eax, esi
  917. pop esi
  918. pop ebp
  919. ret 4
  920. ??_Gerror_category@std@@UAEPAXI@Z ENDP ; std::error_category::`scalar deleting destructor'
  921. _TEXT ENDS
  922. ; Function compile flags: /Ogtp
  923. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  924. ; COMDAT ?value@error_code@std@@QBEHXZ
  925. _TEXT SEGMENT
  926. ?value@error_code@std@@QBEHXZ PROC ; std::error_code::value, COMDAT
  927. ; _this$ = ecx
  928.  
  929. ; 252 : return (_Myval);
  930.  
  931. mov eax, DWORD PTR [ecx]
  932.  
  933. ; 253 : }
  934.  
  935. ret 0
  936. ?value@error_code@std@@QBEHXZ ENDP ; std::error_code::value
  937. _TEXT ENDS
  938. ; Function compile flags: /Ogtp
  939. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  940. ; COMDAT ?category@error_code@std@@QBEABVerror_category@2@XZ
  941. _TEXT SEGMENT
  942. ?category@error_code@std@@QBEABVerror_category@2@XZ PROC ; std::error_code::category, COMDAT
  943. ; _this$ = ecx
  944.  
  945. ; 257 : return (*_Mycat);
  946.  
  947. mov eax, DWORD PTR [ecx+4]
  948.  
  949. ; 258 : }
  950.  
  951. ret 0
  952. ?category@error_code@std@@QBEABVerror_category@2@XZ ENDP ; std::error_code::category
  953. _TEXT ENDS
  954. ; Function compile flags: /Ogtp
  955. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  956. ; COMDAT ??0error_condition@std@@QAE@HABVerror_category@1@@Z
  957. _TEXT SEGMENT
  958. __Val$ = 8 ; size = 4
  959. __Cat$ = 12 ; size = 4
  960. ??0error_condition@std@@QAE@HABVerror_category@1@@Z PROC ; std::error_condition::error_condition, COMDAT
  961. ; _this$ = ecx
  962.  
  963. ; 316 : { // construct from error code and category
  964.  
  965. push ebp
  966. mov ebp, esp
  967. mov eax, DWORD PTR __Val$[ebp]
  968. mov DWORD PTR [ecx], eax
  969. mov eax, DWORD PTR __Cat$[ebp]
  970. mov DWORD PTR [ecx+4], eax
  971.  
  972. ; 317 : }
  973.  
  974. mov eax, ecx
  975. pop ebp
  976. ret 8
  977. ??0error_condition@std@@QAE@HABVerror_category@1@@Z ENDP ; std::error_condition::error_condition
  978. _TEXT ENDS
  979. ; Function compile flags: /Ogtp
  980. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  981. ; COMDAT ?value@error_condition@std@@QBEHXZ
  982. _TEXT SEGMENT
  983. ?value@error_condition@std@@QBEHXZ PROC ; std::error_condition::value, COMDAT
  984. ; _this$ = ecx
  985.  
  986. ; 350 : return (_Myval);
  987.  
  988. mov eax, DWORD PTR [ecx]
  989.  
  990. ; 351 : }
  991.  
  992. ret 0
  993. ?value@error_condition@std@@QBEHXZ ENDP ; std::error_condition::value
  994. _TEXT ENDS
  995. ; Function compile flags: /Ogtp
  996. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  997. ; COMDAT ?category@error_condition@std@@QBEABVerror_category@2@XZ
  998. _TEXT SEGMENT
  999. ?category@error_condition@std@@QBEABVerror_category@2@XZ PROC ; std::error_condition::category, COMDAT
  1000. ; _this$ = ecx
  1001.  
  1002. ; 355 : return (*_Mycat);
  1003.  
  1004. mov eax, DWORD PTR [ecx+4]
  1005.  
  1006. ; 356 : }
  1007.  
  1008. ret 0
  1009. ?category@error_condition@std@@QBEABVerror_category@2@XZ ENDP ; std::error_condition::category
  1010. _TEXT ENDS
  1011. ; Function compile flags: /Ogtp
  1012. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1013. ; COMDAT ??8error_condition@std@@QBE_NABV01@@Z
  1014. _TEXT SEGMENT
  1015. __Right$ = 8 ; size = 4
  1016. ??8error_condition@std@@QBE_NABV01@@Z PROC ; std::error_condition::operator==, COMDAT
  1017. ; _this$ = ecx
  1018.  
  1019. ; 376 : { // test if *this == _Right
  1020.  
  1021. push ebp
  1022. mov ebp, esp
  1023.  
  1024. ; 185 : return (this == &_Right);
  1025.  
  1026. mov edx, DWORD PTR __Right$[ebp]
  1027. mov eax, DWORD PTR [ecx+4]
  1028. cmp eax, DWORD PTR [edx+4]
  1029.  
  1030. ; 377 : return (category() == _Right.category()
  1031. ; 378 : && value() == _Right.value());
  1032.  
  1033. jne SHORT $LN3@operator
  1034. mov eax, DWORD PTR [ecx]
  1035. cmp eax, DWORD PTR [edx]
  1036. jne SHORT $LN3@operator
  1037. mov al, 1
  1038.  
  1039. ; 379 : }
  1040.  
  1041. pop ebp
  1042. ret 4
  1043. $LN3@operator:
  1044.  
  1045. ; 377 : return (category() == _Right.category()
  1046. ; 378 : && value() == _Right.value());
  1047.  
  1048. xor al, al
  1049.  
  1050. ; 379 : }
  1051.  
  1052. pop ebp
  1053. ret 4
  1054. ??8error_condition@std@@QBE_NABV01@@Z ENDP ; std::error_condition::operator==
  1055. _TEXT ENDS
  1056. ; Function compile flags: /Ogtp
  1057. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1058. ; COMDAT ?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z
  1059. _TEXT SEGMENT
  1060. ___$ReturnUdt$ = 8 ; size = 4
  1061. __Errval$ = 12 ; size = 4
  1062. ?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z PROC ; std::error_category::default_error_condition, COMDAT
  1063. ; _this$ = ecx
  1064.  
  1065. ; 401 : { // make error_condition for error code
  1066.  
  1067. push ebp
  1068. mov ebp, esp
  1069.  
  1070. ; 316 : { // construct from error code and category
  1071.  
  1072. mov eax, DWORD PTR ___$ReturnUdt$[ebp]
  1073. mov edx, DWORD PTR __Errval$[ebp]
  1074. mov DWORD PTR [eax], edx
  1075. mov DWORD PTR [eax+4], ecx
  1076.  
  1077. ; 402 : return (error_condition(_Errval, *this));
  1078. ; 403 : }
  1079.  
  1080. pop ebp
  1081. ret 8
  1082. ?default_error_condition@error_category@std@@UBE?AVerror_condition@2@H@Z ENDP ; std::error_category::default_error_condition
  1083. _TEXT ENDS
  1084. ; Function compile flags: /Ogtp
  1085. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1086. ; COMDAT ?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z
  1087. _TEXT SEGMENT
  1088. $T1 = -8 ; size = 8
  1089. __Errval$ = 8 ; size = 4
  1090. __Cond$ = 12 ; size = 4
  1091. ?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z PROC ; std::error_category::equivalent, COMDAT
  1092. ; _this$ = ecx
  1093.  
  1094. ; 408 : { // test if error code same condition
  1095.  
  1096. push ebp
  1097. mov ebp, esp
  1098.  
  1099. ; 409 : return (default_error_condition(_Errval) == _Cond);
  1100.  
  1101. mov eax, DWORD PTR [ecx]
  1102. sub esp, 8
  1103. lea edx, DWORD PTR $T1[ebp]
  1104. push DWORD PTR __Errval$[ebp]
  1105. push edx
  1106. call DWORD PTR [eax+12]
  1107.  
  1108. ; 185 : return (this == &_Right);
  1109.  
  1110. mov edx, DWORD PTR __Cond$[ebp]
  1111. mov ecx, DWORD PTR [eax+4]
  1112. cmp ecx, DWORD PTR [edx+4]
  1113.  
  1114. ; 186 : }
  1115. ; 187 :
  1116. ; 188 : bool operator!=(const error_category& _Right) const _NOEXCEPT
  1117. ; 189 : { // compare categories for inequality
  1118. ; 190 : return (!(*this == _Right));
  1119. ; 191 : }
  1120. ; 192 :
  1121. ; 193 : bool operator<(const error_category& _Right) const _NOEXCEPT
  1122. ; 194 : { // compare categories for order
  1123. ; 195 : return (this < &_Right);
  1124. ; 196 : }
  1125. ; 197 :
  1126. ; 198 : private:
  1127. ; 199 : error_category(const error_category&); // not defined
  1128. ; 200 :
  1129. ; 201 : error_category& operator=(const error_category&); // not defined
  1130. ; 202 : };
  1131. ; 203 :
  1132. ; 204 : // CLASS error_code
  1133. ; 205 : class error_code
  1134. ; 206 : { // store an implementation-specific error code and category
  1135. ; 207 : public:
  1136. ; 208 : typedef error_code _Myt;
  1137. ; 209 :
  1138. ; 210 : error_code()
  1139. ; 211 : : _Myval(0),
  1140. ; 212 : _Mycat(&system_category())
  1141. ; 213 : { // construct non-error
  1142. ; 214 : }
  1143. ; 215 :
  1144. ; 216 : error_code(int _Val, const error_category& _Cat)
  1145. ; 217 : : _Myval(_Val), _Mycat(&_Cat)
  1146. ; 218 : { // construct from error code and category
  1147. ; 219 : }
  1148. ; 220 :
  1149. ; 221 : template<class _Enum>
  1150. ; 222 : error_code(_Enum _Errcode,
  1151. ; 223 : typename enable_if<is_error_code_enum<_Enum>::value,
  1152. ; 224 : void>::type ** = 0)
  1153. ; 225 : : _Myval(0), _Mycat(0)
  1154. ; 226 : { // construct from enumerated error code
  1155. ; 227 : *this = make_error_code(_Errcode); // using ADL
  1156. ; 228 : }
  1157. ; 229 :
  1158. ; 230 : void assign(int _Val, const error_category& _Cat)
  1159. ; 231 : { // assign error code and category
  1160. ; 232 : _Myval = _Val;
  1161. ; 233 : _Mycat = &_Cat;
  1162. ; 234 : }
  1163. ; 235 :
  1164. ; 236 : template<class _Enum>
  1165. ; 237 : typename enable_if<is_error_code_enum<_Enum>::value,
  1166. ; 238 : error_code>::type& operator=(_Enum _Errcode)
  1167. ; 239 : { // assign enumerated error code
  1168. ; 240 : *this = make_error_code(_Errcode); // using ADL
  1169. ; 241 : return (*this);
  1170. ; 242 : }
  1171. ; 243 :
  1172. ; 244 : void clear() _NOEXCEPT
  1173. ; 245 : { // assign non-error
  1174. ; 246 : _Myval = 0;
  1175. ; 247 : _Mycat = &system_category();
  1176. ; 248 : }
  1177. ; 249 :
  1178. ; 250 : int value() const
  1179. ; 251 : { // get error code
  1180. ; 252 : return (_Myval);
  1181. ; 253 : }
  1182. ; 254 :
  1183. ; 255 : const error_category& category() const
  1184. ; 256 : { // get category
  1185. ; 257 : return (*_Mycat);
  1186. ; 258 : }
  1187. ; 259 :
  1188. ; 260 : error_condition default_error_condition() const;
  1189. ; 261 :
  1190. ; 262 : string message() const
  1191. ; 263 : { // get name of error code
  1192. ; 264 : return (category().message(value()));
  1193. ; 265 : }
  1194. ; 266 :
  1195. ; 267 : _TYPEDEF_BOOL_TYPE;
  1196. ; 268 :
  1197. ; 269 : _OPERATOR_BOOL() const _NOEXCEPT
  1198. ; 270 : { // test for actual error
  1199. ; 271 : return (value() != 0 ? _CONVERTIBLE_TO_TRUE : 0);
  1200. ; 272 : }
  1201. ; 273 :
  1202. ; 274 : bool operator!() const _NOEXCEPT
  1203. ; 275 : { // test for actual error
  1204. ; 276 : return (value() == 0);
  1205. ; 277 : }
  1206. ; 278 :
  1207. ; 279 : bool operator==(const error_code& _Right) const _NOEXCEPT
  1208. ; 280 : { // test if *this == _Right
  1209. ; 281 : return (category() == _Right.category()
  1210. ; 282 : && value() == _Right.value());
  1211. ; 283 : }
  1212. ; 284 :
  1213. ; 285 : bool operator!=(const error_code& _Right) const _NOEXCEPT
  1214. ; 286 : { // test if *this != _Right
  1215. ; 287 : return (!(*this == _Right));
  1216. ; 288 : }
  1217. ; 289 :
  1218. ; 290 : bool operator<(const error_code& _Right) const _NOEXCEPT
  1219. ; 291 : { // test if *this == _Right
  1220. ; 292 : return (category() < _Right.category()
  1221. ; 293 : || category() == _Right.category()
  1222. ; 294 : && value() < _Right.value());
  1223. ; 295 : }
  1224. ; 296 :
  1225. ; 297 : private:
  1226. ; 298 : int _Myval; // the stored error number
  1227. ; 299 : const error_category *_Mycat; // pointer to error category
  1228. ; 300 : };
  1229. ; 301 :
  1230. ; 302 : // CLASS error_condition
  1231. ; 303 : class error_condition
  1232. ; 304 : { // store an abstract error code and category
  1233. ; 305 : public:
  1234. ; 306 : typedef error_condition _Myt;
  1235. ; 307 :
  1236. ; 308 : error_condition() _NOEXCEPT
  1237. ; 309 : : _Myval(0),
  1238. ; 310 : _Mycat(&generic_category())
  1239. ; 311 : { // construct non-error
  1240. ; 312 : }
  1241. ; 313 :
  1242. ; 314 : error_condition(int _Val, const error_category& _Cat) _NOEXCEPT
  1243. ; 315 : : _Myval(_Val), _Mycat(&_Cat)
  1244. ; 316 : { // construct from error code and category
  1245. ; 317 : }
  1246. ; 318 :
  1247. ; 319 : template<class _Enum>
  1248. ; 320 : error_condition(_Enum _Errcode,
  1249. ; 321 : typename enable_if<is_error_condition_enum<_Enum>::value,
  1250. ; 322 : void>::type ** = 0) _NOEXCEPT
  1251. ; 323 : : _Myval(0), _Mycat(0)
  1252. ; 324 : { // construct from enumerated error code
  1253. ; 325 : *this = make_error_condition(_Errcode); // using ADL
  1254. ; 326 : }
  1255. ; 327 :
  1256. ; 328 : void assign(int _Val, const error_category& _Cat) _NOEXCEPT
  1257. ; 329 : { // assign error code and category
  1258. ; 330 : _Myval = _Val;
  1259. ; 331 : _Mycat = &_Cat;
  1260. ; 332 : }
  1261. ; 333 :
  1262. ; 334 : template<class _Enum>
  1263. ; 335 : typename enable_if<is_error_condition_enum<_Enum>::value,
  1264. ; 336 : error_condition>::type& operator=(_Enum _Errcode) _NOEXCEPT
  1265. ; 337 : { // assign enumerated error code
  1266. ; 338 : *this = make_error_condition(_Errcode); // using ADL
  1267. ; 339 : return (*this);
  1268. ; 340 : }
  1269. ; 341 :
  1270. ; 342 : void clear() _NOEXCEPT
  1271. ; 343 : { // assign non-error
  1272. ; 344 : _Myval = 0;
  1273. ; 345 : _Mycat = &generic_category();
  1274. ; 346 : }
  1275. ; 347 :
  1276. ; 348 : int value() const _NOEXCEPT
  1277. ; 349 : { // get error code
  1278. ; 350 : return (_Myval);
  1279. ; 351 : }
  1280. ; 352 :
  1281. ; 353 : const error_category& category() const _NOEXCEPT
  1282. ; 354 : { // get category
  1283. ; 355 : return (*_Mycat);
  1284. ; 356 : }
  1285. ; 357 :
  1286. ; 358 : string message() const
  1287. ; 359 : { // get name of error code
  1288. ; 360 : return (category().message(value()));
  1289. ; 361 : }
  1290. ; 362 :
  1291. ; 363 : _TYPEDEF_BOOL_TYPE;
  1292. ; 364 :
  1293. ; 365 : _OPERATOR_BOOL() const _NOEXCEPT
  1294. ; 366 : { // test for actual error
  1295. ; 367 : return (value() != 0 ? _CONVERTIBLE_TO_TRUE : 0);
  1296. ; 368 : }
  1297. ; 369 :
  1298. ; 370 : bool operator!() const _NOEXCEPT
  1299. ; 371 : { // test for actual error
  1300. ; 372 : return (value() == 0);
  1301. ; 373 : }
  1302. ; 374 :
  1303. ; 375 : bool operator==(const error_condition& _Right) const _NOEXCEPT
  1304. ; 376 : { // test if *this == _Right
  1305. ; 377 : return (category() == _Right.category()
  1306. ; 378 : && value() == _Right.value());
  1307.  
  1308. jne SHORT $LN5@equivalent
  1309. mov eax, DWORD PTR [eax]
  1310. cmp eax, DWORD PTR [edx]
  1311. jne SHORT $LN5@equivalent
  1312.  
  1313. ; 409 : return (default_error_condition(_Errval) == _Cond);
  1314.  
  1315. mov al, 1
  1316.  
  1317. ; 410 : }
  1318.  
  1319. mov esp, ebp
  1320. pop ebp
  1321. ret 8
  1322. $LN5@equivalent:
  1323.  
  1324. ; 409 : return (default_error_condition(_Errval) == _Cond);
  1325.  
  1326. xor al, al
  1327.  
  1328. ; 410 : }
  1329.  
  1330. mov esp, ebp
  1331. pop ebp
  1332. ret 8
  1333. ?equivalent@error_category@std@@UBE_NHABVerror_condition@2@@Z ENDP ; std::error_category::equivalent
  1334. _TEXT ENDS
  1335. ; Function compile flags: /Ogtp
  1336. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1337. ; COMDAT ?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z
  1338. _TEXT SEGMENT
  1339. __Code$ = 8 ; size = 4
  1340. __Errval$ = 12 ; size = 4
  1341. ?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z PROC ; std::error_category::equivalent, COMDAT
  1342. ; _this$ = ecx
  1343.  
  1344. ; 415 : { // test if conditions same for this category
  1345.  
  1346. push ebp
  1347. mov ebp, esp
  1348.  
  1349. ; 185 : return (this == &_Right);
  1350.  
  1351. mov eax, DWORD PTR __Code$[ebp]
  1352. cmp ecx, DWORD PTR [eax+4]
  1353.  
  1354. ; 416 : return (*this == _Code.category() && _Code.value() == _Errval);
  1355.  
  1356. jne SHORT $LN3@equivalent
  1357. mov eax, DWORD PTR [eax]
  1358. cmp eax, DWORD PTR __Errval$[ebp]
  1359. jne SHORT $LN3@equivalent
  1360. mov al, 1
  1361.  
  1362. ; 417 : }
  1363.  
  1364. pop ebp
  1365. ret 8
  1366. $LN3@equivalent:
  1367.  
  1368. ; 416 : return (*this == _Code.category() && _Code.value() == _Errval);
  1369.  
  1370. xor al, al
  1371.  
  1372. ; 417 : }
  1373.  
  1374. pop ebp
  1375. ret 8
  1376. ?equivalent@error_category@std@@UBE_NABVerror_code@2@H@Z ENDP ; std::error_category::equivalent
  1377. _TEXT ENDS
  1378. ; Function compile flags: /Ogtp
  1379. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1380. ; COMDAT ??0_Generic_error_category@std@@QAE@XZ
  1381. _TEXT SEGMENT
  1382. ??0_Generic_error_category@std@@QAE@XZ PROC ; std::_Generic_error_category::_Generic_error_category, COMDAT
  1383. ; _this$ = ecx
  1384.  
  1385. ; 580 : _Generic_error_category()
  1386.  
  1387. mov DWORD PTR [ecx], OFFSET ??_7_Generic_error_category@std@@6B@
  1388.  
  1389. ; 581 : { // default constructor
  1390. ; 582 : }
  1391.  
  1392. mov eax, ecx
  1393. ret 0
  1394. ??0_Generic_error_category@std@@QAE@XZ ENDP ; std::_Generic_error_category::_Generic_error_category
  1395. _TEXT ENDS
  1396. ; Function compile flags: /Ogtp
  1397. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1398. ; COMDAT ?name@_Generic_error_category@std@@UBEPBDXZ
  1399. _TEXT SEGMENT
  1400. ?name@_Generic_error_category@std@@UBEPBDXZ PROC ; std::_Generic_error_category::name, COMDAT
  1401. ; _this$ = ecx
  1402.  
  1403. ; 586 : return ("generic");
  1404.  
  1405. mov eax, OFFSET ??_C@_07DCLBNMLN@generic?$AA@
  1406.  
  1407. ; 587 : }
  1408.  
  1409. ret 0
  1410. ?name@_Generic_error_category@std@@UBEPBDXZ ENDP ; std::_Generic_error_category::name
  1411. _TEXT ENDS
  1412. ; Function compile flags: /Ogtp
  1413. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1414. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  1415. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1416. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  1417. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  1418. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  1419. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1420. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  1421. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  1422. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1423. ; COMDAT ?message@_Generic_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
  1424. _TEXT SEGMENT
  1425. $T1 = -4 ; size = 4
  1426. ___$ReturnUdt$ = 8 ; size = 4
  1427. __Errcode$ = 12 ; size = 4
  1428. ?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
  1429. ; _this$ = ecx
  1430.  
  1431. ; 590 : { // convert to name of error
  1432.  
  1433. push ebp
  1434. mov ebp, esp
  1435. push ecx
  1436. push esi
  1437.  
  1438. ; 591 : const char *_Name = _Syserror_map(_Errcode);
  1439.  
  1440. push DWORD PTR __Errcode$[ebp]
  1441. mov DWORD PTR $T1[ebp], 0
  1442. call DWORD PTR __imp_?_Syserror_map@std@@YAPBDH@Z
  1443. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  1444.  
  1445. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  1446.  
  1447. mov esi, DWORD PTR ___$ReturnUdt$[ebp]
  1448. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  1449.  
  1450. ; 591 : const char *_Name = _Syserror_map(_Errcode);
  1451.  
  1452. add esp, 4
  1453.  
  1454. ; 592 : return (string(_Name != 0 ? _Name : "unknown error"));
  1455.  
  1456. test eax, eax
  1457. mov edx, OFFSET ??_C@_0O@BFJCFAAK@unknown?5error?$AA@
  1458. cmovne edx, eax
  1459. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  1460.  
  1461. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  1462.  
  1463. mov DWORD PTR [esi+20], 15 ; 0000000fH
  1464.  
  1465. ; 1145 : }
  1466. ; 1146 :
  1467. ; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
  1468. ; 1148 : { // assign _Count * _Ch
  1469. ; 1149 : if (_Count == npos)
  1470. ; 1150 : _Xlen(); // result too long
  1471. ; 1151 :
  1472. ; 1152 : if (_Grow(_Count))
  1473. ; 1153 : { // make room and assign new stuff
  1474. ; 1154 : _Chassign(0, _Count, _Ch);
  1475. ; 1155 : _Eos(_Count);
  1476. ; 1156 : }
  1477. ; 1157 : return (*this);
  1478. ; 1158 : }
  1479. ; 1159 :
  1480. ; 1160 : template<class _Iter>
  1481. ; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
  1482. ; 1162 : _Myt&>::type
  1483. ; 1163 : assign(_Iter _First, _Iter _Last)
  1484. ; 1164 : { // assign [First, _Last), input iterators
  1485. ; 1165 : return (replace(begin(), end(), _First, _Last));
  1486. ; 1166 : }
  1487. ; 1167 :
  1488. ; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
  1489. ; 1169 : { // assign [First, _Last), const pointers
  1490. ; 1170 : return (replace(begin(), end(), _First, _Last));
  1491. ; 1171 : }
  1492. ; 1172 :
  1493. ; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
  1494. ; 1174 : { // assign [First, _Last), const_iterators
  1495. ; 1175 : return (replace(begin(), end(), _First, _Last));
  1496. ; 1176 : }
  1497. ; 1177 :
  1498. ; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
  1499. ; 1179 : { // insert _Right at _Off
  1500. ; 1180 : return (insert(_Off, _Right, 0, npos));
  1501. ; 1181 : }
  1502. ; 1182 :
  1503. ; 1183 : _Myt& insert(size_type _Off,
  1504. ; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
  1505. ; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
  1506. ; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  1507. ; 1187 : _Xran(); // _Off or _Roff off end
  1508. ; 1188 : size_type _Num = _Right.size() - _Roff;
  1509. ; 1189 : if (_Num < _Count)
  1510. ; 1190 : _Count = _Num; // trim _Count to size
  1511. ; 1191 : if (npos - this->_Mysize <= _Count)
  1512. ; 1192 : _Xlen(); // result too long
  1513. ; 1193 :
  1514. ; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  1515. ; 1195 : { // make room and insert new stuff
  1516. ; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
  1517. ; 1197 : this->_Myptr() + _Off,
  1518. ; 1198 : this->_Mysize - _Off); // empty out hole
  1519. ; 1199 : if (this == &_Right)
  1520. ; 1200 : _Traits::move(this->_Myptr() + _Off,
  1521. ; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
  1522. ; 1202 : _Count); // substring
  1523. ; 1203 : else
  1524. ; 1204 : _Traits::copy(this->_Myptr() + _Off,
  1525. ; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
  1526. ; 1206 : _Eos(_Num);
  1527. ; 1207 : }
  1528. ; 1208 : return (*this);
  1529. ; 1209 : }
  1530. ; 1210 :
  1531. ; 1211 : _Myt& insert(size_type _Off,
  1532. ; 1212 : const _Elem *_Ptr, size_type _Count)
  1533. ; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
  1534. ; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
  1535. ; 1215 : if (_Count != 0)
  1536. ; 1216 : _DEBUG_POINTER(_Ptr);
  1537. ; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  1538. ; 1218 :
  1539. ; 1219 : if (_Inside(_Ptr))
  1540. ; 1220 : return (insert(_Off, *this,
  1541. ; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
  1542. ; 1222 : if (this->_Mysize < _Off)
  1543. ; 1223 : _Xran(); // _Off off end
  1544. ; 1224 : if (npos - this->_Mysize <= _Count)
  1545. ; 1225 : _Xlen(); // result too long
  1546. ; 1226 : size_type _Num;
  1547. ; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  1548. ; 1228 : { // make room and insert new stuff
  1549. ; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
  1550. ; 1230 : this->_Myptr() + _Off,
  1551. ; 1231 : this->_Mysize - _Off); // empty out hole
  1552. ; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  1553. ; 1233 : _Eos(_Num);
  1554. ; 1234 : }
  1555. ; 1235 : return (*this);
  1556. ; 1236 : }
  1557. ; 1237 :
  1558. ; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
  1559. ; 1239 : { // insert [_Ptr, <null>) at _Off
  1560. ; 1240 : _DEBUG_POINTER(_Ptr);
  1561. ; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
  1562. ; 1242 : }
  1563. ; 1243 :
  1564. ; 1244 : _Myt& insert(size_type _Off,
  1565. ; 1245 : size_type _Count, _Elem _Ch)
  1566. ; 1246 : { // insert _Count * _Ch at _Off
  1567. ; 1247 : if (this->_Mysize < _Off)
  1568. ; 1248 : _Xran(); // _Off off end
  1569. ; 1249 : if (npos - this->_Mysize <= _Count)
  1570. ; 1250 : _Xlen(); // result too long
  1571. ; 1251 : size_type _Num;
  1572. ; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  1573. ; 1253 : { // make room and insert new stuff
  1574. ; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
  1575. ; 1255 : this->_Myptr() + _Off,
  1576. ; 1256 : this->_Mysize - _Off); // empty out hole
  1577. ; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
  1578. ; 1258 : _Eos(_Num);
  1579. ; 1259 : }
  1580. ; 1260 : return (*this);
  1581. ; 1261 : }
  1582. ; 1262 :
  1583. ; 1263 : iterator insert(const_iterator _Where)
  1584. ; 1264 : { // insert <null> at _Where
  1585. ; 1265 : return (insert(_Where, _Elem()));
  1586. ; 1266 : }
  1587. ; 1267 :
  1588. ; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
  1589. ; 1269 : { // insert _Ch at _Where
  1590. ; 1270 : size_type _Off = _Pdif(_Where, begin());
  1591. ; 1271 : insert(_Off, 1, _Ch);
  1592. ; 1272 : return (begin() + _Off);
  1593. ; 1273 : }
  1594. ; 1274 :
  1595. ; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
  1596. ; 1276 : { // insert _Count * _Elem at _Where
  1597. ; 1277 : size_type _Off = _Pdif(_Where, begin());
  1598. ; 1278 : insert(_Off, _Count, _Ch);
  1599. ; 1279 : return (begin() + _Off);
  1600. ; 1280 : }
  1601. ; 1281 :
  1602. ; 1282 : template<class _Iter>
  1603. ; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
  1604. ; 1284 : iterator>::type
  1605. ; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  1606. ; 1286 : { // insert [_First, _Last) at _Where, input iterators
  1607. ; 1287 : size_type _Off = _Pdif(_Where, begin());
  1608. ; 1288 : replace(_Where, _Where, _First, _Last);
  1609. ; 1289 : return (begin() + _Off);
  1610. ; 1290 : }
  1611. ; 1291 :
  1612. ; 1292 : iterator insert(const_iterator _Where,
  1613. ; 1293 : const_pointer _First, const_pointer _Last)
  1614. ; 1294 : { // insert [_First, _Last) at _Where, const pointers
  1615. ; 1295 : size_type _Off = _Pdif(_Where, begin());
  1616. ; 1296 : replace(_Where, _Where, _First, _Last);
  1617. ; 1297 : return (begin() + _Off);
  1618. ; 1298 : }
  1619. ; 1299 :
  1620. ; 1300 : iterator insert(const_iterator _Where,
  1621. ; 1301 : const_iterator _First, const_iterator _Last)
  1622. ; 1302 : { // insert [_First, _Last) at _Where, const_iterators
  1623. ; 1303 : size_type _Off = _Pdif(_Where, begin());
  1624. ; 1304 : replace(_Where, _Where, _First, _Last);
  1625. ; 1305 : return (begin() + _Off);
  1626. ; 1306 : }
  1627. ; 1307 :
  1628. ; 1308 : _Myt& erase(size_type _Off = 0)
  1629. ; 1309 : { // erase elements [_Off, ...)
  1630. ; 1310 : if (this->_Mysize < _Off)
  1631. ; 1311 : _Xran(); // _Off off end
  1632. ; 1312 : _Eos(_Off);
  1633. ; 1313 : return (*this);
  1634. ; 1314 : }
  1635. ; 1315 :
  1636. ; 1316 : _Myt& erase(size_type _Off, size_type _Count)
  1637. ; 1317 : { // erase elements [_Off, _Off + _Count)
  1638. ; 1318 : if (this->_Mysize < _Off)
  1639. ; 1319 : _Xran(); // _Off off end
  1640. ; 1320 : if (this->_Mysize - _Off <= _Count)
  1641. ; 1321 : _Eos(_Off); // erase elements [_Off, ...)
  1642. ; 1322 : else if (0 < _Count)
  1643. ; 1323 : { // move elements down
  1644. ; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
  1645. ; 1325 : size_type _Newsize = this->_Mysize - _Count;
  1646. ; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
  1647. ; 1327 : _Eos(_Newsize);
  1648. ; 1328 : }
  1649. ; 1329 : return (*this);
  1650. ; 1330 : }
  1651. ; 1331 :
  1652. ; 1332 : iterator erase(const_iterator _Where)
  1653. ; 1333 : { // erase element at _Where
  1654. ; 1334 : size_type _Count = _Pdif(_Where, begin());
  1655. ; 1335 : erase(_Count, 1);
  1656. ; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  1657. ; 1337 : }
  1658. ; 1338 :
  1659. ; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
  1660. ; 1340 : { // erase substring [_First, _Last)
  1661. ; 1341 : _DEBUG_RANGE(_First, _Last);
  1662. ; 1342 : size_type _Count = _Pdif(_First, begin());
  1663. ; 1343 : erase(_Count, _Pdif(_Last, _First));
  1664. ; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  1665. ; 1345 : }
  1666. ; 1346 :
  1667. ; 1347 : void clear() _NOEXCEPT
  1668. ; 1348 : { // erase all
  1669. ; 1349 : _Eos(0);
  1670. ; 1350 : }
  1671. ; 1351 :
  1672. ; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
  1673. ; 1353 : { // replace [_Off, _Off + _N0) with _Right
  1674. ; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
  1675. ; 1355 : }
  1676. ; 1356 :
  1677. ; 1357 : _Myt& replace(size_type _Off,
  1678. ; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
  1679. ; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  1680. ; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  1681. ; 1361 : _Xran(); // _Off or _Roff off end
  1682. ; 1362 : if (this->_Mysize - _Off < _N0)
  1683. ; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  1684. ; 1364 : size_type _Num = _Right.size() - _Roff;
  1685. ; 1365 : if (_Num < _Count)
  1686. ; 1366 : _Count = _Num; // trim _Count to size
  1687. ; 1367 : if (npos - _Count <= this->_Mysize - _N0)
  1688. ; 1368 : _Xlen(); // result too long
  1689. ; 1369 :
  1690. ; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
  1691. ; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
  1692. ; 1372 : if (this->_Mysize < _Newsize)
  1693. ; 1373 : _Grow(_Newsize);
  1694. ; 1374 :
  1695. ; 1375 : if (this != &_Right)
  1696. ; 1376 : { // no overlap, just move down and copy in new stuff
  1697. ; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
  1698. ; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
  1699. ; 1379 : _Traits::copy(this->_Myptr() + _Off,
  1700. ; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
  1701. ; 1381 : }
  1702. ; 1382 : else if (_Count <= _N0)
  1703. ; 1383 : { // hole doesn't get larger, just copy in substring
  1704. ; 1384 : _Traits::move(this->_Myptr() + _Off,
  1705. ; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
  1706. ; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
  1707. ; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  1708. ; 1388 : }
  1709. ; 1389 : else if (_Roff <= _Off)
  1710. ; 1390 : { // hole gets larger, substring begins before hole
  1711. ; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
  1712. ; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  1713. ; 1393 : _Traits::move(this->_Myptr() + _Off,
  1714. ; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
  1715. ; 1395 : }
  1716. ; 1396 : else if (_Off + _N0 <= _Roff)
  1717. ; 1397 : { // hole gets larger, substring begins after hole
  1718. ; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
  1719. ; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  1720. ; 1400 : _Traits::move(this->_Myptr() + _Off,
  1721. ; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
  1722. ; 1402 : _Count); // fill hole
  1723. ; 1403 : }
  1724. ; 1404 : else
  1725. ; 1405 : { // hole gets larger, substring begins in hole
  1726. ; 1406 : _Traits::move(this->_Myptr() + _Off,
  1727. ; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
  1728. ; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
  1729. ; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  1730. ; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
  1731. ; 1411 : this->_Myptr() + _Roff + _Count,
  1732. ; 1412 : _Count - _N0); // fill rest of new hole
  1733. ; 1413 : }
  1734. ; 1414 :
  1735. ; 1415 : _Eos(_Newsize);
  1736. ; 1416 : return (*this);
  1737. ; 1417 : }
  1738. ; 1418 :
  1739. ; 1419 : _Myt& replace(size_type _Off,
  1740. ; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
  1741. ; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  1742. ; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
  1743. ; 1423 : if (_Count != 0)
  1744. ; 1424 : _DEBUG_POINTER(_Ptr);
  1745. ; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  1746. ; 1426 :
  1747. ; 1427 : if (_Inside(_Ptr))
  1748. ; 1428 : return (replace(_Off, _N0, *this,
  1749. ; 1429 : _Ptr - this->_Myptr(),
  1750. ; 1430 : _Count)); // substring, replace carefully
  1751. ; 1431 : if (this->_Mysize < _Off)
  1752. ; 1432 : _Xran(); // _Off off end
  1753. ; 1433 : if (this->_Mysize - _Off < _N0)
  1754. ; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  1755. ; 1435 : if (npos - _Count <= this->_Mysize - _N0)
  1756. ; 1436 : _Xlen(); // result too long
  1757. ; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
  1758. ; 1438 :
  1759. ; 1439 : if (_Count < _N0)
  1760. ; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
  1761. ; 1441 : this->_Myptr() + _Off + _N0,
  1762. ; 1442 : _Nm); // smaller hole, move tail up
  1763. ; 1443 : size_type _Num;
  1764. ; 1444 : if ((0 < _Count || 0 < _N0)
  1765. ; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  1766. ; 1446 : { // make room and rearrange
  1767. ; 1447 : if (_N0 < _Count)
  1768. ; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
  1769. ; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  1770. ; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  1771. ; 1451 : _Eos(_Num);
  1772. ; 1452 : }
  1773. ; 1453 : return (*this);
  1774. ; 1454 : }
  1775. ; 1455 :
  1776. ; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
  1777. ; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
  1778. ; 1458 : _DEBUG_POINTER(_Ptr);
  1779. ; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  1780. ; 1460 : }
  1781. ; 1461 :
  1782. ; 1462 : _Myt& replace(size_type _Off,
  1783. ; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
  1784. ; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
  1785. ; 1465 : if (this->_Mysize < _Off)
  1786. ; 1466 : _Xran(); // _Off off end
  1787. ; 1467 : if (this->_Mysize - _Off < _N0)
  1788. ; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  1789. ; 1469 : if (npos - _Count <= this->_Mysize - _N0)
  1790. ; 1470 : _Xlen(); // result too long
  1791. ; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
  1792. ; 1472 :
  1793. ; 1473 : if (_Count < _N0)
  1794. ; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
  1795. ; 1475 : this->_Myptr() + _Off + _N0,
  1796. ; 1476 : _Nm); // smaller hole, move tail up
  1797. ; 1477 : size_type _Num;
  1798. ; 1478 : if ((0 < _Count || 0 < _N0)
  1799. ; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  1800. ; 1480 : { // make room and rearrange
  1801. ; 1481 : if (_N0 < _Count)
  1802. ; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
  1803. ; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  1804. ; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
  1805. ; 1485 : _Eos(_Num);
  1806. ; 1486 : }
  1807. ; 1487 : return (*this);
  1808. ; 1488 : }
  1809. ; 1489 :
  1810. ; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
  1811. ; 1491 : const _Myt& _Right)
  1812. ; 1492 : { // replace [_First, _Last) with _Right
  1813. ; 1493 : return (replace(
  1814. ; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
  1815. ; 1495 : }
  1816. ; 1496 :
  1817. ; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
  1818. ; 1498 : const _Elem *_Ptr, size_type _Count)
  1819. ; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
  1820. ; 1500 : return (replace(
  1821. ; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
  1822. ; 1502 : }
  1823. ; 1503 :
  1824. ; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
  1825. ; 1505 : const _Elem *_Ptr)
  1826. ; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
  1827. ; 1507 : return (replace(
  1828. ; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
  1829. ; 1509 : }
  1830. ; 1510 :
  1831. ; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
  1832. ; 1512 : size_type _Count, _Elem _Ch)
  1833. ; 1513 : { // replace [_First, _Last) with _Count * _Ch
  1834. ; 1514 : return (replace(
  1835. ; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
  1836. ; 1516 : }
  1837. ; 1517 :
  1838. ; 1518 : template<class _Iter>
  1839. ; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
  1840. ; 1520 : _Myt&>::type
  1841. ; 1521 : replace(const_iterator _First, const_iterator _Last,
  1842. ; 1522 : _Iter _First2, _Iter _Last2)
  1843. ; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
  1844. ; 1524 : _Myt _Right(_First2, _Last2);
  1845. ; 1525 : replace(_First, _Last, _Right);
  1846. ; 1526 : return (*this);
  1847. ; 1527 : }
  1848. ; 1528 :
  1849. ; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
  1850. ; 1530 : const_pointer _First2, const_pointer _Last2)
  1851. ; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  1852. ; 1532 : if (_First2 == _Last2)
  1853. ; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  1854. ; 1534 : else
  1855. ; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  1856. ; 1536 : &*_First2, _Last2 - _First2);
  1857. ; 1537 : return (*this);
  1858. ; 1538 : }
  1859. ; 1539 :
  1860. ; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
  1861. ; 1541 : pointer _First2, pointer _Last2)
  1862. ; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  1863. ; 1543 : if (_First2 == _Last2)
  1864. ; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  1865. ; 1545 : else
  1866. ; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  1867. ; 1547 : &*_First2, _Last2 - _First2);
  1868. ; 1548 : return (*this);
  1869. ; 1549 : }
  1870. ; 1550 :
  1871. ; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
  1872. ; 1552 : const_iterator _First2, const_iterator _Last2)
  1873. ; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  1874. ; 1554 : if (_First2 == _Last2)
  1875. ; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  1876. ; 1556 : else
  1877. ; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  1878. ; 1558 : &*_First2, _Last2 - _First2);
  1879. ; 1559 : return (*this);
  1880. ; 1560 : }
  1881. ; 1561 :
  1882. ; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
  1883. ; 1563 : iterator _First2, iterator _Last2)
  1884. ; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  1885. ; 1565 : if (_First2 == _Last2)
  1886. ; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  1887. ; 1567 : else
  1888. ; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  1889. ; 1569 : &*_First2, _Last2 - _First2);
  1890. ; 1570 : return (*this);
  1891. ; 1571 : }
  1892. ; 1572 :
  1893. ; 1573 : iterator begin() _NOEXCEPT
  1894. ; 1574 : { // return iterator for beginning of mutable sequence
  1895. ; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
  1896. ; 1576 : }
  1897. ; 1577 :
  1898. ; 1578 : const_iterator begin() const _NOEXCEPT
  1899. ; 1579 : { // return iterator for beginning of nonmutable sequence
  1900. ; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
  1901. ; 1581 : }
  1902. ; 1582 :
  1903. ; 1583 : iterator end() _NOEXCEPT
  1904. ; 1584 : { // return iterator for end of mutable sequence
  1905. ; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
  1906. ; 1586 : }
  1907. ; 1587 :
  1908. ; 1588 : const_iterator end() const _NOEXCEPT
  1909. ; 1589 : { // return iterator for end of nonmutable sequence
  1910. ; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
  1911. ; 1591 : }
  1912. ; 1592 :
  1913. ; 1593 : reverse_iterator rbegin() _NOEXCEPT
  1914. ; 1594 : { // return iterator for beginning of reversed mutable sequence
  1915. ; 1595 : return (reverse_iterator(end()));
  1916. ; 1596 : }
  1917. ; 1597 :
  1918. ; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
  1919. ; 1599 : { // return iterator for beginning of reversed nonmutable sequence
  1920. ; 1600 : return (const_reverse_iterator(end()));
  1921. ; 1601 : }
  1922. ; 1602 :
  1923. ; 1603 : reverse_iterator rend() _NOEXCEPT
  1924. ; 1604 : { // return iterator for end of reversed mutable sequence
  1925. ; 1605 : return (reverse_iterator(begin()));
  1926. ; 1606 : }
  1927. ; 1607 :
  1928. ; 1608 : const_reverse_iterator rend() const _NOEXCEPT
  1929. ; 1609 : { // return iterator for end of reversed nonmutable sequence
  1930. ; 1610 : return (const_reverse_iterator(begin()));
  1931. ; 1611 : }
  1932. ; 1612 :
  1933. ; 1613 : #if _HAS_CPP0X
  1934. ; 1614 : const_iterator cbegin() const _NOEXCEPT
  1935. ; 1615 : { // return iterator for beginning of nonmutable sequence
  1936. ; 1616 : return (((const _Myt *)this)->begin());
  1937. ; 1617 : }
  1938. ; 1618 :
  1939. ; 1619 : const_iterator cend() const _NOEXCEPT
  1940. ; 1620 : { // return iterator for end of nonmutable sequence
  1941. ; 1621 : return (((const _Myt *)this)->end());
  1942. ; 1622 : }
  1943. ; 1623 :
  1944. ; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
  1945. ; 1625 : { // return iterator for beginning of reversed nonmutable sequence
  1946. ; 1626 : return (((const _Myt *)this)->rbegin());
  1947. ; 1627 : }
  1948. ; 1628 :
  1949. ; 1629 : const_reverse_iterator crend() const _NOEXCEPT
  1950. ; 1630 : { // return iterator for end of reversed nonmutable sequence
  1951. ; 1631 : return (((const _Myt *)this)->rend());
  1952. ; 1632 : }
  1953. ; 1633 :
  1954. ; 1634 : void shrink_to_fit()
  1955. ; 1635 : { // reduce capacity
  1956. ; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
  1957. ; 1637 : { // worth shrinking, do it
  1958. ; 1638 : _Myt _Tmp(*this);
  1959. ; 1639 : swap(_Tmp);
  1960. ; 1640 : }
  1961. ; 1641 : }
  1962. ; 1642 : #endif /* _HAS_CPP0X */
  1963. ; 1643 :
  1964. ; 1644 : reference at(size_type _Off)
  1965. ; 1645 : { // subscript mutable sequence with checking
  1966. ; 1646 : if (this->_Mysize <= _Off)
  1967. ; 1647 : _Xran(); // _Off off end
  1968. ; 1648 : return (this->_Myptr()[_Off]);
  1969. ; 1649 : }
  1970. ; 1650 :
  1971. ; 1651 : const_reference at(size_type _Off) const
  1972. ; 1652 : { // subscript nonmutable sequence with checking
  1973. ; 1653 : if (this->_Mysize <= _Off)
  1974. ; 1654 : _Xran(); // _Off off end
  1975. ; 1655 : return (this->_Myptr()[_Off]);
  1976. ; 1656 : }
  1977. ; 1657 :
  1978. ; 1658 : reference operator[](size_type _Off)
  1979. ; 1659 : { // subscript mutable sequence
  1980. ; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
  1981. ; 1661 : if (this->_Mysize < _Off) // sic
  1982. ; 1662 : _DEBUG_ERROR("string subscript out of range");
  1983. ; 1663 :
  1984. ; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
  1985. ; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  1986. ; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  1987. ; 1667 :
  1988. ; 1668 : return (this->_Myptr()[_Off]);
  1989. ; 1669 : }
  1990. ; 1670 :
  1991. ; 1671 : const_reference operator[](size_type _Off) const
  1992. ; 1672 : { // subscript nonmutable sequence
  1993. ; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
  1994. ; 1674 : if (this->_Mysize < _Off) // sic
  1995. ; 1675 : _DEBUG_ERROR("string subscript out of range");
  1996. ; 1676 :
  1997. ; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
  1998. ; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  1999. ; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2000. ; 1680 :
  2001. ; 1681 : return (this->_Myptr()[_Off]);
  2002. ; 1682 : }
  2003. ; 1683 :
  2004. ; 1684 : void push_back(_Elem _Ch)
  2005. ; 1685 : { // insert element at end
  2006. ; 1686 : insert(end(), _Ch);
  2007. ; 1687 : }
  2008. ; 1688 :
  2009. ; 1689 : #if _HAS_CPP0X
  2010. ; 1690 : void pop_back()
  2011. ; 1691 : { // erase element at end
  2012. ; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
  2013. ; 1693 : }
  2014. ; 1694 :
  2015. ; 1695 : reference front()
  2016. ; 1696 : { // return first element of mutable sequence
  2017. ; 1697 : return (*begin());
  2018. ; 1698 : }
  2019. ; 1699 :
  2020. ; 1700 : const_reference front() const
  2021. ; 1701 : { // return first element of nonmutable sequence
  2022. ; 1702 : return (*begin());
  2023. ; 1703 : }
  2024. ; 1704 :
  2025. ; 1705 : reference back()
  2026. ; 1706 : { // return last element of mutable sequence
  2027. ; 1707 : return (*(end() - 1));
  2028. ; 1708 : }
  2029. ; 1709 :
  2030. ; 1710 : const_reference back() const
  2031. ; 1711 : { // return last element of nonmutable sequence
  2032. ; 1712 : return (*(end() - 1));
  2033. ; 1713 : }
  2034. ; 1714 : #endif /* _HAS_CPP0X */
  2035. ; 1715 :
  2036. ; 1716 : const _Elem *c_str() const _NOEXCEPT
  2037. ; 1717 : { // return pointer to null-terminated nonmutable array
  2038. ; 1718 : return (this->_Myptr());
  2039. ; 1719 : }
  2040. ; 1720 :
  2041. ; 1721 : const _Elem *data() const _NOEXCEPT
  2042. ; 1722 : { // return pointer to nonmutable array
  2043. ; 1723 : return (c_str());
  2044. ; 1724 : }
  2045. ; 1725 :
  2046. ; 1726 : size_type length() const _NOEXCEPT
  2047. ; 1727 : { // return length of sequence
  2048. ; 1728 : return (this->_Mysize);
  2049. ; 1729 : }
  2050. ; 1730 :
  2051. ; 1731 : size_type size() const _NOEXCEPT
  2052. ; 1732 : { // return length of sequence
  2053. ; 1733 : return (this->_Mysize);
  2054. ; 1734 : }
  2055. ; 1735 :
  2056. ; 1736 : size_type max_size() const _NOEXCEPT
  2057. ; 1737 : { // return maximum possible length of sequence
  2058. ; 1738 : size_type _Num = this->_Getal().max_size();
  2059. ; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
  2060. ; 1740 : }
  2061. ; 1741 :
  2062. ; 1742 : void resize(size_type _Newsize)
  2063. ; 1743 : { // determine new length, padding with null elements as needed
  2064. ; 1744 : resize(_Newsize, _Elem());
  2065. ; 1745 : }
  2066. ; 1746 :
  2067. ; 1747 : void resize(size_type _Newsize, _Elem _Ch)
  2068. ; 1748 : { // determine new length, padding with _Ch elements as needed
  2069. ; 1749 : if (_Newsize <= this->_Mysize)
  2070. ; 1750 : _Eos(_Newsize);
  2071. ; 1751 : else
  2072. ; 1752 : append(_Newsize - this->_Mysize, _Ch);
  2073. ; 1753 : }
  2074. ; 1754 :
  2075. ; 1755 : size_type capacity() const _NOEXCEPT
  2076. ; 1756 : { // return current length of allocated storage
  2077. ; 1757 : return (this->_Myres);
  2078. ; 1758 : }
  2079. ; 1759 :
  2080. ; 1760 : void reserve(size_type _Newcap = 0)
  2081. ; 1761 : { // determine new minimum length of allocated storage
  2082. ; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
  2083. ; 1763 : { // change reservation
  2084. ; 1764 : size_type _Size = this->_Mysize;
  2085. ; 1765 : if (_Grow(_Newcap, true))
  2086. ; 1766 : _Eos(_Size);
  2087. ; 1767 : }
  2088. ; 1768 : }
  2089. ; 1769 :
  2090. ; 1770 : bool empty() const _NOEXCEPT
  2091. ; 1771 : { // test if sequence is empty
  2092. ; 1772 : return (this->_Mysize == 0);
  2093. ; 1773 : }
  2094. ; 1774 :
  2095. ; 1775 : _SCL_INSECURE_DEPRECATE
  2096. ; 1776 :
  2097. ; 1777 : size_type copy(_Elem *_Ptr,
  2098. ; 1778 : size_type _Count, size_type _Off = 0) const
  2099. ; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
  2100. ; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
  2101. ; 1781 : if (_Count != 0)
  2102. ; 1782 : _DEBUG_POINTER(_Ptr);
  2103. ; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2104. ; 1784 :
  2105. ; 1785 : if (this->_Mysize < _Off)
  2106. ; 1786 : _Xran(); // _Off off end
  2107. ; 1787 : if (this->_Mysize - _Off < _Count)
  2108. ; 1788 : _Count = this->_Mysize - _Off;
  2109. ; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
  2110. ; 1790 : return (_Count);
  2111. ; 1791 : }
  2112. ; 1792 :
  2113. ; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
  2114. ; 1794 : size_type _Count, size_type _Off = 0) const
  2115. ; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
  2116. ; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
  2117. ; 1797 : if (_Count != 0)
  2118. ; 1798 : _DEBUG_POINTER(_Dest);
  2119. ; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2120. ; 1800 :
  2121. ; 1801 : if (this->_Mysize < _Off)
  2122. ; 1802 : _Xran(); // _Off off end
  2123. ; 1803 : if (this->_Mysize - _Off < _Count)
  2124. ; 1804 : _Count = this->_Mysize - _Off;
  2125. ; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
  2126. ; 1806 : return (_Count);
  2127. ; 1807 : }
  2128. ; 1808 :
  2129. ; 1809 : void _Swap_bx(_Myt& _Right)
  2130. ; 1810 : { // exchange _Bx with _Right._Bx
  2131. ; 1811 : if (this->_BUF_SIZE <= this->_Myres)
  2132. ; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
  2133. ; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
  2134. ; 1814 : else
  2135. ; 1815 : { // swap large with small
  2136. ; 1816 : pointer _Ptr = this->_Bx._Ptr;
  2137. ; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
  2138. ; 1818 : _Traits::copy(this->_Bx._Buf,
  2139. ; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
  2140. ; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
  2141. ; 1821 : }
  2142. ; 1822 : else
  2143. ; 1823 : if (_Right._Myres < this->_BUF_SIZE)
  2144. ; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
  2145. ; 1825 : else
  2146. ; 1826 : { // swap small with large
  2147. ; 1827 : pointer _Ptr = _Right._Bx._Ptr;
  2148. ; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
  2149. ; 1829 : _Traits::copy(_Right._Bx._Buf,
  2150. ; 1830 : this->_Bx._Buf, this->_Mysize + 1);
  2151. ; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  2152. ; 1832 : }
  2153. ; 1833 : }
  2154. ; 1834 :
  2155. ; 1835 : void swap(_Myt& _Right)
  2156. ; 1836 : { // exchange contents with _Right
  2157. ; 1837 : if (this == &_Right)
  2158. ; 1838 : ; // same object, do nothing
  2159. ; 1839 : else if (this->_Getal() == _Right._Getal())
  2160. ; 1840 : { // same allocator, swap control information
  2161. ; 1841 : this->_Swap_all(_Right);
  2162. ; 1842 : _Swap_bx(_Right);
  2163. ; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
  2164. ; 1844 : _STD swap(this->_Myres, _Right._Myres);
  2165. ; 1845 : }
  2166. ; 1846 :
  2167. ; 1847 : #if _HAS_CPP0X
  2168. ; 1848 : else if (_Alty::propagate_on_container_swap::value)
  2169. ; 1849 : { // swap allocators and control information
  2170. ; 1850 : this->_Swap_alloc(_Right);
  2171. ; 1851 : _Swap_bx(_Right);
  2172. ; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
  2173. ; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
  2174. ; 1854 : _STD swap(this->_Myres, _Right._Myres);
  2175. ; 1855 : }
  2176. ; 1856 : #endif /* _HAS_CPP0X */
  2177. ; 1857 :
  2178. ; 1858 : else
  2179. ; 1859 : { // different allocator, do multiple assigns
  2180. ; 1860 : _Myt _Tmp = *this;
  2181. ; 1861 :
  2182. ; 1862 : *this = _Right;
  2183. ; 1863 : _Right = _Tmp;
  2184. ; 1864 : }
  2185. ; 1865 : }
  2186. ; 1866 :
  2187. ; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
  2188. ; 1868 : { // look for _Right beginning at or after _Off
  2189. ; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
  2190. ; 1870 : }
  2191. ; 1871 :
  2192. ; 1872 : size_type find(const _Elem *_Ptr,
  2193. ; 1873 : size_type _Off, size_type _Count) const
  2194. ; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
  2195. ; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
  2196. ; 1876 : if (_Count != 0)
  2197. ; 1877 : _DEBUG_POINTER(_Ptr);
  2198. ; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2199. ; 1879 :
  2200. ; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
  2201. ; 1881 : return (_Off); // null string always matches (if inside string)
  2202. ; 1882 :
  2203. ; 1883 : size_type _Nm;
  2204. ; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
  2205. ; 1885 : { // room for match, look for it
  2206. ; 1886 : const _Elem *_Uptr, *_Vptr;
  2207. ; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
  2208. ; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
  2209. ; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
  2210. ; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
  2211. ; 1891 : return (_Uptr - this->_Myptr()); // found a match
  2212. ; 1892 : }
  2213. ; 1893 :
  2214. ; 1894 : return (npos); // no match
  2215. ; 1895 : }
  2216. ; 1896 :
  2217. ; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
  2218. ; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
  2219. ; 1899 : _DEBUG_POINTER(_Ptr);
  2220. ; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
  2221. ; 1901 : }
  2222. ; 1902 :
  2223. ; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
  2224. ; 1904 : { // look for _Ch at or after _Off
  2225. ; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
  2226. ; 1906 : }
  2227. ; 1907 :
  2228. ; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
  2229. ; 1909 : { // look for _Right beginning before _Off
  2230. ; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
  2231. ; 1911 : }
  2232. ; 1912 :
  2233. ; 1913 : size_type rfind(const _Elem *_Ptr,
  2234. ; 1914 : size_type _Off, size_type _Count) const
  2235. ; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
  2236. ; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
  2237. ; 1917 : if (_Count != 0)
  2238. ; 1918 : _DEBUG_POINTER(_Ptr);
  2239. ; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2240. ; 1920 :
  2241. ; 1921 : if (_Count == 0)
  2242. ; 1922 : return (_Off < this->_Mysize ? _Off
  2243. ; 1923 : : this->_Mysize); // null always matches
  2244. ; 1924 : if (_Count <= this->_Mysize)
  2245. ; 1925 : { // room for match, look for it
  2246. ; 1926 : const _Elem *_Uptr = this->_Myptr() +
  2247. ; 1927 : (_Off < this->_Mysize - _Count ? _Off
  2248. ; 1928 : : this->_Mysize - _Count);
  2249. ; 1929 : for (; ; --_Uptr)
  2250. ; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
  2251. ; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
  2252. ; 1932 : return (_Uptr - this->_Myptr()); // found a match
  2253. ; 1933 : else if (_Uptr == this->_Myptr())
  2254. ; 1934 : break; // at beginning, no more chance for match
  2255. ; 1935 : }
  2256. ; 1936 :
  2257. ; 1937 : return (npos); // no match
  2258. ; 1938 : }
  2259. ; 1939 :
  2260. ; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
  2261. ; 1941 : { // look for [_Ptr, <null>) beginning before _Off
  2262. ; 1942 : _DEBUG_POINTER(_Ptr);
  2263. ; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
  2264. ; 1944 : }
  2265. ; 1945 :
  2266. ; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
  2267. ; 1947 : { // look for _Ch before _Off
  2268. ; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  2269. ; 1949 : }
  2270. ; 1950 :
  2271. ; 1951 : size_type find_first_of(const _Myt& _Right,
  2272. ; 1952 : size_type _Off = 0) const _NOEXCEPT
  2273. ; 1953 : { // look for one of _Right at or after _Off
  2274. ; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
  2275. ; 1955 : }
  2276. ; 1956 :
  2277. ; 1957 : size_type find_first_of(const _Elem *_Ptr,
  2278. ; 1958 : size_type _Off, size_type _Count) const
  2279. ; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
  2280. ; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
  2281. ; 1961 : if (_Count != 0)
  2282. ; 1962 : _DEBUG_POINTER(_Ptr);
  2283. ; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2284. ; 1964 :
  2285. ; 1965 : if (0 < _Count && _Off < this->_Mysize)
  2286. ; 1966 : { // room for match, look for it
  2287. ; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  2288. ; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  2289. ; 1969 : _Uptr < _Vptr; ++_Uptr)
  2290. ; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  2291. ; 1971 : return (_Uptr - this->_Myptr()); // found a match
  2292. ; 1972 : }
  2293. ; 1973 :
  2294. ; 1974 : return (npos); // no match
  2295. ; 1975 : }
  2296. ; 1976 :
  2297. ; 1977 : size_type find_first_of(const _Elem *_Ptr,
  2298. ; 1978 : size_type _Off = 0) const
  2299. ; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
  2300. ; 1980 : _DEBUG_POINTER(_Ptr);
  2301. ; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
  2302. ; 1982 : }
  2303. ; 1983 :
  2304. ; 1984 : size_type find_first_of(_Elem _Ch,
  2305. ; 1985 : size_type _Off = 0) const
  2306. ; 1986 : { // look for _Ch at or after _Off
  2307. ; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
  2308. ; 1988 : }
  2309. ; 1989 :
  2310. ; 1990 : size_type find_last_of(const _Myt& _Right,
  2311. ; 1991 : size_type _Off = npos) const _NOEXCEPT
  2312. ; 1992 : { // look for one of _Right before _Off
  2313. ; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
  2314. ; 1994 : }
  2315. ; 1995 :
  2316. ; 1996 : size_type find_last_of(const _Elem *_Ptr,
  2317. ; 1997 : size_type _Off, size_type _Count) const
  2318. ; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
  2319. ; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
  2320. ; 2000 : if (_Count != 0)
  2321. ; 2001 : _DEBUG_POINTER(_Ptr);
  2322. ; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2323. ; 2003 :
  2324. ; 2004 : if (0 < _Count && 0 < this->_Mysize)
  2325. ; 2005 : { // worth searching, do it
  2326. ; 2006 : const _Elem *_Uptr = this->_Myptr()
  2327. ; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  2328. ; 2008 : for (; ; --_Uptr)
  2329. ; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  2330. ; 2010 : return (_Uptr - this->_Myptr()); // found a match
  2331. ; 2011 : else if (_Uptr == this->_Myptr())
  2332. ; 2012 : break; // at beginning, no more chance for match
  2333. ; 2013 : }
  2334. ; 2014 :
  2335. ; 2015 : return (npos); // no match
  2336. ; 2016 : }
  2337. ; 2017 :
  2338. ; 2018 : size_type find_last_of(const _Elem *_Ptr,
  2339. ; 2019 : size_type _Off = npos) const
  2340. ; 2020 : { // look for one of [_Ptr, <null>) before _Off
  2341. ; 2021 : _DEBUG_POINTER(_Ptr);
  2342. ; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
  2343. ; 2023 : }
  2344. ; 2024 :
  2345. ; 2025 : size_type find_last_of(_Elem _Ch,
  2346. ; 2026 : size_type _Off = npos) const
  2347. ; 2027 : { // look for _Ch before _Off
  2348. ; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  2349. ; 2029 : }
  2350. ; 2030 :
  2351. ; 2031 : size_type find_first_not_of(const _Myt& _Right,
  2352. ; 2032 : size_type _Off = 0) const _NOEXCEPT
  2353. ; 2033 : { // look for none of _Right at or after _Off
  2354. ; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
  2355. ; 2035 : _Right.size()));
  2356. ; 2036 : }
  2357. ; 2037 :
  2358. ; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
  2359. ; 2039 : size_type _Off, size_type _Count) const
  2360. ; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
  2361. ; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
  2362. ; 2042 : if (_Count != 0)
  2363. ; 2043 : _DEBUG_POINTER(_Ptr);
  2364. ; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2365. ; 2045 :
  2366. ; 2046 : if (_Off < this->_Mysize)
  2367. ; 2047 : { // room for match, look for it
  2368. ; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  2369. ; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  2370. ; 2050 : _Uptr < _Vptr; ++_Uptr)
  2371. ; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  2372. ; 2052 : return (_Uptr - this->_Myptr());
  2373. ; 2053 : }
  2374. ; 2054 : return (npos);
  2375. ; 2055 : }
  2376. ; 2056 :
  2377. ; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
  2378. ; 2058 : size_type _Off = 0) const
  2379. ; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
  2380. ; 2060 : _DEBUG_POINTER(_Ptr);
  2381. ; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  2382. ; 2062 : }
  2383. ; 2063 :
  2384. ; 2064 : size_type find_first_not_of(_Elem _Ch,
  2385. ; 2065 : size_type _Off = 0) const
  2386. ; 2066 : { // look for non _Ch at or after _Off
  2387. ; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
  2388. ; 2068 : }
  2389. ; 2069 :
  2390. ; 2070 : size_type find_last_not_of(const _Myt& _Right,
  2391. ; 2071 : size_type _Off = npos) const _NOEXCEPT
  2392. ; 2072 : { // look for none of _Right before _Off
  2393. ; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
  2394. ; 2074 : }
  2395. ; 2075 :
  2396. ; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
  2397. ; 2077 : size_type _Off, size_type _Count) const
  2398. ; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
  2399. ; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
  2400. ; 2080 : if (_Count != 0)
  2401. ; 2081 : _DEBUG_POINTER(_Ptr);
  2402. ; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2403. ; 2083 :
  2404. ; 2084 : if (0 < this->_Mysize)
  2405. ; 2085 : { // worth searching, do it
  2406. ; 2086 : const _Elem *_Uptr = this->_Myptr()
  2407. ; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  2408. ; 2088 : for (; ; --_Uptr)
  2409. ; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  2410. ; 2090 : return (_Uptr - this->_Myptr());
  2411. ; 2091 : else if (_Uptr == this->_Myptr())
  2412. ; 2092 : break;
  2413. ; 2093 : }
  2414. ; 2094 : return (npos);
  2415. ; 2095 : }
  2416. ; 2096 :
  2417. ; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
  2418. ; 2098 : size_type _Off = npos) const
  2419. ; 2099 : { // look for none of [_Ptr, <null>) before _Off
  2420. ; 2100 : _DEBUG_POINTER(_Ptr);
  2421. ; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  2422. ; 2102 : }
  2423. ; 2103 :
  2424. ; 2104 : size_type find_last_not_of(_Elem _Ch,
  2425. ; 2105 : size_type _Off = npos) const
  2426. ; 2106 : { // look for non _Ch before _Off
  2427. ; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
  2428. ; 2108 : }
  2429. ; 2109 :
  2430. ; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
  2431. ; 2111 : { // return [_Off, _Off + _Count) as new string
  2432. ; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
  2433. ; 2113 : }
  2434. ; 2114 :
  2435. ; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
  2436. ; 2116 : { // compare [0, _Mysize) with _Right
  2437. ; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
  2438. ; 2118 : }
  2439. ; 2119 :
  2440. ; 2120 : int compare(size_type _Off, size_type _N0,
  2441. ; 2121 : const _Myt& _Right) const
  2442. ; 2122 : { // compare [_Off, _Off + _N0) with _Right
  2443. ; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
  2444. ; 2124 : }
  2445. ; 2125 :
  2446. ; 2126 : int compare(size_type _Off,
  2447. ; 2127 : size_type _N0, const _Myt& _Right,
  2448. ; 2128 : size_type _Roff, size_type _Count) const
  2449. ; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  2450. ; 2130 : if (_Right.size() < _Roff)
  2451. ; 2131 : _Xran(); // _Off off end
  2452. ; 2132 : if (_Right._Mysize - _Roff < _Count)
  2453. ; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
  2454. ; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
  2455. ; 2135 : }
  2456. ; 2136 :
  2457. ; 2137 : int compare(const _Elem *_Ptr) const
  2458. ; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
  2459. ; 2139 : _DEBUG_POINTER(_Ptr);
  2460. ; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
  2461. ; 2141 : }
  2462. ; 2142 :
  2463. ; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
  2464. ; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
  2465. ; 2145 : _DEBUG_POINTER(_Ptr);
  2466. ; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  2467. ; 2147 : }
  2468. ; 2148 :
  2469. ; 2149 : int compare(size_type _Off,
  2470. ; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
  2471. ; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  2472. ; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
  2473. ; 2153 : if (_Count != 0)
  2474. ; 2154 : _DEBUG_POINTER(_Ptr);
  2475. ; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2476. ; 2156 :
  2477. ; 2157 : if (this->_Mysize < _Off)
  2478. ; 2158 : _Xran(); // _Off off end
  2479. ; 2159 : if (this->_Mysize - _Off < _N0)
  2480. ; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  2481. ; 2161 :
  2482. ; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
  2483. ; 2163 : _N0 < _Count ? _N0 : _Count);
  2484. ; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
  2485. ; 2165 : : _N0 == _Count ? 0 : +1);
  2486. ; 2166 : }
  2487. ; 2167 :
  2488. ; 2168 : allocator_type get_allocator() const _NOEXCEPT
  2489. ; 2169 : { // return allocator object for values
  2490. ; 2170 : return (this->_Getal());
  2491. ; 2171 : }
  2492. ; 2172 :
  2493. ; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
  2494. ; 2174 : { // assign _Count copies of _Ch beginning at _Off
  2495. ; 2175 : if (_Count == 1)
  2496. ; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
  2497. ; 2177 : else
  2498. ; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
  2499. ; 2179 : }
  2500. ; 2180 :
  2501. ; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
  2502. ; 2182 : { // copy _Oldlen elements to newly allocated buffer
  2503. ; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
  2504. ; 2184 : if (max_size() < _Newres)
  2505. ; 2185 : _Newres = _Newsize; // undo roundup if too big
  2506. ; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
  2507. ; 2187 : ;
  2508. ; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
  2509. ; 2189 : _Newres = this->_Myres
  2510. ; 2190 : + this->_Myres / 2; // grow exponentially if possible
  2511. ; 2191 : else
  2512. ; 2192 : _Newres = max_size(); // settle for max_size()
  2513. ; 2193 :
  2514. ; 2194 : _Elem *_Ptr;
  2515. ; 2195 : _TRY_BEGIN
  2516. ; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
  2517. ; 2197 : _CATCH_ALL
  2518. ; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
  2519. ; 2199 : _TRY_BEGIN
  2520. ; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
  2521. ; 2201 : _CATCH_ALL
  2522. ; 2202 : _Tidy(true); // failed again, discard storage and reraise
  2523. ; 2203 : _RERAISE;
  2524. ; 2204 : _CATCH_END
  2525. ; 2205 : _CATCH_END
  2526. ; 2206 :
  2527. ; 2207 : if (0 < _Oldlen)
  2528. ; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
  2529. ; 2209 : _Oldlen); // copy existing elements
  2530. ; 2210 : _Tidy(true);
  2531. ; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  2532. ; 2212 : this->_Myres = _Newres;
  2533. ; 2213 : _Eos(_Oldlen);
  2534. ; 2214 : }
  2535. ; 2215 :
  2536. ; 2216 : void _Eos(size_type _Newsize)
  2537. ; 2217 : { // set new length and null terminator
  2538. ; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
  2539.  
  2540. mov DWORD PTR [esi+16], 0
  2541. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  2542.  
  2543. ; 564 : _Left = _Right;
  2544.  
  2545. mov BYTE PTR [esi], 0
  2546.  
  2547. ; 523 : : _CSTD strlen(_First));
  2548.  
  2549. cmp BYTE PTR [edx], 0
  2550. jne SHORT $LN47@message
  2551. xor ecx, ecx
  2552. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  2553.  
  2554. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  2555.  
  2556. push ecx
  2557. push edx
  2558. mov ecx, esi
  2559. 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
  2560. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2561.  
  2562. ; 592 : return (string(_Name != 0 ? _Name : "unknown error"));
  2563.  
  2564. mov eax, esi
  2565. pop esi
  2566.  
  2567. ; 593 : }
  2568.  
  2569. mov esp, ebp
  2570. pop ebp
  2571. ret 8
  2572. $LN47@message:
  2573. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  2574.  
  2575. ; 523 : : _CSTD strlen(_First));
  2576.  
  2577. mov ecx, edx
  2578. push edi
  2579. lea edi, DWORD PTR [ecx+1]
  2580. $LL49@message:
  2581. mov al, BYTE PTR [ecx]
  2582. inc ecx
  2583. test al, al
  2584. jne SHORT $LL49@message
  2585. sub ecx, edi
  2586. pop edi
  2587. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  2588.  
  2589. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  2590.  
  2591. push ecx
  2592. push edx
  2593. mov ecx, esi
  2594. 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
  2595. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2596.  
  2597. ; 592 : return (string(_Name != 0 ? _Name : "unknown error"));
  2598.  
  2599. mov eax, esi
  2600. pop esi
  2601.  
  2602. ; 593 : }
  2603.  
  2604. mov esp, ebp
  2605. pop ebp
  2606. ret 8
  2607. ?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
  2608. _TEXT ENDS
  2609. ; Function compile flags: /Ogtp
  2610. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2611. ; COMDAT ??_G_Generic_error_category@std@@UAEPAXI@Z
  2612. _TEXT SEGMENT
  2613. ___flags$ = 8 ; size = 4
  2614. ??_G_Generic_error_category@std@@UAEPAXI@Z PROC ; std::_Generic_error_category::`scalar deleting destructor', COMDAT
  2615. ; _this$ = ecx
  2616. push ebp
  2617. mov ebp, esp
  2618. test BYTE PTR ___flags$[ebp], 1
  2619. push esi
  2620. mov esi, ecx
  2621.  
  2622. ; 167 : { // destroy the object
  2623.  
  2624. mov DWORD PTR [esi], OFFSET ??_7error_category@std@@6B@
  2625. je SHORT $LN8@scalar
  2626. push esi
  2627. call DWORD PTR __imp_??3@YAXPAX@Z
  2628. add esp, 4
  2629. $LN8@scalar:
  2630. mov eax, esi
  2631. pop esi
  2632. pop ebp
  2633. ret 4
  2634. ??_G_Generic_error_category@std@@UAEPAXI@Z ENDP ; std::_Generic_error_category::`scalar deleting destructor'
  2635. _TEXT ENDS
  2636. ; Function compile flags: /Ogtp
  2637. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2638. ; COMDAT ??1_Generic_error_category@std@@UAE@XZ
  2639. _TEXT SEGMENT
  2640. ??1_Generic_error_category@std@@UAE@XZ PROC ; std::_Generic_error_category::~_Generic_error_category, COMDAT
  2641. ; _this$ = ecx
  2642.  
  2643. ; 167 : { // destroy the object
  2644.  
  2645. mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
  2646. ret 0
  2647. ??1_Generic_error_category@std@@UAE@XZ ENDP ; std::_Generic_error_category::~_Generic_error_category
  2648. _TEXT ENDS
  2649. ; Function compile flags: /Ogtp
  2650. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2651. ; COMDAT ??0_Iostream_error_category@std@@QAE@XZ
  2652. _TEXT SEGMENT
  2653. ??0_Iostream_error_category@std@@QAE@XZ PROC ; std::_Iostream_error_category::_Iostream_error_category, COMDAT
  2654. ; _this$dead$ = ecx
  2655.  
  2656. ; 601 : _Iostream_error_category()
  2657.  
  2658. 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
  2659.  
  2660. ; 602 : { // default constructor
  2661. ; 603 : }
  2662.  
  2663. mov eax, OFFSET ?_Iostream_object@?$_Error_objects@H@std@@2V_Iostream_error_category@2@A ; std::_Error_objects<int>::_Iostream_object
  2664. ret 0
  2665. ??0_Iostream_error_category@std@@QAE@XZ ENDP ; std::_Iostream_error_category::_Iostream_error_category
  2666. _TEXT ENDS
  2667. ; Function compile flags: /Ogtp
  2668. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2669. ; COMDAT ?name@_Iostream_error_category@std@@UBEPBDXZ
  2670. _TEXT SEGMENT
  2671. ?name@_Iostream_error_category@std@@UBEPBDXZ PROC ; std::_Iostream_error_category::name, COMDAT
  2672. ; _this$ = ecx
  2673.  
  2674. ; 607 : return ("iostream");
  2675.  
  2676. mov eax, OFFSET ??_C@_08LLGCOLLL@iostream?$AA@
  2677.  
  2678. ; 608 : }
  2679.  
  2680. ret 0
  2681. ?name@_Iostream_error_category@std@@UBEPBDXZ ENDP ; std::_Iostream_error_category::name
  2682. _TEXT ENDS
  2683. ; Function compile flags: /Ogtp
  2684. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2685. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  2686. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2687. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  2688. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  2689. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  2690. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2691. ; COMDAT ?message@_Iostream_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
  2692. _TEXT SEGMENT
  2693. $T1 = -4 ; size = 4
  2694. ___$ReturnUdt$ = 8 ; size = 4
  2695. __Errcode$ = 12 ; size = 4
  2696. ?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
  2697. ; _this$ = ecx
  2698.  
  2699. ; 611 : { // convert to name of error
  2700.  
  2701. push ebp
  2702. mov ebp, esp
  2703. push ecx
  2704.  
  2705. ; 612 : if (_Errcode == (int)io_errc::stream)
  2706.  
  2707. mov eax, DWORD PTR __Errcode$[ebp]
  2708. push esi
  2709. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  2710.  
  2711. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  2712.  
  2713. mov esi, DWORD PTR ___$ReturnUdt$[ebp]
  2714. mov DWORD PTR $T1[ebp], 0
  2715. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  2716.  
  2717. ; 612 : if (_Errcode == (int)io_errc::stream)
  2718.  
  2719. cmp eax, 1
  2720. jne SHORT $LN2@message
  2721. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  2722.  
  2723. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  2724.  
  2725. push 21 ; 00000015H
  2726.  
  2727. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  2728.  
  2729. mov DWORD PTR [esi+20], 15 ; 0000000fH
  2730.  
  2731. ; 1145 : }
  2732. ; 1146 :
  2733. ; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
  2734. ; 1148 : { // assign _Count * _Ch
  2735. ; 1149 : if (_Count == npos)
  2736. ; 1150 : _Xlen(); // result too long
  2737. ; 1151 :
  2738. ; 1152 : if (_Grow(_Count))
  2739. ; 1153 : { // make room and assign new stuff
  2740. ; 1154 : _Chassign(0, _Count, _Ch);
  2741. ; 1155 : _Eos(_Count);
  2742. ; 1156 : }
  2743. ; 1157 : return (*this);
  2744. ; 1158 : }
  2745. ; 1159 :
  2746. ; 1160 : template<class _Iter>
  2747. ; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
  2748. ; 1162 : _Myt&>::type
  2749. ; 1163 : assign(_Iter _First, _Iter _Last)
  2750. ; 1164 : { // assign [First, _Last), input iterators
  2751. ; 1165 : return (replace(begin(), end(), _First, _Last));
  2752. ; 1166 : }
  2753. ; 1167 :
  2754. ; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
  2755. ; 1169 : { // assign [First, _Last), const pointers
  2756. ; 1170 : return (replace(begin(), end(), _First, _Last));
  2757. ; 1171 : }
  2758. ; 1172 :
  2759. ; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
  2760. ; 1174 : { // assign [First, _Last), const_iterators
  2761. ; 1175 : return (replace(begin(), end(), _First, _Last));
  2762. ; 1176 : }
  2763. ; 1177 :
  2764. ; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
  2765. ; 1179 : { // insert _Right at _Off
  2766. ; 1180 : return (insert(_Off, _Right, 0, npos));
  2767. ; 1181 : }
  2768. ; 1182 :
  2769. ; 1183 : _Myt& insert(size_type _Off,
  2770. ; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
  2771. ; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
  2772. ; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  2773. ; 1187 : _Xran(); // _Off or _Roff off end
  2774. ; 1188 : size_type _Num = _Right.size() - _Roff;
  2775. ; 1189 : if (_Num < _Count)
  2776. ; 1190 : _Count = _Num; // trim _Count to size
  2777. ; 1191 : if (npos - this->_Mysize <= _Count)
  2778. ; 1192 : _Xlen(); // result too long
  2779. ; 1193 :
  2780. ; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  2781. ; 1195 : { // make room and insert new stuff
  2782. ; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
  2783. ; 1197 : this->_Myptr() + _Off,
  2784. ; 1198 : this->_Mysize - _Off); // empty out hole
  2785. ; 1199 : if (this == &_Right)
  2786. ; 1200 : _Traits::move(this->_Myptr() + _Off,
  2787. ; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
  2788. ; 1202 : _Count); // substring
  2789. ; 1203 : else
  2790. ; 1204 : _Traits::copy(this->_Myptr() + _Off,
  2791. ; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
  2792. ; 1206 : _Eos(_Num);
  2793. ; 1207 : }
  2794. ; 1208 : return (*this);
  2795. ; 1209 : }
  2796. ; 1210 :
  2797. ; 1211 : _Myt& insert(size_type _Off,
  2798. ; 1212 : const _Elem *_Ptr, size_type _Count)
  2799. ; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
  2800. ; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
  2801. ; 1215 : if (_Count != 0)
  2802. ; 1216 : _DEBUG_POINTER(_Ptr);
  2803. ; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  2804. ; 1218 :
  2805. ; 1219 : if (_Inside(_Ptr))
  2806. ; 1220 : return (insert(_Off, *this,
  2807. ; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
  2808. ; 1222 : if (this->_Mysize < _Off)
  2809. ; 1223 : _Xran(); // _Off off end
  2810. ; 1224 : if (npos - this->_Mysize <= _Count)
  2811. ; 1225 : _Xlen(); // result too long
  2812. ; 1226 : size_type _Num;
  2813. ; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  2814. ; 1228 : { // make room and insert new stuff
  2815. ; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
  2816. ; 1230 : this->_Myptr() + _Off,
  2817. ; 1231 : this->_Mysize - _Off); // empty out hole
  2818. ; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  2819. ; 1233 : _Eos(_Num);
  2820. ; 1234 : }
  2821. ; 1235 : return (*this);
  2822. ; 1236 : }
  2823. ; 1237 :
  2824. ; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
  2825. ; 1239 : { // insert [_Ptr, <null>) at _Off
  2826. ; 1240 : _DEBUG_POINTER(_Ptr);
  2827. ; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
  2828. ; 1242 : }
  2829. ; 1243 :
  2830. ; 1244 : _Myt& insert(size_type _Off,
  2831. ; 1245 : size_type _Count, _Elem _Ch)
  2832. ; 1246 : { // insert _Count * _Ch at _Off
  2833. ; 1247 : if (this->_Mysize < _Off)
  2834. ; 1248 : _Xran(); // _Off off end
  2835. ; 1249 : if (npos - this->_Mysize <= _Count)
  2836. ; 1250 : _Xlen(); // result too long
  2837. ; 1251 : size_type _Num;
  2838. ; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  2839. ; 1253 : { // make room and insert new stuff
  2840. ; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
  2841. ; 1255 : this->_Myptr() + _Off,
  2842. ; 1256 : this->_Mysize - _Off); // empty out hole
  2843. ; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
  2844. ; 1258 : _Eos(_Num);
  2845. ; 1259 : }
  2846. ; 1260 : return (*this);
  2847. ; 1261 : }
  2848. ; 1262 :
  2849. ; 1263 : iterator insert(const_iterator _Where)
  2850. ; 1264 : { // insert <null> at _Where
  2851. ; 1265 : return (insert(_Where, _Elem()));
  2852. ; 1266 : }
  2853. ; 1267 :
  2854. ; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
  2855. ; 1269 : { // insert _Ch at _Where
  2856. ; 1270 : size_type _Off = _Pdif(_Where, begin());
  2857. ; 1271 : insert(_Off, 1, _Ch);
  2858. ; 1272 : return (begin() + _Off);
  2859. ; 1273 : }
  2860. ; 1274 :
  2861. ; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
  2862. ; 1276 : { // insert _Count * _Elem at _Where
  2863. ; 1277 : size_type _Off = _Pdif(_Where, begin());
  2864. ; 1278 : insert(_Off, _Count, _Ch);
  2865. ; 1279 : return (begin() + _Off);
  2866. ; 1280 : }
  2867. ; 1281 :
  2868. ; 1282 : template<class _Iter>
  2869. ; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
  2870. ; 1284 : iterator>::type
  2871. ; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  2872. ; 1286 : { // insert [_First, _Last) at _Where, input iterators
  2873. ; 1287 : size_type _Off = _Pdif(_Where, begin());
  2874. ; 1288 : replace(_Where, _Where, _First, _Last);
  2875. ; 1289 : return (begin() + _Off);
  2876. ; 1290 : }
  2877. ; 1291 :
  2878. ; 1292 : iterator insert(const_iterator _Where,
  2879. ; 1293 : const_pointer _First, const_pointer _Last)
  2880. ; 1294 : { // insert [_First, _Last) at _Where, const pointers
  2881. ; 1295 : size_type _Off = _Pdif(_Where, begin());
  2882. ; 1296 : replace(_Where, _Where, _First, _Last);
  2883. ; 1297 : return (begin() + _Off);
  2884. ; 1298 : }
  2885. ; 1299 :
  2886. ; 1300 : iterator insert(const_iterator _Where,
  2887. ; 1301 : const_iterator _First, const_iterator _Last)
  2888. ; 1302 : { // insert [_First, _Last) at _Where, const_iterators
  2889. ; 1303 : size_type _Off = _Pdif(_Where, begin());
  2890. ; 1304 : replace(_Where, _Where, _First, _Last);
  2891. ; 1305 : return (begin() + _Off);
  2892. ; 1306 : }
  2893. ; 1307 :
  2894. ; 1308 : _Myt& erase(size_type _Off = 0)
  2895. ; 1309 : { // erase elements [_Off, ...)
  2896. ; 1310 : if (this->_Mysize < _Off)
  2897. ; 1311 : _Xran(); // _Off off end
  2898. ; 1312 : _Eos(_Off);
  2899. ; 1313 : return (*this);
  2900. ; 1314 : }
  2901. ; 1315 :
  2902. ; 1316 : _Myt& erase(size_type _Off, size_type _Count)
  2903. ; 1317 : { // erase elements [_Off, _Off + _Count)
  2904. ; 1318 : if (this->_Mysize < _Off)
  2905. ; 1319 : _Xran(); // _Off off end
  2906. ; 1320 : if (this->_Mysize - _Off <= _Count)
  2907. ; 1321 : _Eos(_Off); // erase elements [_Off, ...)
  2908. ; 1322 : else if (0 < _Count)
  2909. ; 1323 : { // move elements down
  2910. ; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
  2911. ; 1325 : size_type _Newsize = this->_Mysize - _Count;
  2912. ; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
  2913. ; 1327 : _Eos(_Newsize);
  2914. ; 1328 : }
  2915. ; 1329 : return (*this);
  2916. ; 1330 : }
  2917. ; 1331 :
  2918. ; 1332 : iterator erase(const_iterator _Where)
  2919. ; 1333 : { // erase element at _Where
  2920. ; 1334 : size_type _Count = _Pdif(_Where, begin());
  2921. ; 1335 : erase(_Count, 1);
  2922. ; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  2923. ; 1337 : }
  2924. ; 1338 :
  2925. ; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
  2926. ; 1340 : { // erase substring [_First, _Last)
  2927. ; 1341 : _DEBUG_RANGE(_First, _Last);
  2928. ; 1342 : size_type _Count = _Pdif(_First, begin());
  2929. ; 1343 : erase(_Count, _Pdif(_Last, _First));
  2930. ; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  2931. ; 1345 : }
  2932. ; 1346 :
  2933. ; 1347 : void clear() _NOEXCEPT
  2934. ; 1348 : { // erase all
  2935. ; 1349 : _Eos(0);
  2936. ; 1350 : }
  2937. ; 1351 :
  2938. ; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
  2939. ; 1353 : { // replace [_Off, _Off + _N0) with _Right
  2940. ; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
  2941. ; 1355 : }
  2942. ; 1356 :
  2943. ; 1357 : _Myt& replace(size_type _Off,
  2944. ; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
  2945. ; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  2946. ; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  2947. ; 1361 : _Xran(); // _Off or _Roff off end
  2948. ; 1362 : if (this->_Mysize - _Off < _N0)
  2949. ; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  2950. ; 1364 : size_type _Num = _Right.size() - _Roff;
  2951. ; 1365 : if (_Num < _Count)
  2952. ; 1366 : _Count = _Num; // trim _Count to size
  2953. ; 1367 : if (npos - _Count <= this->_Mysize - _N0)
  2954. ; 1368 : _Xlen(); // result too long
  2955. ; 1369 :
  2956. ; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
  2957. ; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
  2958. ; 1372 : if (this->_Mysize < _Newsize)
  2959. ; 1373 : _Grow(_Newsize);
  2960. ; 1374 :
  2961. ; 1375 : if (this != &_Right)
  2962. ; 1376 : { // no overlap, just move down and copy in new stuff
  2963. ; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
  2964. ; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
  2965. ; 1379 : _Traits::copy(this->_Myptr() + _Off,
  2966. ; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
  2967. ; 1381 : }
  2968. ; 1382 : else if (_Count <= _N0)
  2969. ; 1383 : { // hole doesn't get larger, just copy in substring
  2970. ; 1384 : _Traits::move(this->_Myptr() + _Off,
  2971. ; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
  2972. ; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
  2973. ; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  2974. ; 1388 : }
  2975. ; 1389 : else if (_Roff <= _Off)
  2976. ; 1390 : { // hole gets larger, substring begins before hole
  2977. ; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
  2978. ; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  2979. ; 1393 : _Traits::move(this->_Myptr() + _Off,
  2980. ; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
  2981. ; 1395 : }
  2982. ; 1396 : else if (_Off + _N0 <= _Roff)
  2983. ; 1397 : { // hole gets larger, substring begins after hole
  2984. ; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
  2985. ; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  2986. ; 1400 : _Traits::move(this->_Myptr() + _Off,
  2987. ; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
  2988. ; 1402 : _Count); // fill hole
  2989. ; 1403 : }
  2990. ; 1404 : else
  2991. ; 1405 : { // hole gets larger, substring begins in hole
  2992. ; 1406 : _Traits::move(this->_Myptr() + _Off,
  2993. ; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
  2994. ; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
  2995. ; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  2996. ; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
  2997. ; 1411 : this->_Myptr() + _Roff + _Count,
  2998. ; 1412 : _Count - _N0); // fill rest of new hole
  2999. ; 1413 : }
  3000. ; 1414 :
  3001. ; 1415 : _Eos(_Newsize);
  3002. ; 1416 : return (*this);
  3003. ; 1417 : }
  3004. ; 1418 :
  3005. ; 1419 : _Myt& replace(size_type _Off,
  3006. ; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
  3007. ; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  3008. ; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
  3009. ; 1423 : if (_Count != 0)
  3010. ; 1424 : _DEBUG_POINTER(_Ptr);
  3011. ; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3012. ; 1426 :
  3013. ; 1427 : if (_Inside(_Ptr))
  3014. ; 1428 : return (replace(_Off, _N0, *this,
  3015. ; 1429 : _Ptr - this->_Myptr(),
  3016. ; 1430 : _Count)); // substring, replace carefully
  3017. ; 1431 : if (this->_Mysize < _Off)
  3018. ; 1432 : _Xran(); // _Off off end
  3019. ; 1433 : if (this->_Mysize - _Off < _N0)
  3020. ; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  3021. ; 1435 : if (npos - _Count <= this->_Mysize - _N0)
  3022. ; 1436 : _Xlen(); // result too long
  3023. ; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
  3024. ; 1438 :
  3025. ; 1439 : if (_Count < _N0)
  3026. ; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
  3027. ; 1441 : this->_Myptr() + _Off + _N0,
  3028. ; 1442 : _Nm); // smaller hole, move tail up
  3029. ; 1443 : size_type _Num;
  3030. ; 1444 : if ((0 < _Count || 0 < _N0)
  3031. ; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  3032. ; 1446 : { // make room and rearrange
  3033. ; 1447 : if (_N0 < _Count)
  3034. ; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
  3035. ; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  3036. ; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  3037. ; 1451 : _Eos(_Num);
  3038. ; 1452 : }
  3039. ; 1453 : return (*this);
  3040. ; 1454 : }
  3041. ; 1455 :
  3042. ; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
  3043. ; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
  3044. ; 1458 : _DEBUG_POINTER(_Ptr);
  3045. ; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  3046. ; 1460 : }
  3047. ; 1461 :
  3048. ; 1462 : _Myt& replace(size_type _Off,
  3049. ; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
  3050. ; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
  3051. ; 1465 : if (this->_Mysize < _Off)
  3052. ; 1466 : _Xran(); // _Off off end
  3053. ; 1467 : if (this->_Mysize - _Off < _N0)
  3054. ; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  3055. ; 1469 : if (npos - _Count <= this->_Mysize - _N0)
  3056. ; 1470 : _Xlen(); // result too long
  3057. ; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
  3058. ; 1472 :
  3059. ; 1473 : if (_Count < _N0)
  3060. ; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
  3061. ; 1475 : this->_Myptr() + _Off + _N0,
  3062. ; 1476 : _Nm); // smaller hole, move tail up
  3063. ; 1477 : size_type _Num;
  3064. ; 1478 : if ((0 < _Count || 0 < _N0)
  3065. ; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  3066. ; 1480 : { // make room and rearrange
  3067. ; 1481 : if (_N0 < _Count)
  3068. ; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
  3069. ; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  3070. ; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
  3071. ; 1485 : _Eos(_Num);
  3072. ; 1486 : }
  3073. ; 1487 : return (*this);
  3074. ; 1488 : }
  3075. ; 1489 :
  3076. ; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
  3077. ; 1491 : const _Myt& _Right)
  3078. ; 1492 : { // replace [_First, _Last) with _Right
  3079. ; 1493 : return (replace(
  3080. ; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
  3081. ; 1495 : }
  3082. ; 1496 :
  3083. ; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
  3084. ; 1498 : const _Elem *_Ptr, size_type _Count)
  3085. ; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
  3086. ; 1500 : return (replace(
  3087. ; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
  3088. ; 1502 : }
  3089. ; 1503 :
  3090. ; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
  3091. ; 1505 : const _Elem *_Ptr)
  3092. ; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
  3093. ; 1507 : return (replace(
  3094. ; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
  3095. ; 1509 : }
  3096. ; 1510 :
  3097. ; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
  3098. ; 1512 : size_type _Count, _Elem _Ch)
  3099. ; 1513 : { // replace [_First, _Last) with _Count * _Ch
  3100. ; 1514 : return (replace(
  3101. ; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
  3102. ; 1516 : }
  3103. ; 1517 :
  3104. ; 1518 : template<class _Iter>
  3105. ; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
  3106. ; 1520 : _Myt&>::type
  3107. ; 1521 : replace(const_iterator _First, const_iterator _Last,
  3108. ; 1522 : _Iter _First2, _Iter _Last2)
  3109. ; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
  3110. ; 1524 : _Myt _Right(_First2, _Last2);
  3111. ; 1525 : replace(_First, _Last, _Right);
  3112. ; 1526 : return (*this);
  3113. ; 1527 : }
  3114. ; 1528 :
  3115. ; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
  3116. ; 1530 : const_pointer _First2, const_pointer _Last2)
  3117. ; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  3118. ; 1532 : if (_First2 == _Last2)
  3119. ; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  3120. ; 1534 : else
  3121. ; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  3122. ; 1536 : &*_First2, _Last2 - _First2);
  3123. ; 1537 : return (*this);
  3124. ; 1538 : }
  3125. ; 1539 :
  3126. ; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
  3127. ; 1541 : pointer _First2, pointer _Last2)
  3128. ; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  3129. ; 1543 : if (_First2 == _Last2)
  3130. ; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  3131. ; 1545 : else
  3132. ; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  3133. ; 1547 : &*_First2, _Last2 - _First2);
  3134. ; 1548 : return (*this);
  3135. ; 1549 : }
  3136. ; 1550 :
  3137. ; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
  3138. ; 1552 : const_iterator _First2, const_iterator _Last2)
  3139. ; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  3140. ; 1554 : if (_First2 == _Last2)
  3141. ; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  3142. ; 1556 : else
  3143. ; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  3144. ; 1558 : &*_First2, _Last2 - _First2);
  3145. ; 1559 : return (*this);
  3146. ; 1560 : }
  3147. ; 1561 :
  3148. ; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
  3149. ; 1563 : iterator _First2, iterator _Last2)
  3150. ; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  3151. ; 1565 : if (_First2 == _Last2)
  3152. ; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  3153. ; 1567 : else
  3154. ; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  3155. ; 1569 : &*_First2, _Last2 - _First2);
  3156. ; 1570 : return (*this);
  3157. ; 1571 : }
  3158. ; 1572 :
  3159. ; 1573 : iterator begin() _NOEXCEPT
  3160. ; 1574 : { // return iterator for beginning of mutable sequence
  3161. ; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
  3162. ; 1576 : }
  3163. ; 1577 :
  3164. ; 1578 : const_iterator begin() const _NOEXCEPT
  3165. ; 1579 : { // return iterator for beginning of nonmutable sequence
  3166. ; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
  3167. ; 1581 : }
  3168. ; 1582 :
  3169. ; 1583 : iterator end() _NOEXCEPT
  3170. ; 1584 : { // return iterator for end of mutable sequence
  3171. ; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
  3172. ; 1586 : }
  3173. ; 1587 :
  3174. ; 1588 : const_iterator end() const _NOEXCEPT
  3175. ; 1589 : { // return iterator for end of nonmutable sequence
  3176. ; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
  3177. ; 1591 : }
  3178. ; 1592 :
  3179. ; 1593 : reverse_iterator rbegin() _NOEXCEPT
  3180. ; 1594 : { // return iterator for beginning of reversed mutable sequence
  3181. ; 1595 : return (reverse_iterator(end()));
  3182. ; 1596 : }
  3183. ; 1597 :
  3184. ; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
  3185. ; 1599 : { // return iterator for beginning of reversed nonmutable sequence
  3186. ; 1600 : return (const_reverse_iterator(end()));
  3187. ; 1601 : }
  3188. ; 1602 :
  3189. ; 1603 : reverse_iterator rend() _NOEXCEPT
  3190. ; 1604 : { // return iterator for end of reversed mutable sequence
  3191. ; 1605 : return (reverse_iterator(begin()));
  3192. ; 1606 : }
  3193. ; 1607 :
  3194. ; 1608 : const_reverse_iterator rend() const _NOEXCEPT
  3195. ; 1609 : { // return iterator for end of reversed nonmutable sequence
  3196. ; 1610 : return (const_reverse_iterator(begin()));
  3197. ; 1611 : }
  3198. ; 1612 :
  3199. ; 1613 : #if _HAS_CPP0X
  3200. ; 1614 : const_iterator cbegin() const _NOEXCEPT
  3201. ; 1615 : { // return iterator for beginning of nonmutable sequence
  3202. ; 1616 : return (((const _Myt *)this)->begin());
  3203. ; 1617 : }
  3204. ; 1618 :
  3205. ; 1619 : const_iterator cend() const _NOEXCEPT
  3206. ; 1620 : { // return iterator for end of nonmutable sequence
  3207. ; 1621 : return (((const _Myt *)this)->end());
  3208. ; 1622 : }
  3209. ; 1623 :
  3210. ; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
  3211. ; 1625 : { // return iterator for beginning of reversed nonmutable sequence
  3212. ; 1626 : return (((const _Myt *)this)->rbegin());
  3213. ; 1627 : }
  3214. ; 1628 :
  3215. ; 1629 : const_reverse_iterator crend() const _NOEXCEPT
  3216. ; 1630 : { // return iterator for end of reversed nonmutable sequence
  3217. ; 1631 : return (((const _Myt *)this)->rend());
  3218. ; 1632 : }
  3219. ; 1633 :
  3220. ; 1634 : void shrink_to_fit()
  3221. ; 1635 : { // reduce capacity
  3222. ; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
  3223. ; 1637 : { // worth shrinking, do it
  3224. ; 1638 : _Myt _Tmp(*this);
  3225. ; 1639 : swap(_Tmp);
  3226. ; 1640 : }
  3227. ; 1641 : }
  3228. ; 1642 : #endif /* _HAS_CPP0X */
  3229. ; 1643 :
  3230. ; 1644 : reference at(size_type _Off)
  3231. ; 1645 : { // subscript mutable sequence with checking
  3232. ; 1646 : if (this->_Mysize <= _Off)
  3233. ; 1647 : _Xran(); // _Off off end
  3234. ; 1648 : return (this->_Myptr()[_Off]);
  3235. ; 1649 : }
  3236. ; 1650 :
  3237. ; 1651 : const_reference at(size_type _Off) const
  3238. ; 1652 : { // subscript nonmutable sequence with checking
  3239. ; 1653 : if (this->_Mysize <= _Off)
  3240. ; 1654 : _Xran(); // _Off off end
  3241. ; 1655 : return (this->_Myptr()[_Off]);
  3242. ; 1656 : }
  3243. ; 1657 :
  3244. ; 1658 : reference operator[](size_type _Off)
  3245. ; 1659 : { // subscript mutable sequence
  3246. ; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
  3247. ; 1661 : if (this->_Mysize < _Off) // sic
  3248. ; 1662 : _DEBUG_ERROR("string subscript out of range");
  3249. ; 1663 :
  3250. ; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
  3251. ; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  3252. ; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3253. ; 1667 :
  3254. ; 1668 : return (this->_Myptr()[_Off]);
  3255. ; 1669 : }
  3256. ; 1670 :
  3257. ; 1671 : const_reference operator[](size_type _Off) const
  3258. ; 1672 : { // subscript nonmutable sequence
  3259. ; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
  3260. ; 1674 : if (this->_Mysize < _Off) // sic
  3261. ; 1675 : _DEBUG_ERROR("string subscript out of range");
  3262. ; 1676 :
  3263. ; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
  3264. ; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  3265. ; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3266. ; 1680 :
  3267. ; 1681 : return (this->_Myptr()[_Off]);
  3268. ; 1682 : }
  3269. ; 1683 :
  3270. ; 1684 : void push_back(_Elem _Ch)
  3271. ; 1685 : { // insert element at end
  3272. ; 1686 : insert(end(), _Ch);
  3273. ; 1687 : }
  3274. ; 1688 :
  3275. ; 1689 : #if _HAS_CPP0X
  3276. ; 1690 : void pop_back()
  3277. ; 1691 : { // erase element at end
  3278. ; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
  3279. ; 1693 : }
  3280. ; 1694 :
  3281. ; 1695 : reference front()
  3282. ; 1696 : { // return first element of mutable sequence
  3283. ; 1697 : return (*begin());
  3284. ; 1698 : }
  3285. ; 1699 :
  3286. ; 1700 : const_reference front() const
  3287. ; 1701 : { // return first element of nonmutable sequence
  3288. ; 1702 : return (*begin());
  3289. ; 1703 : }
  3290. ; 1704 :
  3291. ; 1705 : reference back()
  3292. ; 1706 : { // return last element of mutable sequence
  3293. ; 1707 : return (*(end() - 1));
  3294. ; 1708 : }
  3295. ; 1709 :
  3296. ; 1710 : const_reference back() const
  3297. ; 1711 : { // return last element of nonmutable sequence
  3298. ; 1712 : return (*(end() - 1));
  3299. ; 1713 : }
  3300. ; 1714 : #endif /* _HAS_CPP0X */
  3301. ; 1715 :
  3302. ; 1716 : const _Elem *c_str() const _NOEXCEPT
  3303. ; 1717 : { // return pointer to null-terminated nonmutable array
  3304. ; 1718 : return (this->_Myptr());
  3305. ; 1719 : }
  3306. ; 1720 :
  3307. ; 1721 : const _Elem *data() const _NOEXCEPT
  3308. ; 1722 : { // return pointer to nonmutable array
  3309. ; 1723 : return (c_str());
  3310. ; 1724 : }
  3311. ; 1725 :
  3312. ; 1726 : size_type length() const _NOEXCEPT
  3313. ; 1727 : { // return length of sequence
  3314. ; 1728 : return (this->_Mysize);
  3315. ; 1729 : }
  3316. ; 1730 :
  3317. ; 1731 : size_type size() const _NOEXCEPT
  3318. ; 1732 : { // return length of sequence
  3319. ; 1733 : return (this->_Mysize);
  3320. ; 1734 : }
  3321. ; 1735 :
  3322. ; 1736 : size_type max_size() const _NOEXCEPT
  3323. ; 1737 : { // return maximum possible length of sequence
  3324. ; 1738 : size_type _Num = this->_Getal().max_size();
  3325. ; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
  3326. ; 1740 : }
  3327. ; 1741 :
  3328. ; 1742 : void resize(size_type _Newsize)
  3329. ; 1743 : { // determine new length, padding with null elements as needed
  3330. ; 1744 : resize(_Newsize, _Elem());
  3331. ; 1745 : }
  3332. ; 1746 :
  3333. ; 1747 : void resize(size_type _Newsize, _Elem _Ch)
  3334. ; 1748 : { // determine new length, padding with _Ch elements as needed
  3335. ; 1749 : if (_Newsize <= this->_Mysize)
  3336. ; 1750 : _Eos(_Newsize);
  3337. ; 1751 : else
  3338. ; 1752 : append(_Newsize - this->_Mysize, _Ch);
  3339. ; 1753 : }
  3340. ; 1754 :
  3341. ; 1755 : size_type capacity() const _NOEXCEPT
  3342. ; 1756 : { // return current length of allocated storage
  3343. ; 1757 : return (this->_Myres);
  3344. ; 1758 : }
  3345. ; 1759 :
  3346. ; 1760 : void reserve(size_type _Newcap = 0)
  3347. ; 1761 : { // determine new minimum length of allocated storage
  3348. ; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
  3349. ; 1763 : { // change reservation
  3350. ; 1764 : size_type _Size = this->_Mysize;
  3351. ; 1765 : if (_Grow(_Newcap, true))
  3352. ; 1766 : _Eos(_Size);
  3353. ; 1767 : }
  3354. ; 1768 : }
  3355. ; 1769 :
  3356. ; 1770 : bool empty() const _NOEXCEPT
  3357. ; 1771 : { // test if sequence is empty
  3358. ; 1772 : return (this->_Mysize == 0);
  3359. ; 1773 : }
  3360. ; 1774 :
  3361. ; 1775 : _SCL_INSECURE_DEPRECATE
  3362. ; 1776 :
  3363. ; 1777 : size_type copy(_Elem *_Ptr,
  3364. ; 1778 : size_type _Count, size_type _Off = 0) const
  3365. ; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
  3366. ; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
  3367. ; 1781 : if (_Count != 0)
  3368. ; 1782 : _DEBUG_POINTER(_Ptr);
  3369. ; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3370. ; 1784 :
  3371. ; 1785 : if (this->_Mysize < _Off)
  3372. ; 1786 : _Xran(); // _Off off end
  3373. ; 1787 : if (this->_Mysize - _Off < _Count)
  3374. ; 1788 : _Count = this->_Mysize - _Off;
  3375. ; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
  3376. ; 1790 : return (_Count);
  3377. ; 1791 : }
  3378. ; 1792 :
  3379. ; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
  3380. ; 1794 : size_type _Count, size_type _Off = 0) const
  3381. ; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
  3382. ; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
  3383. ; 1797 : if (_Count != 0)
  3384. ; 1798 : _DEBUG_POINTER(_Dest);
  3385. ; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3386. ; 1800 :
  3387. ; 1801 : if (this->_Mysize < _Off)
  3388. ; 1802 : _Xran(); // _Off off end
  3389. ; 1803 : if (this->_Mysize - _Off < _Count)
  3390. ; 1804 : _Count = this->_Mysize - _Off;
  3391. ; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
  3392. ; 1806 : return (_Count);
  3393. ; 1807 : }
  3394. ; 1808 :
  3395. ; 1809 : void _Swap_bx(_Myt& _Right)
  3396. ; 1810 : { // exchange _Bx with _Right._Bx
  3397. ; 1811 : if (this->_BUF_SIZE <= this->_Myres)
  3398. ; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
  3399. ; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
  3400. ; 1814 : else
  3401. ; 1815 : { // swap large with small
  3402. ; 1816 : pointer _Ptr = this->_Bx._Ptr;
  3403. ; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
  3404. ; 1818 : _Traits::copy(this->_Bx._Buf,
  3405. ; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
  3406. ; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
  3407. ; 1821 : }
  3408. ; 1822 : else
  3409. ; 1823 : if (_Right._Myres < this->_BUF_SIZE)
  3410. ; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
  3411. ; 1825 : else
  3412. ; 1826 : { // swap small with large
  3413. ; 1827 : pointer _Ptr = _Right._Bx._Ptr;
  3414. ; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
  3415. ; 1829 : _Traits::copy(_Right._Bx._Buf,
  3416. ; 1830 : this->_Bx._Buf, this->_Mysize + 1);
  3417. ; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  3418. ; 1832 : }
  3419. ; 1833 : }
  3420. ; 1834 :
  3421. ; 1835 : void swap(_Myt& _Right)
  3422. ; 1836 : { // exchange contents with _Right
  3423. ; 1837 : if (this == &_Right)
  3424. ; 1838 : ; // same object, do nothing
  3425. ; 1839 : else if (this->_Getal() == _Right._Getal())
  3426. ; 1840 : { // same allocator, swap control information
  3427. ; 1841 : this->_Swap_all(_Right);
  3428. ; 1842 : _Swap_bx(_Right);
  3429. ; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
  3430. ; 1844 : _STD swap(this->_Myres, _Right._Myres);
  3431. ; 1845 : }
  3432. ; 1846 :
  3433. ; 1847 : #if _HAS_CPP0X
  3434. ; 1848 : else if (_Alty::propagate_on_container_swap::value)
  3435. ; 1849 : { // swap allocators and control information
  3436. ; 1850 : this->_Swap_alloc(_Right);
  3437. ; 1851 : _Swap_bx(_Right);
  3438. ; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
  3439. ; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
  3440. ; 1854 : _STD swap(this->_Myres, _Right._Myres);
  3441. ; 1855 : }
  3442. ; 1856 : #endif /* _HAS_CPP0X */
  3443. ; 1857 :
  3444. ; 1858 : else
  3445. ; 1859 : { // different allocator, do multiple assigns
  3446. ; 1860 : _Myt _Tmp = *this;
  3447. ; 1861 :
  3448. ; 1862 : *this = _Right;
  3449. ; 1863 : _Right = _Tmp;
  3450. ; 1864 : }
  3451. ; 1865 : }
  3452. ; 1866 :
  3453. ; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
  3454. ; 1868 : { // look for _Right beginning at or after _Off
  3455. ; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
  3456. ; 1870 : }
  3457. ; 1871 :
  3458. ; 1872 : size_type find(const _Elem *_Ptr,
  3459. ; 1873 : size_type _Off, size_type _Count) const
  3460. ; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
  3461. ; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
  3462. ; 1876 : if (_Count != 0)
  3463. ; 1877 : _DEBUG_POINTER(_Ptr);
  3464. ; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3465. ; 1879 :
  3466. ; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
  3467. ; 1881 : return (_Off); // null string always matches (if inside string)
  3468. ; 1882 :
  3469. ; 1883 : size_type _Nm;
  3470. ; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
  3471. ; 1885 : { // room for match, look for it
  3472. ; 1886 : const _Elem *_Uptr, *_Vptr;
  3473. ; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
  3474. ; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
  3475. ; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
  3476. ; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
  3477. ; 1891 : return (_Uptr - this->_Myptr()); // found a match
  3478. ; 1892 : }
  3479. ; 1893 :
  3480. ; 1894 : return (npos); // no match
  3481. ; 1895 : }
  3482. ; 1896 :
  3483. ; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
  3484. ; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
  3485. ; 1899 : _DEBUG_POINTER(_Ptr);
  3486. ; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
  3487. ; 1901 : }
  3488. ; 1902 :
  3489. ; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
  3490. ; 1904 : { // look for _Ch at or after _Off
  3491. ; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
  3492. ; 1906 : }
  3493. ; 1907 :
  3494. ; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
  3495. ; 1909 : { // look for _Right beginning before _Off
  3496. ; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
  3497. ; 1911 : }
  3498. ; 1912 :
  3499. ; 1913 : size_type rfind(const _Elem *_Ptr,
  3500. ; 1914 : size_type _Off, size_type _Count) const
  3501. ; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
  3502. ; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
  3503. ; 1917 : if (_Count != 0)
  3504. ; 1918 : _DEBUG_POINTER(_Ptr);
  3505. ; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3506. ; 1920 :
  3507. ; 1921 : if (_Count == 0)
  3508. ; 1922 : return (_Off < this->_Mysize ? _Off
  3509. ; 1923 : : this->_Mysize); // null always matches
  3510. ; 1924 : if (_Count <= this->_Mysize)
  3511. ; 1925 : { // room for match, look for it
  3512. ; 1926 : const _Elem *_Uptr = this->_Myptr() +
  3513. ; 1927 : (_Off < this->_Mysize - _Count ? _Off
  3514. ; 1928 : : this->_Mysize - _Count);
  3515. ; 1929 : for (; ; --_Uptr)
  3516. ; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
  3517. ; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
  3518. ; 1932 : return (_Uptr - this->_Myptr()); // found a match
  3519. ; 1933 : else if (_Uptr == this->_Myptr())
  3520. ; 1934 : break; // at beginning, no more chance for match
  3521. ; 1935 : }
  3522. ; 1936 :
  3523. ; 1937 : return (npos); // no match
  3524. ; 1938 : }
  3525. ; 1939 :
  3526. ; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
  3527. ; 1941 : { // look for [_Ptr, <null>) beginning before _Off
  3528. ; 1942 : _DEBUG_POINTER(_Ptr);
  3529. ; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
  3530. ; 1944 : }
  3531. ; 1945 :
  3532. ; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
  3533. ; 1947 : { // look for _Ch before _Off
  3534. ; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  3535. ; 1949 : }
  3536. ; 1950 :
  3537. ; 1951 : size_type find_first_of(const _Myt& _Right,
  3538. ; 1952 : size_type _Off = 0) const _NOEXCEPT
  3539. ; 1953 : { // look for one of _Right at or after _Off
  3540. ; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
  3541. ; 1955 : }
  3542. ; 1956 :
  3543. ; 1957 : size_type find_first_of(const _Elem *_Ptr,
  3544. ; 1958 : size_type _Off, size_type _Count) const
  3545. ; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
  3546. ; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
  3547. ; 1961 : if (_Count != 0)
  3548. ; 1962 : _DEBUG_POINTER(_Ptr);
  3549. ; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3550. ; 1964 :
  3551. ; 1965 : if (0 < _Count && _Off < this->_Mysize)
  3552. ; 1966 : { // room for match, look for it
  3553. ; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  3554. ; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  3555. ; 1969 : _Uptr < _Vptr; ++_Uptr)
  3556. ; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  3557. ; 1971 : return (_Uptr - this->_Myptr()); // found a match
  3558. ; 1972 : }
  3559. ; 1973 :
  3560. ; 1974 : return (npos); // no match
  3561. ; 1975 : }
  3562. ; 1976 :
  3563. ; 1977 : size_type find_first_of(const _Elem *_Ptr,
  3564. ; 1978 : size_type _Off = 0) const
  3565. ; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
  3566. ; 1980 : _DEBUG_POINTER(_Ptr);
  3567. ; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
  3568. ; 1982 : }
  3569. ; 1983 :
  3570. ; 1984 : size_type find_first_of(_Elem _Ch,
  3571. ; 1985 : size_type _Off = 0) const
  3572. ; 1986 : { // look for _Ch at or after _Off
  3573. ; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
  3574. ; 1988 : }
  3575. ; 1989 :
  3576. ; 1990 : size_type find_last_of(const _Myt& _Right,
  3577. ; 1991 : size_type _Off = npos) const _NOEXCEPT
  3578. ; 1992 : { // look for one of _Right before _Off
  3579. ; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
  3580. ; 1994 : }
  3581. ; 1995 :
  3582. ; 1996 : size_type find_last_of(const _Elem *_Ptr,
  3583. ; 1997 : size_type _Off, size_type _Count) const
  3584. ; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
  3585. ; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
  3586. ; 2000 : if (_Count != 0)
  3587. ; 2001 : _DEBUG_POINTER(_Ptr);
  3588. ; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3589. ; 2003 :
  3590. ; 2004 : if (0 < _Count && 0 < this->_Mysize)
  3591. ; 2005 : { // worth searching, do it
  3592. ; 2006 : const _Elem *_Uptr = this->_Myptr()
  3593. ; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  3594. ; 2008 : for (; ; --_Uptr)
  3595. ; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  3596. ; 2010 : return (_Uptr - this->_Myptr()); // found a match
  3597. ; 2011 : else if (_Uptr == this->_Myptr())
  3598. ; 2012 : break; // at beginning, no more chance for match
  3599. ; 2013 : }
  3600. ; 2014 :
  3601. ; 2015 : return (npos); // no match
  3602. ; 2016 : }
  3603. ; 2017 :
  3604. ; 2018 : size_type find_last_of(const _Elem *_Ptr,
  3605. ; 2019 : size_type _Off = npos) const
  3606. ; 2020 : { // look for one of [_Ptr, <null>) before _Off
  3607. ; 2021 : _DEBUG_POINTER(_Ptr);
  3608. ; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
  3609. ; 2023 : }
  3610. ; 2024 :
  3611. ; 2025 : size_type find_last_of(_Elem _Ch,
  3612. ; 2026 : size_type _Off = npos) const
  3613. ; 2027 : { // look for _Ch before _Off
  3614. ; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  3615. ; 2029 : }
  3616. ; 2030 :
  3617. ; 2031 : size_type find_first_not_of(const _Myt& _Right,
  3618. ; 2032 : size_type _Off = 0) const _NOEXCEPT
  3619. ; 2033 : { // look for none of _Right at or after _Off
  3620. ; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
  3621. ; 2035 : _Right.size()));
  3622. ; 2036 : }
  3623. ; 2037 :
  3624. ; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
  3625. ; 2039 : size_type _Off, size_type _Count) const
  3626. ; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
  3627. ; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
  3628. ; 2042 : if (_Count != 0)
  3629. ; 2043 : _DEBUG_POINTER(_Ptr);
  3630. ; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3631. ; 2045 :
  3632. ; 2046 : if (_Off < this->_Mysize)
  3633. ; 2047 : { // room for match, look for it
  3634. ; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  3635. ; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  3636. ; 2050 : _Uptr < _Vptr; ++_Uptr)
  3637. ; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  3638. ; 2052 : return (_Uptr - this->_Myptr());
  3639. ; 2053 : }
  3640. ; 2054 : return (npos);
  3641. ; 2055 : }
  3642. ; 2056 :
  3643. ; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
  3644. ; 2058 : size_type _Off = 0) const
  3645. ; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
  3646. ; 2060 : _DEBUG_POINTER(_Ptr);
  3647. ; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  3648. ; 2062 : }
  3649. ; 2063 :
  3650. ; 2064 : size_type find_first_not_of(_Elem _Ch,
  3651. ; 2065 : size_type _Off = 0) const
  3652. ; 2066 : { // look for non _Ch at or after _Off
  3653. ; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
  3654. ; 2068 : }
  3655. ; 2069 :
  3656. ; 2070 : size_type find_last_not_of(const _Myt& _Right,
  3657. ; 2071 : size_type _Off = npos) const _NOEXCEPT
  3658. ; 2072 : { // look for none of _Right before _Off
  3659. ; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
  3660. ; 2074 : }
  3661. ; 2075 :
  3662. ; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
  3663. ; 2077 : size_type _Off, size_type _Count) const
  3664. ; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
  3665. ; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
  3666. ; 2080 : if (_Count != 0)
  3667. ; 2081 : _DEBUG_POINTER(_Ptr);
  3668. ; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3669. ; 2083 :
  3670. ; 2084 : if (0 < this->_Mysize)
  3671. ; 2085 : { // worth searching, do it
  3672. ; 2086 : const _Elem *_Uptr = this->_Myptr()
  3673. ; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  3674. ; 2088 : for (; ; --_Uptr)
  3675. ; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  3676. ; 2090 : return (_Uptr - this->_Myptr());
  3677. ; 2091 : else if (_Uptr == this->_Myptr())
  3678. ; 2092 : break;
  3679. ; 2093 : }
  3680. ; 2094 : return (npos);
  3681. ; 2095 : }
  3682. ; 2096 :
  3683. ; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
  3684. ; 2098 : size_type _Off = npos) const
  3685. ; 2099 : { // look for none of [_Ptr, <null>) before _Off
  3686. ; 2100 : _DEBUG_POINTER(_Ptr);
  3687. ; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  3688. ; 2102 : }
  3689. ; 2103 :
  3690. ; 2104 : size_type find_last_not_of(_Elem _Ch,
  3691. ; 2105 : size_type _Off = npos) const
  3692. ; 2106 : { // look for non _Ch before _Off
  3693. ; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
  3694. ; 2108 : }
  3695. ; 2109 :
  3696. ; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
  3697. ; 2111 : { // return [_Off, _Off + _Count) as new string
  3698. ; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
  3699. ; 2113 : }
  3700. ; 2114 :
  3701. ; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
  3702. ; 2116 : { // compare [0, _Mysize) with _Right
  3703. ; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
  3704. ; 2118 : }
  3705. ; 2119 :
  3706. ; 2120 : int compare(size_type _Off, size_type _N0,
  3707. ; 2121 : const _Myt& _Right) const
  3708. ; 2122 : { // compare [_Off, _Off + _N0) with _Right
  3709. ; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
  3710. ; 2124 : }
  3711. ; 2125 :
  3712. ; 2126 : int compare(size_type _Off,
  3713. ; 2127 : size_type _N0, const _Myt& _Right,
  3714. ; 2128 : size_type _Roff, size_type _Count) const
  3715. ; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  3716. ; 2130 : if (_Right.size() < _Roff)
  3717. ; 2131 : _Xran(); // _Off off end
  3718. ; 2132 : if (_Right._Mysize - _Roff < _Count)
  3719. ; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
  3720. ; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
  3721. ; 2135 : }
  3722. ; 2136 :
  3723. ; 2137 : int compare(const _Elem *_Ptr) const
  3724. ; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
  3725. ; 2139 : _DEBUG_POINTER(_Ptr);
  3726. ; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
  3727. ; 2141 : }
  3728. ; 2142 :
  3729. ; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
  3730. ; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
  3731. ; 2145 : _DEBUG_POINTER(_Ptr);
  3732. ; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  3733. ; 2147 : }
  3734. ; 2148 :
  3735. ; 2149 : int compare(size_type _Off,
  3736. ; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
  3737. ; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  3738. ; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
  3739. ; 2153 : if (_Count != 0)
  3740. ; 2154 : _DEBUG_POINTER(_Ptr);
  3741. ; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  3742. ; 2156 :
  3743. ; 2157 : if (this->_Mysize < _Off)
  3744. ; 2158 : _Xran(); // _Off off end
  3745. ; 2159 : if (this->_Mysize - _Off < _N0)
  3746. ; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  3747. ; 2161 :
  3748. ; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
  3749. ; 2163 : _N0 < _Count ? _N0 : _Count);
  3750. ; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
  3751. ; 2165 : : _N0 == _Count ? 0 : +1);
  3752. ; 2166 : }
  3753. ; 2167 :
  3754. ; 2168 : allocator_type get_allocator() const _NOEXCEPT
  3755. ; 2169 : { // return allocator object for values
  3756. ; 2170 : return (this->_Getal());
  3757. ; 2171 : }
  3758. ; 2172 :
  3759. ; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
  3760. ; 2174 : { // assign _Count copies of _Ch beginning at _Off
  3761. ; 2175 : if (_Count == 1)
  3762. ; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
  3763. ; 2177 : else
  3764. ; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
  3765. ; 2179 : }
  3766. ; 2180 :
  3767. ; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
  3768. ; 2182 : { // copy _Oldlen elements to newly allocated buffer
  3769. ; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
  3770. ; 2184 : if (max_size() < _Newres)
  3771. ; 2185 : _Newres = _Newsize; // undo roundup if too big
  3772. ; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
  3773. ; 2187 : ;
  3774. ; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
  3775. ; 2189 : _Newres = this->_Myres
  3776. ; 2190 : + this->_Myres / 2; // grow exponentially if possible
  3777. ; 2191 : else
  3778. ; 2192 : _Newres = max_size(); // settle for max_size()
  3779. ; 2193 :
  3780. ; 2194 : _Elem *_Ptr;
  3781. ; 2195 : _TRY_BEGIN
  3782. ; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
  3783. ; 2197 : _CATCH_ALL
  3784. ; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
  3785. ; 2199 : _TRY_BEGIN
  3786. ; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
  3787. ; 2201 : _CATCH_ALL
  3788. ; 2202 : _Tidy(true); // failed again, discard storage and reraise
  3789. ; 2203 : _RERAISE;
  3790. ; 2204 : _CATCH_END
  3791. ; 2205 : _CATCH_END
  3792. ; 2206 :
  3793. ; 2207 : if (0 < _Oldlen)
  3794. ; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
  3795. ; 2209 : _Oldlen); // copy existing elements
  3796. ; 2210 : _Tidy(true);
  3797. ; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  3798. ; 2212 : this->_Myres = _Newres;
  3799. ; 2213 : _Eos(_Oldlen);
  3800. ; 2214 : }
  3801. ; 2215 :
  3802. ; 2216 : void _Eos(size_type _Newsize)
  3803. ; 2217 : { // set new length and null terminator
  3804. ; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
  3805.  
  3806. mov DWORD PTR [esi+16], 0
  3807.  
  3808. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  3809.  
  3810. push OFFSET ??_C@_0BG@PADBLCHM@iostream?5stream?5error?$AA@
  3811. mov ecx, esi
  3812. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  3813.  
  3814. ; 564 : _Left = _Right;
  3815.  
  3816. mov BYTE PTR [esi], 0
  3817. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  3818.  
  3819. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  3820.  
  3821. 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
  3822. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3823.  
  3824. ; 615 : return (_Generic_error_category::message(_Errcode));
  3825.  
  3826. mov eax, esi
  3827. pop esi
  3828.  
  3829. ; 616 : }
  3830.  
  3831. mov esp, ebp
  3832. pop ebp
  3833. ret 8
  3834. $LN2@message:
  3835.  
  3836. ; 615 : return (_Generic_error_category::message(_Errcode));
  3837.  
  3838. push eax
  3839. push esi
  3840. 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
  3841. mov eax, esi
  3842. pop esi
  3843.  
  3844. ; 616 : }
  3845.  
  3846. mov esp, ebp
  3847. pop ebp
  3848. ret 8
  3849. ?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
  3850. _TEXT ENDS
  3851. ; Function compile flags: /Ogtp
  3852. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3853. ; COMDAT ??_G_Iostream_error_category@std@@UAEPAXI@Z
  3854. _TEXT SEGMENT
  3855. ___flags$ = 8 ; size = 4
  3856. ??_G_Iostream_error_category@std@@UAEPAXI@Z PROC ; std::_Iostream_error_category::`scalar deleting destructor', COMDAT
  3857. ; _this$ = ecx
  3858. push ebp
  3859. mov ebp, esp
  3860. test BYTE PTR ___flags$[ebp], 1
  3861. push esi
  3862. mov esi, ecx
  3863.  
  3864. ; 167 : { // destroy the object
  3865.  
  3866. mov DWORD PTR [esi], OFFSET ??_7error_category@std@@6B@
  3867. je SHORT $LN10@scalar
  3868. push esi
  3869. call DWORD PTR __imp_??3@YAXPAX@Z
  3870. add esp, 4
  3871. $LN10@scalar:
  3872. mov eax, esi
  3873. pop esi
  3874. pop ebp
  3875. ret 4
  3876. ??_G_Iostream_error_category@std@@UAEPAXI@Z ENDP ; std::_Iostream_error_category::`scalar deleting destructor'
  3877. _TEXT ENDS
  3878. ; Function compile flags: /Ogtp
  3879. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3880. ; COMDAT ??1_Iostream_error_category@std@@UAE@XZ
  3881. _TEXT SEGMENT
  3882. ??1_Iostream_error_category@std@@UAE@XZ PROC ; std::_Iostream_error_category::~_Iostream_error_category, COMDAT
  3883. ; _this$ = ecx
  3884.  
  3885. ; 167 : { // destroy the object
  3886.  
  3887. mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
  3888. ret 0
  3889. ??1_Iostream_error_category@std@@UAE@XZ ENDP ; std::_Iostream_error_category::~_Iostream_error_category
  3890. _TEXT ENDS
  3891. ; Function compile flags: /Ogtp
  3892. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3893. ; COMDAT ??0_System_error_category@std@@QAE@XZ
  3894. _TEXT SEGMENT
  3895. ??0_System_error_category@std@@QAE@XZ PROC ; std::_System_error_category::_System_error_category, COMDAT
  3896. ; _this$dead$ = ecx
  3897.  
  3898. ; 624 : _System_error_category()
  3899.  
  3900. 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
  3901.  
  3902. ; 625 : { // default constructor
  3903. ; 626 : }
  3904.  
  3905. mov eax, OFFSET ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A ; std::_Error_objects<int>::_System_object
  3906. ret 0
  3907. ??0_System_error_category@std@@QAE@XZ ENDP ; std::_System_error_category::_System_error_category
  3908. _TEXT ENDS
  3909. ; Function compile flags: /Ogtp
  3910. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3911. ; COMDAT ?name@_System_error_category@std@@UBEPBDXZ
  3912. _TEXT SEGMENT
  3913. ?name@_System_error_category@std@@UBEPBDXZ PROC ; std::_System_error_category::name, COMDAT
  3914. ; _this$ = ecx
  3915.  
  3916. ; 630 : return ("system");
  3917.  
  3918. mov eax, OFFSET ??_C@_06FHFOAHML@system?$AA@
  3919.  
  3920. ; 631 : }
  3921.  
  3922. ret 0
  3923. ?name@_System_error_category@std@@UBEPBDXZ ENDP ; std::_System_error_category::name
  3924. _TEXT ENDS
  3925. ; Function compile flags: /Ogtp
  3926. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3927. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  3928. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3929. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  3930. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  3931. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  3932. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3933. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  3934. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  3935. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3936. ; COMDAT ?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z
  3937. _TEXT SEGMENT
  3938. $T1 = -4 ; size = 4
  3939. ___$ReturnUdt$ = 8 ; size = 4
  3940. __Errcode$ = 12 ; size = 4
  3941. ?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
  3942. ; _this$ = ecx
  3943.  
  3944. ; 634 : { // convert to name of error
  3945.  
  3946. push ebp
  3947. mov ebp, esp
  3948. push ecx
  3949. push esi
  3950.  
  3951. ; 635 : const char *_Name = _Winerror_map(_Errcode);
  3952.  
  3953. push DWORD PTR __Errcode$[ebp]
  3954. mov DWORD PTR $T1[ebp], 0
  3955. call DWORD PTR __imp_?_Winerror_map@std@@YAPBDH@Z
  3956. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  3957.  
  3958. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  3959.  
  3960. mov esi, DWORD PTR ___$ReturnUdt$[ebp]
  3961. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  3962.  
  3963. ; 635 : const char *_Name = _Winerror_map(_Errcode);
  3964.  
  3965. add esp, 4
  3966.  
  3967. ; 636 : return (string(_Name != 0 ? _Name : "unknown error"));
  3968.  
  3969. test eax, eax
  3970. mov edx, OFFSET ??_C@_0O@BFJCFAAK@unknown?5error?$AA@
  3971. cmovne edx, eax
  3972. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  3973.  
  3974. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  3975.  
  3976. mov DWORD PTR [esi+20], 15 ; 0000000fH
  3977.  
  3978. ; 1145 : }
  3979. ; 1146 :
  3980. ; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
  3981. ; 1148 : { // assign _Count * _Ch
  3982. ; 1149 : if (_Count == npos)
  3983. ; 1150 : _Xlen(); // result too long
  3984. ; 1151 :
  3985. ; 1152 : if (_Grow(_Count))
  3986. ; 1153 : { // make room and assign new stuff
  3987. ; 1154 : _Chassign(0, _Count, _Ch);
  3988. ; 1155 : _Eos(_Count);
  3989. ; 1156 : }
  3990. ; 1157 : return (*this);
  3991. ; 1158 : }
  3992. ; 1159 :
  3993. ; 1160 : template<class _Iter>
  3994. ; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
  3995. ; 1162 : _Myt&>::type
  3996. ; 1163 : assign(_Iter _First, _Iter _Last)
  3997. ; 1164 : { // assign [First, _Last), input iterators
  3998. ; 1165 : return (replace(begin(), end(), _First, _Last));
  3999. ; 1166 : }
  4000. ; 1167 :
  4001. ; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
  4002. ; 1169 : { // assign [First, _Last), const pointers
  4003. ; 1170 : return (replace(begin(), end(), _First, _Last));
  4004. ; 1171 : }
  4005. ; 1172 :
  4006. ; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
  4007. ; 1174 : { // assign [First, _Last), const_iterators
  4008. ; 1175 : return (replace(begin(), end(), _First, _Last));
  4009. ; 1176 : }
  4010. ; 1177 :
  4011. ; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
  4012. ; 1179 : { // insert _Right at _Off
  4013. ; 1180 : return (insert(_Off, _Right, 0, npos));
  4014. ; 1181 : }
  4015. ; 1182 :
  4016. ; 1183 : _Myt& insert(size_type _Off,
  4017. ; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
  4018. ; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
  4019. ; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  4020. ; 1187 : _Xran(); // _Off or _Roff off end
  4021. ; 1188 : size_type _Num = _Right.size() - _Roff;
  4022. ; 1189 : if (_Num < _Count)
  4023. ; 1190 : _Count = _Num; // trim _Count to size
  4024. ; 1191 : if (npos - this->_Mysize <= _Count)
  4025. ; 1192 : _Xlen(); // result too long
  4026. ; 1193 :
  4027. ; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  4028. ; 1195 : { // make room and insert new stuff
  4029. ; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
  4030. ; 1197 : this->_Myptr() + _Off,
  4031. ; 1198 : this->_Mysize - _Off); // empty out hole
  4032. ; 1199 : if (this == &_Right)
  4033. ; 1200 : _Traits::move(this->_Myptr() + _Off,
  4034. ; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
  4035. ; 1202 : _Count); // substring
  4036. ; 1203 : else
  4037. ; 1204 : _Traits::copy(this->_Myptr() + _Off,
  4038. ; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
  4039. ; 1206 : _Eos(_Num);
  4040. ; 1207 : }
  4041. ; 1208 : return (*this);
  4042. ; 1209 : }
  4043. ; 1210 :
  4044. ; 1211 : _Myt& insert(size_type _Off,
  4045. ; 1212 : const _Elem *_Ptr, size_type _Count)
  4046. ; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
  4047. ; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
  4048. ; 1215 : if (_Count != 0)
  4049. ; 1216 : _DEBUG_POINTER(_Ptr);
  4050. ; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4051. ; 1218 :
  4052. ; 1219 : if (_Inside(_Ptr))
  4053. ; 1220 : return (insert(_Off, *this,
  4054. ; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
  4055. ; 1222 : if (this->_Mysize < _Off)
  4056. ; 1223 : _Xran(); // _Off off end
  4057. ; 1224 : if (npos - this->_Mysize <= _Count)
  4058. ; 1225 : _Xlen(); // result too long
  4059. ; 1226 : size_type _Num;
  4060. ; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  4061. ; 1228 : { // make room and insert new stuff
  4062. ; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
  4063. ; 1230 : this->_Myptr() + _Off,
  4064. ; 1231 : this->_Mysize - _Off); // empty out hole
  4065. ; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  4066. ; 1233 : _Eos(_Num);
  4067. ; 1234 : }
  4068. ; 1235 : return (*this);
  4069. ; 1236 : }
  4070. ; 1237 :
  4071. ; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
  4072. ; 1239 : { // insert [_Ptr, <null>) at _Off
  4073. ; 1240 : _DEBUG_POINTER(_Ptr);
  4074. ; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
  4075. ; 1242 : }
  4076. ; 1243 :
  4077. ; 1244 : _Myt& insert(size_type _Off,
  4078. ; 1245 : size_type _Count, _Elem _Ch)
  4079. ; 1246 : { // insert _Count * _Ch at _Off
  4080. ; 1247 : if (this->_Mysize < _Off)
  4081. ; 1248 : _Xran(); // _Off off end
  4082. ; 1249 : if (npos - this->_Mysize <= _Count)
  4083. ; 1250 : _Xlen(); // result too long
  4084. ; 1251 : size_type _Num;
  4085. ; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  4086. ; 1253 : { // make room and insert new stuff
  4087. ; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
  4088. ; 1255 : this->_Myptr() + _Off,
  4089. ; 1256 : this->_Mysize - _Off); // empty out hole
  4090. ; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
  4091. ; 1258 : _Eos(_Num);
  4092. ; 1259 : }
  4093. ; 1260 : return (*this);
  4094. ; 1261 : }
  4095. ; 1262 :
  4096. ; 1263 : iterator insert(const_iterator _Where)
  4097. ; 1264 : { // insert <null> at _Where
  4098. ; 1265 : return (insert(_Where, _Elem()));
  4099. ; 1266 : }
  4100. ; 1267 :
  4101. ; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
  4102. ; 1269 : { // insert _Ch at _Where
  4103. ; 1270 : size_type _Off = _Pdif(_Where, begin());
  4104. ; 1271 : insert(_Off, 1, _Ch);
  4105. ; 1272 : return (begin() + _Off);
  4106. ; 1273 : }
  4107. ; 1274 :
  4108. ; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
  4109. ; 1276 : { // insert _Count * _Elem at _Where
  4110. ; 1277 : size_type _Off = _Pdif(_Where, begin());
  4111. ; 1278 : insert(_Off, _Count, _Ch);
  4112. ; 1279 : return (begin() + _Off);
  4113. ; 1280 : }
  4114. ; 1281 :
  4115. ; 1282 : template<class _Iter>
  4116. ; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
  4117. ; 1284 : iterator>::type
  4118. ; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  4119. ; 1286 : { // insert [_First, _Last) at _Where, input iterators
  4120. ; 1287 : size_type _Off = _Pdif(_Where, begin());
  4121. ; 1288 : replace(_Where, _Where, _First, _Last);
  4122. ; 1289 : return (begin() + _Off);
  4123. ; 1290 : }
  4124. ; 1291 :
  4125. ; 1292 : iterator insert(const_iterator _Where,
  4126. ; 1293 : const_pointer _First, const_pointer _Last)
  4127. ; 1294 : { // insert [_First, _Last) at _Where, const pointers
  4128. ; 1295 : size_type _Off = _Pdif(_Where, begin());
  4129. ; 1296 : replace(_Where, _Where, _First, _Last);
  4130. ; 1297 : return (begin() + _Off);
  4131. ; 1298 : }
  4132. ; 1299 :
  4133. ; 1300 : iterator insert(const_iterator _Where,
  4134. ; 1301 : const_iterator _First, const_iterator _Last)
  4135. ; 1302 : { // insert [_First, _Last) at _Where, const_iterators
  4136. ; 1303 : size_type _Off = _Pdif(_Where, begin());
  4137. ; 1304 : replace(_Where, _Where, _First, _Last);
  4138. ; 1305 : return (begin() + _Off);
  4139. ; 1306 : }
  4140. ; 1307 :
  4141. ; 1308 : _Myt& erase(size_type _Off = 0)
  4142. ; 1309 : { // erase elements [_Off, ...)
  4143. ; 1310 : if (this->_Mysize < _Off)
  4144. ; 1311 : _Xran(); // _Off off end
  4145. ; 1312 : _Eos(_Off);
  4146. ; 1313 : return (*this);
  4147. ; 1314 : }
  4148. ; 1315 :
  4149. ; 1316 : _Myt& erase(size_type _Off, size_type _Count)
  4150. ; 1317 : { // erase elements [_Off, _Off + _Count)
  4151. ; 1318 : if (this->_Mysize < _Off)
  4152. ; 1319 : _Xran(); // _Off off end
  4153. ; 1320 : if (this->_Mysize - _Off <= _Count)
  4154. ; 1321 : _Eos(_Off); // erase elements [_Off, ...)
  4155. ; 1322 : else if (0 < _Count)
  4156. ; 1323 : { // move elements down
  4157. ; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
  4158. ; 1325 : size_type _Newsize = this->_Mysize - _Count;
  4159. ; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
  4160. ; 1327 : _Eos(_Newsize);
  4161. ; 1328 : }
  4162. ; 1329 : return (*this);
  4163. ; 1330 : }
  4164. ; 1331 :
  4165. ; 1332 : iterator erase(const_iterator _Where)
  4166. ; 1333 : { // erase element at _Where
  4167. ; 1334 : size_type _Count = _Pdif(_Where, begin());
  4168. ; 1335 : erase(_Count, 1);
  4169. ; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  4170. ; 1337 : }
  4171. ; 1338 :
  4172. ; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
  4173. ; 1340 : { // erase substring [_First, _Last)
  4174. ; 1341 : _DEBUG_RANGE(_First, _Last);
  4175. ; 1342 : size_type _Count = _Pdif(_First, begin());
  4176. ; 1343 : erase(_Count, _Pdif(_Last, _First));
  4177. ; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  4178. ; 1345 : }
  4179. ; 1346 :
  4180. ; 1347 : void clear() _NOEXCEPT
  4181. ; 1348 : { // erase all
  4182. ; 1349 : _Eos(0);
  4183. ; 1350 : }
  4184. ; 1351 :
  4185. ; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
  4186. ; 1353 : { // replace [_Off, _Off + _N0) with _Right
  4187. ; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
  4188. ; 1355 : }
  4189. ; 1356 :
  4190. ; 1357 : _Myt& replace(size_type _Off,
  4191. ; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
  4192. ; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  4193. ; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  4194. ; 1361 : _Xran(); // _Off or _Roff off end
  4195. ; 1362 : if (this->_Mysize - _Off < _N0)
  4196. ; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  4197. ; 1364 : size_type _Num = _Right.size() - _Roff;
  4198. ; 1365 : if (_Num < _Count)
  4199. ; 1366 : _Count = _Num; // trim _Count to size
  4200. ; 1367 : if (npos - _Count <= this->_Mysize - _N0)
  4201. ; 1368 : _Xlen(); // result too long
  4202. ; 1369 :
  4203. ; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
  4204. ; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
  4205. ; 1372 : if (this->_Mysize < _Newsize)
  4206. ; 1373 : _Grow(_Newsize);
  4207. ; 1374 :
  4208. ; 1375 : if (this != &_Right)
  4209. ; 1376 : { // no overlap, just move down and copy in new stuff
  4210. ; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
  4211. ; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
  4212. ; 1379 : _Traits::copy(this->_Myptr() + _Off,
  4213. ; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
  4214. ; 1381 : }
  4215. ; 1382 : else if (_Count <= _N0)
  4216. ; 1383 : { // hole doesn't get larger, just copy in substring
  4217. ; 1384 : _Traits::move(this->_Myptr() + _Off,
  4218. ; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
  4219. ; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
  4220. ; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  4221. ; 1388 : }
  4222. ; 1389 : else if (_Roff <= _Off)
  4223. ; 1390 : { // hole gets larger, substring begins before hole
  4224. ; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
  4225. ; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  4226. ; 1393 : _Traits::move(this->_Myptr() + _Off,
  4227. ; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
  4228. ; 1395 : }
  4229. ; 1396 : else if (_Off + _N0 <= _Roff)
  4230. ; 1397 : { // hole gets larger, substring begins after hole
  4231. ; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
  4232. ; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  4233. ; 1400 : _Traits::move(this->_Myptr() + _Off,
  4234. ; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
  4235. ; 1402 : _Count); // fill hole
  4236. ; 1403 : }
  4237. ; 1404 : else
  4238. ; 1405 : { // hole gets larger, substring begins in hole
  4239. ; 1406 : _Traits::move(this->_Myptr() + _Off,
  4240. ; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
  4241. ; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
  4242. ; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  4243. ; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
  4244. ; 1411 : this->_Myptr() + _Roff + _Count,
  4245. ; 1412 : _Count - _N0); // fill rest of new hole
  4246. ; 1413 : }
  4247. ; 1414 :
  4248. ; 1415 : _Eos(_Newsize);
  4249. ; 1416 : return (*this);
  4250. ; 1417 : }
  4251. ; 1418 :
  4252. ; 1419 : _Myt& replace(size_type _Off,
  4253. ; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
  4254. ; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  4255. ; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
  4256. ; 1423 : if (_Count != 0)
  4257. ; 1424 : _DEBUG_POINTER(_Ptr);
  4258. ; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4259. ; 1426 :
  4260. ; 1427 : if (_Inside(_Ptr))
  4261. ; 1428 : return (replace(_Off, _N0, *this,
  4262. ; 1429 : _Ptr - this->_Myptr(),
  4263. ; 1430 : _Count)); // substring, replace carefully
  4264. ; 1431 : if (this->_Mysize < _Off)
  4265. ; 1432 : _Xran(); // _Off off end
  4266. ; 1433 : if (this->_Mysize - _Off < _N0)
  4267. ; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  4268. ; 1435 : if (npos - _Count <= this->_Mysize - _N0)
  4269. ; 1436 : _Xlen(); // result too long
  4270. ; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
  4271. ; 1438 :
  4272. ; 1439 : if (_Count < _N0)
  4273. ; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
  4274. ; 1441 : this->_Myptr() + _Off + _N0,
  4275. ; 1442 : _Nm); // smaller hole, move tail up
  4276. ; 1443 : size_type _Num;
  4277. ; 1444 : if ((0 < _Count || 0 < _N0)
  4278. ; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  4279. ; 1446 : { // make room and rearrange
  4280. ; 1447 : if (_N0 < _Count)
  4281. ; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
  4282. ; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  4283. ; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  4284. ; 1451 : _Eos(_Num);
  4285. ; 1452 : }
  4286. ; 1453 : return (*this);
  4287. ; 1454 : }
  4288. ; 1455 :
  4289. ; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
  4290. ; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
  4291. ; 1458 : _DEBUG_POINTER(_Ptr);
  4292. ; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  4293. ; 1460 : }
  4294. ; 1461 :
  4295. ; 1462 : _Myt& replace(size_type _Off,
  4296. ; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
  4297. ; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
  4298. ; 1465 : if (this->_Mysize < _Off)
  4299. ; 1466 : _Xran(); // _Off off end
  4300. ; 1467 : if (this->_Mysize - _Off < _N0)
  4301. ; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  4302. ; 1469 : if (npos - _Count <= this->_Mysize - _N0)
  4303. ; 1470 : _Xlen(); // result too long
  4304. ; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
  4305. ; 1472 :
  4306. ; 1473 : if (_Count < _N0)
  4307. ; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
  4308. ; 1475 : this->_Myptr() + _Off + _N0,
  4309. ; 1476 : _Nm); // smaller hole, move tail up
  4310. ; 1477 : size_type _Num;
  4311. ; 1478 : if ((0 < _Count || 0 < _N0)
  4312. ; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  4313. ; 1480 : { // make room and rearrange
  4314. ; 1481 : if (_N0 < _Count)
  4315. ; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
  4316. ; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  4317. ; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
  4318. ; 1485 : _Eos(_Num);
  4319. ; 1486 : }
  4320. ; 1487 : return (*this);
  4321. ; 1488 : }
  4322. ; 1489 :
  4323. ; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
  4324. ; 1491 : const _Myt& _Right)
  4325. ; 1492 : { // replace [_First, _Last) with _Right
  4326. ; 1493 : return (replace(
  4327. ; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
  4328. ; 1495 : }
  4329. ; 1496 :
  4330. ; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
  4331. ; 1498 : const _Elem *_Ptr, size_type _Count)
  4332. ; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
  4333. ; 1500 : return (replace(
  4334. ; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
  4335. ; 1502 : }
  4336. ; 1503 :
  4337. ; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
  4338. ; 1505 : const _Elem *_Ptr)
  4339. ; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
  4340. ; 1507 : return (replace(
  4341. ; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
  4342. ; 1509 : }
  4343. ; 1510 :
  4344. ; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
  4345. ; 1512 : size_type _Count, _Elem _Ch)
  4346. ; 1513 : { // replace [_First, _Last) with _Count * _Ch
  4347. ; 1514 : return (replace(
  4348. ; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
  4349. ; 1516 : }
  4350. ; 1517 :
  4351. ; 1518 : template<class _Iter>
  4352. ; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
  4353. ; 1520 : _Myt&>::type
  4354. ; 1521 : replace(const_iterator _First, const_iterator _Last,
  4355. ; 1522 : _Iter _First2, _Iter _Last2)
  4356. ; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
  4357. ; 1524 : _Myt _Right(_First2, _Last2);
  4358. ; 1525 : replace(_First, _Last, _Right);
  4359. ; 1526 : return (*this);
  4360. ; 1527 : }
  4361. ; 1528 :
  4362. ; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
  4363. ; 1530 : const_pointer _First2, const_pointer _Last2)
  4364. ; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  4365. ; 1532 : if (_First2 == _Last2)
  4366. ; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  4367. ; 1534 : else
  4368. ; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  4369. ; 1536 : &*_First2, _Last2 - _First2);
  4370. ; 1537 : return (*this);
  4371. ; 1538 : }
  4372. ; 1539 :
  4373. ; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
  4374. ; 1541 : pointer _First2, pointer _Last2)
  4375. ; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  4376. ; 1543 : if (_First2 == _Last2)
  4377. ; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  4378. ; 1545 : else
  4379. ; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  4380. ; 1547 : &*_First2, _Last2 - _First2);
  4381. ; 1548 : return (*this);
  4382. ; 1549 : }
  4383. ; 1550 :
  4384. ; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
  4385. ; 1552 : const_iterator _First2, const_iterator _Last2)
  4386. ; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  4387. ; 1554 : if (_First2 == _Last2)
  4388. ; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  4389. ; 1556 : else
  4390. ; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  4391. ; 1558 : &*_First2, _Last2 - _First2);
  4392. ; 1559 : return (*this);
  4393. ; 1560 : }
  4394. ; 1561 :
  4395. ; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
  4396. ; 1563 : iterator _First2, iterator _Last2)
  4397. ; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  4398. ; 1565 : if (_First2 == _Last2)
  4399. ; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  4400. ; 1567 : else
  4401. ; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  4402. ; 1569 : &*_First2, _Last2 - _First2);
  4403. ; 1570 : return (*this);
  4404. ; 1571 : }
  4405. ; 1572 :
  4406. ; 1573 : iterator begin() _NOEXCEPT
  4407. ; 1574 : { // return iterator for beginning of mutable sequence
  4408. ; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
  4409. ; 1576 : }
  4410. ; 1577 :
  4411. ; 1578 : const_iterator begin() const _NOEXCEPT
  4412. ; 1579 : { // return iterator for beginning of nonmutable sequence
  4413. ; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
  4414. ; 1581 : }
  4415. ; 1582 :
  4416. ; 1583 : iterator end() _NOEXCEPT
  4417. ; 1584 : { // return iterator for end of mutable sequence
  4418. ; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
  4419. ; 1586 : }
  4420. ; 1587 :
  4421. ; 1588 : const_iterator end() const _NOEXCEPT
  4422. ; 1589 : { // return iterator for end of nonmutable sequence
  4423. ; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
  4424. ; 1591 : }
  4425. ; 1592 :
  4426. ; 1593 : reverse_iterator rbegin() _NOEXCEPT
  4427. ; 1594 : { // return iterator for beginning of reversed mutable sequence
  4428. ; 1595 : return (reverse_iterator(end()));
  4429. ; 1596 : }
  4430. ; 1597 :
  4431. ; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
  4432. ; 1599 : { // return iterator for beginning of reversed nonmutable sequence
  4433. ; 1600 : return (const_reverse_iterator(end()));
  4434. ; 1601 : }
  4435. ; 1602 :
  4436. ; 1603 : reverse_iterator rend() _NOEXCEPT
  4437. ; 1604 : { // return iterator for end of reversed mutable sequence
  4438. ; 1605 : return (reverse_iterator(begin()));
  4439. ; 1606 : }
  4440. ; 1607 :
  4441. ; 1608 : const_reverse_iterator rend() const _NOEXCEPT
  4442. ; 1609 : { // return iterator for end of reversed nonmutable sequence
  4443. ; 1610 : return (const_reverse_iterator(begin()));
  4444. ; 1611 : }
  4445. ; 1612 :
  4446. ; 1613 : #if _HAS_CPP0X
  4447. ; 1614 : const_iterator cbegin() const _NOEXCEPT
  4448. ; 1615 : { // return iterator for beginning of nonmutable sequence
  4449. ; 1616 : return (((const _Myt *)this)->begin());
  4450. ; 1617 : }
  4451. ; 1618 :
  4452. ; 1619 : const_iterator cend() const _NOEXCEPT
  4453. ; 1620 : { // return iterator for end of nonmutable sequence
  4454. ; 1621 : return (((const _Myt *)this)->end());
  4455. ; 1622 : }
  4456. ; 1623 :
  4457. ; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
  4458. ; 1625 : { // return iterator for beginning of reversed nonmutable sequence
  4459. ; 1626 : return (((const _Myt *)this)->rbegin());
  4460. ; 1627 : }
  4461. ; 1628 :
  4462. ; 1629 : const_reverse_iterator crend() const _NOEXCEPT
  4463. ; 1630 : { // return iterator for end of reversed nonmutable sequence
  4464. ; 1631 : return (((const _Myt *)this)->rend());
  4465. ; 1632 : }
  4466. ; 1633 :
  4467. ; 1634 : void shrink_to_fit()
  4468. ; 1635 : { // reduce capacity
  4469. ; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
  4470. ; 1637 : { // worth shrinking, do it
  4471. ; 1638 : _Myt _Tmp(*this);
  4472. ; 1639 : swap(_Tmp);
  4473. ; 1640 : }
  4474. ; 1641 : }
  4475. ; 1642 : #endif /* _HAS_CPP0X */
  4476. ; 1643 :
  4477. ; 1644 : reference at(size_type _Off)
  4478. ; 1645 : { // subscript mutable sequence with checking
  4479. ; 1646 : if (this->_Mysize <= _Off)
  4480. ; 1647 : _Xran(); // _Off off end
  4481. ; 1648 : return (this->_Myptr()[_Off]);
  4482. ; 1649 : }
  4483. ; 1650 :
  4484. ; 1651 : const_reference at(size_type _Off) const
  4485. ; 1652 : { // subscript nonmutable sequence with checking
  4486. ; 1653 : if (this->_Mysize <= _Off)
  4487. ; 1654 : _Xran(); // _Off off end
  4488. ; 1655 : return (this->_Myptr()[_Off]);
  4489. ; 1656 : }
  4490. ; 1657 :
  4491. ; 1658 : reference operator[](size_type _Off)
  4492. ; 1659 : { // subscript mutable sequence
  4493. ; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
  4494. ; 1661 : if (this->_Mysize < _Off) // sic
  4495. ; 1662 : _DEBUG_ERROR("string subscript out of range");
  4496. ; 1663 :
  4497. ; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
  4498. ; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  4499. ; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4500. ; 1667 :
  4501. ; 1668 : return (this->_Myptr()[_Off]);
  4502. ; 1669 : }
  4503. ; 1670 :
  4504. ; 1671 : const_reference operator[](size_type _Off) const
  4505. ; 1672 : { // subscript nonmutable sequence
  4506. ; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
  4507. ; 1674 : if (this->_Mysize < _Off) // sic
  4508. ; 1675 : _DEBUG_ERROR("string subscript out of range");
  4509. ; 1676 :
  4510. ; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
  4511. ; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  4512. ; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4513. ; 1680 :
  4514. ; 1681 : return (this->_Myptr()[_Off]);
  4515. ; 1682 : }
  4516. ; 1683 :
  4517. ; 1684 : void push_back(_Elem _Ch)
  4518. ; 1685 : { // insert element at end
  4519. ; 1686 : insert(end(), _Ch);
  4520. ; 1687 : }
  4521. ; 1688 :
  4522. ; 1689 : #if _HAS_CPP0X
  4523. ; 1690 : void pop_back()
  4524. ; 1691 : { // erase element at end
  4525. ; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
  4526. ; 1693 : }
  4527. ; 1694 :
  4528. ; 1695 : reference front()
  4529. ; 1696 : { // return first element of mutable sequence
  4530. ; 1697 : return (*begin());
  4531. ; 1698 : }
  4532. ; 1699 :
  4533. ; 1700 : const_reference front() const
  4534. ; 1701 : { // return first element of nonmutable sequence
  4535. ; 1702 : return (*begin());
  4536. ; 1703 : }
  4537. ; 1704 :
  4538. ; 1705 : reference back()
  4539. ; 1706 : { // return last element of mutable sequence
  4540. ; 1707 : return (*(end() - 1));
  4541. ; 1708 : }
  4542. ; 1709 :
  4543. ; 1710 : const_reference back() const
  4544. ; 1711 : { // return last element of nonmutable sequence
  4545. ; 1712 : return (*(end() - 1));
  4546. ; 1713 : }
  4547. ; 1714 : #endif /* _HAS_CPP0X */
  4548. ; 1715 :
  4549. ; 1716 : const _Elem *c_str() const _NOEXCEPT
  4550. ; 1717 : { // return pointer to null-terminated nonmutable array
  4551. ; 1718 : return (this->_Myptr());
  4552. ; 1719 : }
  4553. ; 1720 :
  4554. ; 1721 : const _Elem *data() const _NOEXCEPT
  4555. ; 1722 : { // return pointer to nonmutable array
  4556. ; 1723 : return (c_str());
  4557. ; 1724 : }
  4558. ; 1725 :
  4559. ; 1726 : size_type length() const _NOEXCEPT
  4560. ; 1727 : { // return length of sequence
  4561. ; 1728 : return (this->_Mysize);
  4562. ; 1729 : }
  4563. ; 1730 :
  4564. ; 1731 : size_type size() const _NOEXCEPT
  4565. ; 1732 : { // return length of sequence
  4566. ; 1733 : return (this->_Mysize);
  4567. ; 1734 : }
  4568. ; 1735 :
  4569. ; 1736 : size_type max_size() const _NOEXCEPT
  4570. ; 1737 : { // return maximum possible length of sequence
  4571. ; 1738 : size_type _Num = this->_Getal().max_size();
  4572. ; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
  4573. ; 1740 : }
  4574. ; 1741 :
  4575. ; 1742 : void resize(size_type _Newsize)
  4576. ; 1743 : { // determine new length, padding with null elements as needed
  4577. ; 1744 : resize(_Newsize, _Elem());
  4578. ; 1745 : }
  4579. ; 1746 :
  4580. ; 1747 : void resize(size_type _Newsize, _Elem _Ch)
  4581. ; 1748 : { // determine new length, padding with _Ch elements as needed
  4582. ; 1749 : if (_Newsize <= this->_Mysize)
  4583. ; 1750 : _Eos(_Newsize);
  4584. ; 1751 : else
  4585. ; 1752 : append(_Newsize - this->_Mysize, _Ch);
  4586. ; 1753 : }
  4587. ; 1754 :
  4588. ; 1755 : size_type capacity() const _NOEXCEPT
  4589. ; 1756 : { // return current length of allocated storage
  4590. ; 1757 : return (this->_Myres);
  4591. ; 1758 : }
  4592. ; 1759 :
  4593. ; 1760 : void reserve(size_type _Newcap = 0)
  4594. ; 1761 : { // determine new minimum length of allocated storage
  4595. ; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
  4596. ; 1763 : { // change reservation
  4597. ; 1764 : size_type _Size = this->_Mysize;
  4598. ; 1765 : if (_Grow(_Newcap, true))
  4599. ; 1766 : _Eos(_Size);
  4600. ; 1767 : }
  4601. ; 1768 : }
  4602. ; 1769 :
  4603. ; 1770 : bool empty() const _NOEXCEPT
  4604. ; 1771 : { // test if sequence is empty
  4605. ; 1772 : return (this->_Mysize == 0);
  4606. ; 1773 : }
  4607. ; 1774 :
  4608. ; 1775 : _SCL_INSECURE_DEPRECATE
  4609. ; 1776 :
  4610. ; 1777 : size_type copy(_Elem *_Ptr,
  4611. ; 1778 : size_type _Count, size_type _Off = 0) const
  4612. ; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
  4613. ; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
  4614. ; 1781 : if (_Count != 0)
  4615. ; 1782 : _DEBUG_POINTER(_Ptr);
  4616. ; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4617. ; 1784 :
  4618. ; 1785 : if (this->_Mysize < _Off)
  4619. ; 1786 : _Xran(); // _Off off end
  4620. ; 1787 : if (this->_Mysize - _Off < _Count)
  4621. ; 1788 : _Count = this->_Mysize - _Off;
  4622. ; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
  4623. ; 1790 : return (_Count);
  4624. ; 1791 : }
  4625. ; 1792 :
  4626. ; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
  4627. ; 1794 : size_type _Count, size_type _Off = 0) const
  4628. ; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
  4629. ; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
  4630. ; 1797 : if (_Count != 0)
  4631. ; 1798 : _DEBUG_POINTER(_Dest);
  4632. ; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4633. ; 1800 :
  4634. ; 1801 : if (this->_Mysize < _Off)
  4635. ; 1802 : _Xran(); // _Off off end
  4636. ; 1803 : if (this->_Mysize - _Off < _Count)
  4637. ; 1804 : _Count = this->_Mysize - _Off;
  4638. ; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
  4639. ; 1806 : return (_Count);
  4640. ; 1807 : }
  4641. ; 1808 :
  4642. ; 1809 : void _Swap_bx(_Myt& _Right)
  4643. ; 1810 : { // exchange _Bx with _Right._Bx
  4644. ; 1811 : if (this->_BUF_SIZE <= this->_Myres)
  4645. ; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
  4646. ; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
  4647. ; 1814 : else
  4648. ; 1815 : { // swap large with small
  4649. ; 1816 : pointer _Ptr = this->_Bx._Ptr;
  4650. ; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
  4651. ; 1818 : _Traits::copy(this->_Bx._Buf,
  4652. ; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
  4653. ; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
  4654. ; 1821 : }
  4655. ; 1822 : else
  4656. ; 1823 : if (_Right._Myres < this->_BUF_SIZE)
  4657. ; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
  4658. ; 1825 : else
  4659. ; 1826 : { // swap small with large
  4660. ; 1827 : pointer _Ptr = _Right._Bx._Ptr;
  4661. ; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
  4662. ; 1829 : _Traits::copy(_Right._Bx._Buf,
  4663. ; 1830 : this->_Bx._Buf, this->_Mysize + 1);
  4664. ; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  4665. ; 1832 : }
  4666. ; 1833 : }
  4667. ; 1834 :
  4668. ; 1835 : void swap(_Myt& _Right)
  4669. ; 1836 : { // exchange contents with _Right
  4670. ; 1837 : if (this == &_Right)
  4671. ; 1838 : ; // same object, do nothing
  4672. ; 1839 : else if (this->_Getal() == _Right._Getal())
  4673. ; 1840 : { // same allocator, swap control information
  4674. ; 1841 : this->_Swap_all(_Right);
  4675. ; 1842 : _Swap_bx(_Right);
  4676. ; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
  4677. ; 1844 : _STD swap(this->_Myres, _Right._Myres);
  4678. ; 1845 : }
  4679. ; 1846 :
  4680. ; 1847 : #if _HAS_CPP0X
  4681. ; 1848 : else if (_Alty::propagate_on_container_swap::value)
  4682. ; 1849 : { // swap allocators and control information
  4683. ; 1850 : this->_Swap_alloc(_Right);
  4684. ; 1851 : _Swap_bx(_Right);
  4685. ; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
  4686. ; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
  4687. ; 1854 : _STD swap(this->_Myres, _Right._Myres);
  4688. ; 1855 : }
  4689. ; 1856 : #endif /* _HAS_CPP0X */
  4690. ; 1857 :
  4691. ; 1858 : else
  4692. ; 1859 : { // different allocator, do multiple assigns
  4693. ; 1860 : _Myt _Tmp = *this;
  4694. ; 1861 :
  4695. ; 1862 : *this = _Right;
  4696. ; 1863 : _Right = _Tmp;
  4697. ; 1864 : }
  4698. ; 1865 : }
  4699. ; 1866 :
  4700. ; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
  4701. ; 1868 : { // look for _Right beginning at or after _Off
  4702. ; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
  4703. ; 1870 : }
  4704. ; 1871 :
  4705. ; 1872 : size_type find(const _Elem *_Ptr,
  4706. ; 1873 : size_type _Off, size_type _Count) const
  4707. ; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
  4708. ; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
  4709. ; 1876 : if (_Count != 0)
  4710. ; 1877 : _DEBUG_POINTER(_Ptr);
  4711. ; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4712. ; 1879 :
  4713. ; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
  4714. ; 1881 : return (_Off); // null string always matches (if inside string)
  4715. ; 1882 :
  4716. ; 1883 : size_type _Nm;
  4717. ; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
  4718. ; 1885 : { // room for match, look for it
  4719. ; 1886 : const _Elem *_Uptr, *_Vptr;
  4720. ; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
  4721. ; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
  4722. ; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
  4723. ; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
  4724. ; 1891 : return (_Uptr - this->_Myptr()); // found a match
  4725. ; 1892 : }
  4726. ; 1893 :
  4727. ; 1894 : return (npos); // no match
  4728. ; 1895 : }
  4729. ; 1896 :
  4730. ; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
  4731. ; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
  4732. ; 1899 : _DEBUG_POINTER(_Ptr);
  4733. ; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
  4734. ; 1901 : }
  4735. ; 1902 :
  4736. ; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
  4737. ; 1904 : { // look for _Ch at or after _Off
  4738. ; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
  4739. ; 1906 : }
  4740. ; 1907 :
  4741. ; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
  4742. ; 1909 : { // look for _Right beginning before _Off
  4743. ; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
  4744. ; 1911 : }
  4745. ; 1912 :
  4746. ; 1913 : size_type rfind(const _Elem *_Ptr,
  4747. ; 1914 : size_type _Off, size_type _Count) const
  4748. ; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
  4749. ; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
  4750. ; 1917 : if (_Count != 0)
  4751. ; 1918 : _DEBUG_POINTER(_Ptr);
  4752. ; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4753. ; 1920 :
  4754. ; 1921 : if (_Count == 0)
  4755. ; 1922 : return (_Off < this->_Mysize ? _Off
  4756. ; 1923 : : this->_Mysize); // null always matches
  4757. ; 1924 : if (_Count <= this->_Mysize)
  4758. ; 1925 : { // room for match, look for it
  4759. ; 1926 : const _Elem *_Uptr = this->_Myptr() +
  4760. ; 1927 : (_Off < this->_Mysize - _Count ? _Off
  4761. ; 1928 : : this->_Mysize - _Count);
  4762. ; 1929 : for (; ; --_Uptr)
  4763. ; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
  4764. ; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
  4765. ; 1932 : return (_Uptr - this->_Myptr()); // found a match
  4766. ; 1933 : else if (_Uptr == this->_Myptr())
  4767. ; 1934 : break; // at beginning, no more chance for match
  4768. ; 1935 : }
  4769. ; 1936 :
  4770. ; 1937 : return (npos); // no match
  4771. ; 1938 : }
  4772. ; 1939 :
  4773. ; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
  4774. ; 1941 : { // look for [_Ptr, <null>) beginning before _Off
  4775. ; 1942 : _DEBUG_POINTER(_Ptr);
  4776. ; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
  4777. ; 1944 : }
  4778. ; 1945 :
  4779. ; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
  4780. ; 1947 : { // look for _Ch before _Off
  4781. ; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  4782. ; 1949 : }
  4783. ; 1950 :
  4784. ; 1951 : size_type find_first_of(const _Myt& _Right,
  4785. ; 1952 : size_type _Off = 0) const _NOEXCEPT
  4786. ; 1953 : { // look for one of _Right at or after _Off
  4787. ; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
  4788. ; 1955 : }
  4789. ; 1956 :
  4790. ; 1957 : size_type find_first_of(const _Elem *_Ptr,
  4791. ; 1958 : size_type _Off, size_type _Count) const
  4792. ; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
  4793. ; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
  4794. ; 1961 : if (_Count != 0)
  4795. ; 1962 : _DEBUG_POINTER(_Ptr);
  4796. ; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4797. ; 1964 :
  4798. ; 1965 : if (0 < _Count && _Off < this->_Mysize)
  4799. ; 1966 : { // room for match, look for it
  4800. ; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  4801. ; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  4802. ; 1969 : _Uptr < _Vptr; ++_Uptr)
  4803. ; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  4804. ; 1971 : return (_Uptr - this->_Myptr()); // found a match
  4805. ; 1972 : }
  4806. ; 1973 :
  4807. ; 1974 : return (npos); // no match
  4808. ; 1975 : }
  4809. ; 1976 :
  4810. ; 1977 : size_type find_first_of(const _Elem *_Ptr,
  4811. ; 1978 : size_type _Off = 0) const
  4812. ; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
  4813. ; 1980 : _DEBUG_POINTER(_Ptr);
  4814. ; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
  4815. ; 1982 : }
  4816. ; 1983 :
  4817. ; 1984 : size_type find_first_of(_Elem _Ch,
  4818. ; 1985 : size_type _Off = 0) const
  4819. ; 1986 : { // look for _Ch at or after _Off
  4820. ; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
  4821. ; 1988 : }
  4822. ; 1989 :
  4823. ; 1990 : size_type find_last_of(const _Myt& _Right,
  4824. ; 1991 : size_type _Off = npos) const _NOEXCEPT
  4825. ; 1992 : { // look for one of _Right before _Off
  4826. ; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
  4827. ; 1994 : }
  4828. ; 1995 :
  4829. ; 1996 : size_type find_last_of(const _Elem *_Ptr,
  4830. ; 1997 : size_type _Off, size_type _Count) const
  4831. ; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
  4832. ; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
  4833. ; 2000 : if (_Count != 0)
  4834. ; 2001 : _DEBUG_POINTER(_Ptr);
  4835. ; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4836. ; 2003 :
  4837. ; 2004 : if (0 < _Count && 0 < this->_Mysize)
  4838. ; 2005 : { // worth searching, do it
  4839. ; 2006 : const _Elem *_Uptr = this->_Myptr()
  4840. ; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  4841. ; 2008 : for (; ; --_Uptr)
  4842. ; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  4843. ; 2010 : return (_Uptr - this->_Myptr()); // found a match
  4844. ; 2011 : else if (_Uptr == this->_Myptr())
  4845. ; 2012 : break; // at beginning, no more chance for match
  4846. ; 2013 : }
  4847. ; 2014 :
  4848. ; 2015 : return (npos); // no match
  4849. ; 2016 : }
  4850. ; 2017 :
  4851. ; 2018 : size_type find_last_of(const _Elem *_Ptr,
  4852. ; 2019 : size_type _Off = npos) const
  4853. ; 2020 : { // look for one of [_Ptr, <null>) before _Off
  4854. ; 2021 : _DEBUG_POINTER(_Ptr);
  4855. ; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
  4856. ; 2023 : }
  4857. ; 2024 :
  4858. ; 2025 : size_type find_last_of(_Elem _Ch,
  4859. ; 2026 : size_type _Off = npos) const
  4860. ; 2027 : { // look for _Ch before _Off
  4861. ; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  4862. ; 2029 : }
  4863. ; 2030 :
  4864. ; 2031 : size_type find_first_not_of(const _Myt& _Right,
  4865. ; 2032 : size_type _Off = 0) const _NOEXCEPT
  4866. ; 2033 : { // look for none of _Right at or after _Off
  4867. ; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
  4868. ; 2035 : _Right.size()));
  4869. ; 2036 : }
  4870. ; 2037 :
  4871. ; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
  4872. ; 2039 : size_type _Off, size_type _Count) const
  4873. ; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
  4874. ; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
  4875. ; 2042 : if (_Count != 0)
  4876. ; 2043 : _DEBUG_POINTER(_Ptr);
  4877. ; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4878. ; 2045 :
  4879. ; 2046 : if (_Off < this->_Mysize)
  4880. ; 2047 : { // room for match, look for it
  4881. ; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  4882. ; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  4883. ; 2050 : _Uptr < _Vptr; ++_Uptr)
  4884. ; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  4885. ; 2052 : return (_Uptr - this->_Myptr());
  4886. ; 2053 : }
  4887. ; 2054 : return (npos);
  4888. ; 2055 : }
  4889. ; 2056 :
  4890. ; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
  4891. ; 2058 : size_type _Off = 0) const
  4892. ; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
  4893. ; 2060 : _DEBUG_POINTER(_Ptr);
  4894. ; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  4895. ; 2062 : }
  4896. ; 2063 :
  4897. ; 2064 : size_type find_first_not_of(_Elem _Ch,
  4898. ; 2065 : size_type _Off = 0) const
  4899. ; 2066 : { // look for non _Ch at or after _Off
  4900. ; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
  4901. ; 2068 : }
  4902. ; 2069 :
  4903. ; 2070 : size_type find_last_not_of(const _Myt& _Right,
  4904. ; 2071 : size_type _Off = npos) const _NOEXCEPT
  4905. ; 2072 : { // look for none of _Right before _Off
  4906. ; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
  4907. ; 2074 : }
  4908. ; 2075 :
  4909. ; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
  4910. ; 2077 : size_type _Off, size_type _Count) const
  4911. ; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
  4912. ; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
  4913. ; 2080 : if (_Count != 0)
  4914. ; 2081 : _DEBUG_POINTER(_Ptr);
  4915. ; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4916. ; 2083 :
  4917. ; 2084 : if (0 < this->_Mysize)
  4918. ; 2085 : { // worth searching, do it
  4919. ; 2086 : const _Elem *_Uptr = this->_Myptr()
  4920. ; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  4921. ; 2088 : for (; ; --_Uptr)
  4922. ; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  4923. ; 2090 : return (_Uptr - this->_Myptr());
  4924. ; 2091 : else if (_Uptr == this->_Myptr())
  4925. ; 2092 : break;
  4926. ; 2093 : }
  4927. ; 2094 : return (npos);
  4928. ; 2095 : }
  4929. ; 2096 :
  4930. ; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
  4931. ; 2098 : size_type _Off = npos) const
  4932. ; 2099 : { // look for none of [_Ptr, <null>) before _Off
  4933. ; 2100 : _DEBUG_POINTER(_Ptr);
  4934. ; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  4935. ; 2102 : }
  4936. ; 2103 :
  4937. ; 2104 : size_type find_last_not_of(_Elem _Ch,
  4938. ; 2105 : size_type _Off = npos) const
  4939. ; 2106 : { // look for non _Ch before _Off
  4940. ; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
  4941. ; 2108 : }
  4942. ; 2109 :
  4943. ; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
  4944. ; 2111 : { // return [_Off, _Off + _Count) as new string
  4945. ; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
  4946. ; 2113 : }
  4947. ; 2114 :
  4948. ; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
  4949. ; 2116 : { // compare [0, _Mysize) with _Right
  4950. ; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
  4951. ; 2118 : }
  4952. ; 2119 :
  4953. ; 2120 : int compare(size_type _Off, size_type _N0,
  4954. ; 2121 : const _Myt& _Right) const
  4955. ; 2122 : { // compare [_Off, _Off + _N0) with _Right
  4956. ; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
  4957. ; 2124 : }
  4958. ; 2125 :
  4959. ; 2126 : int compare(size_type _Off,
  4960. ; 2127 : size_type _N0, const _Myt& _Right,
  4961. ; 2128 : size_type _Roff, size_type _Count) const
  4962. ; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  4963. ; 2130 : if (_Right.size() < _Roff)
  4964. ; 2131 : _Xran(); // _Off off end
  4965. ; 2132 : if (_Right._Mysize - _Roff < _Count)
  4966. ; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
  4967. ; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
  4968. ; 2135 : }
  4969. ; 2136 :
  4970. ; 2137 : int compare(const _Elem *_Ptr) const
  4971. ; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
  4972. ; 2139 : _DEBUG_POINTER(_Ptr);
  4973. ; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
  4974. ; 2141 : }
  4975. ; 2142 :
  4976. ; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
  4977. ; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
  4978. ; 2145 : _DEBUG_POINTER(_Ptr);
  4979. ; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  4980. ; 2147 : }
  4981. ; 2148 :
  4982. ; 2149 : int compare(size_type _Off,
  4983. ; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
  4984. ; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  4985. ; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
  4986. ; 2153 : if (_Count != 0)
  4987. ; 2154 : _DEBUG_POINTER(_Ptr);
  4988. ; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  4989. ; 2156 :
  4990. ; 2157 : if (this->_Mysize < _Off)
  4991. ; 2158 : _Xran(); // _Off off end
  4992. ; 2159 : if (this->_Mysize - _Off < _N0)
  4993. ; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  4994. ; 2161 :
  4995. ; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
  4996. ; 2163 : _N0 < _Count ? _N0 : _Count);
  4997. ; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
  4998. ; 2165 : : _N0 == _Count ? 0 : +1);
  4999. ; 2166 : }
  5000. ; 2167 :
  5001. ; 2168 : allocator_type get_allocator() const _NOEXCEPT
  5002. ; 2169 : { // return allocator object for values
  5003. ; 2170 : return (this->_Getal());
  5004. ; 2171 : }
  5005. ; 2172 :
  5006. ; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
  5007. ; 2174 : { // assign _Count copies of _Ch beginning at _Off
  5008. ; 2175 : if (_Count == 1)
  5009. ; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
  5010. ; 2177 : else
  5011. ; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
  5012. ; 2179 : }
  5013. ; 2180 :
  5014. ; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
  5015. ; 2182 : { // copy _Oldlen elements to newly allocated buffer
  5016. ; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
  5017. ; 2184 : if (max_size() < _Newres)
  5018. ; 2185 : _Newres = _Newsize; // undo roundup if too big
  5019. ; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
  5020. ; 2187 : ;
  5021. ; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
  5022. ; 2189 : _Newres = this->_Myres
  5023. ; 2190 : + this->_Myres / 2; // grow exponentially if possible
  5024. ; 2191 : else
  5025. ; 2192 : _Newres = max_size(); // settle for max_size()
  5026. ; 2193 :
  5027. ; 2194 : _Elem *_Ptr;
  5028. ; 2195 : _TRY_BEGIN
  5029. ; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
  5030. ; 2197 : _CATCH_ALL
  5031. ; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
  5032. ; 2199 : _TRY_BEGIN
  5033. ; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
  5034. ; 2201 : _CATCH_ALL
  5035. ; 2202 : _Tidy(true); // failed again, discard storage and reraise
  5036. ; 2203 : _RERAISE;
  5037. ; 2204 : _CATCH_END
  5038. ; 2205 : _CATCH_END
  5039. ; 2206 :
  5040. ; 2207 : if (0 < _Oldlen)
  5041. ; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
  5042. ; 2209 : _Oldlen); // copy existing elements
  5043. ; 2210 : _Tidy(true);
  5044. ; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  5045. ; 2212 : this->_Myres = _Newres;
  5046. ; 2213 : _Eos(_Oldlen);
  5047. ; 2214 : }
  5048. ; 2215 :
  5049. ; 2216 : void _Eos(size_type _Newsize)
  5050. ; 2217 : { // set new length and null terminator
  5051. ; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
  5052.  
  5053. mov DWORD PTR [esi+16], 0
  5054. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  5055.  
  5056. ; 564 : _Left = _Right;
  5057.  
  5058. mov BYTE PTR [esi], 0
  5059.  
  5060. ; 523 : : _CSTD strlen(_First));
  5061.  
  5062. cmp BYTE PTR [edx], 0
  5063. jne SHORT $LN47@message
  5064. xor ecx, ecx
  5065. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  5066.  
  5067. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  5068.  
  5069. push ecx
  5070. push edx
  5071. mov ecx, esi
  5072. 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
  5073. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  5074.  
  5075. ; 636 : return (string(_Name != 0 ? _Name : "unknown error"));
  5076.  
  5077. mov eax, esi
  5078. pop esi
  5079.  
  5080. ; 637 : }
  5081.  
  5082. mov esp, ebp
  5083. pop ebp
  5084. ret 8
  5085. $LN47@message:
  5086. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  5087.  
  5088. ; 523 : : _CSTD strlen(_First));
  5089.  
  5090. mov ecx, edx
  5091. push edi
  5092. lea edi, DWORD PTR [ecx+1]
  5093. $LL49@message:
  5094. mov al, BYTE PTR [ecx]
  5095. inc ecx
  5096. test al, al
  5097. jne SHORT $LL49@message
  5098. sub ecx, edi
  5099. pop edi
  5100. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  5101.  
  5102. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  5103.  
  5104. push ecx
  5105. push edx
  5106. mov ecx, esi
  5107. 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
  5108. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  5109.  
  5110. ; 636 : return (string(_Name != 0 ? _Name : "unknown error"));
  5111.  
  5112. mov eax, esi
  5113. pop esi
  5114.  
  5115. ; 637 : }
  5116.  
  5117. mov esp, ebp
  5118. pop ebp
  5119. ret 8
  5120. ?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
  5121. _TEXT ENDS
  5122. ; Function compile flags: /Ogtp
  5123. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  5124. ; COMDAT ?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z
  5125. _TEXT SEGMENT
  5126. ___$ReturnUdt$ = 8 ; size = 4
  5127. __Errval$ = 12 ; size = 4
  5128. ?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z PROC ; std::_System_error_category::default_error_condition, COMDAT
  5129. ; _this$ = ecx
  5130.  
  5131. ; 641 : { // make error_condition for error code (generic if possible)
  5132.  
  5133. push ebp
  5134. mov ebp, esp
  5135. push esi
  5136.  
  5137. ; 642 : if (_Syserror_map(_Errval))
  5138.  
  5139. mov esi, DWORD PTR __Errval$[ebp]
  5140. push esi
  5141. call DWORD PTR __imp_?_Syserror_map@std@@YAPBDH@Z
  5142. add esp, 4
  5143. test eax, eax
  5144.  
  5145. ; 316 : { // construct from error code and category
  5146.  
  5147. mov eax, DWORD PTR ___$ReturnUdt$[ebp]
  5148. mov DWORD PTR [eax], esi
  5149.  
  5150. ; 642 : if (_Syserror_map(_Errval))
  5151.  
  5152. je SHORT $LN2@default_er
  5153.  
  5154. ; 316 : { // construct from error code and category
  5155.  
  5156. mov DWORD PTR [eax+4], OFFSET ?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A ; std::_Error_objects<int>::_Generic_object
  5157. pop esi
  5158.  
  5159. ; 643 : return (error_condition(_Errval, generic_category()));
  5160. ; 644 : else
  5161. ; 645 : return (error_condition(_Errval, system_category()));
  5162. ; 646 : }
  5163.  
  5164. pop ebp
  5165. ret 8
  5166. $LN2@default_er:
  5167.  
  5168. ; 316 : { // construct from error code and category
  5169.  
  5170. mov DWORD PTR [eax+4], OFFSET ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A ; std::_Error_objects<int>::_System_object
  5171. pop esi
  5172.  
  5173. ; 643 : return (error_condition(_Errval, generic_category()));
  5174. ; 644 : else
  5175. ; 645 : return (error_condition(_Errval, system_category()));
  5176. ; 646 : }
  5177.  
  5178. pop ebp
  5179. ret 8
  5180. ?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z ENDP ; std::_System_error_category::default_error_condition
  5181. _TEXT ENDS
  5182. ; Function compile flags: /Ogtp
  5183. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  5184. ; COMDAT ??_G_System_error_category@std@@UAEPAXI@Z
  5185. _TEXT SEGMENT
  5186. ___flags$ = 8 ; size = 4
  5187. ??_G_System_error_category@std@@UAEPAXI@Z PROC ; std::_System_error_category::`scalar deleting destructor', COMDAT
  5188. ; _this$ = ecx
  5189. push ebp
  5190. mov ebp, esp
  5191. test BYTE PTR ___flags$[ebp], 1
  5192. push esi
  5193. mov esi, ecx
  5194.  
  5195. ; 167 : { // destroy the object
  5196.  
  5197. mov DWORD PTR [esi], OFFSET ??_7error_category@std@@6B@
  5198. je SHORT $LN10@scalar
  5199. push esi
  5200. call DWORD PTR __imp_??3@YAXPAX@Z
  5201. add esp, 4
  5202. $LN10@scalar:
  5203. mov eax, esi
  5204. pop esi
  5205. pop ebp
  5206. ret 4
  5207. ??_G_System_error_category@std@@UAEPAXI@Z ENDP ; std::_System_error_category::`scalar deleting destructor'
  5208. _TEXT ENDS
  5209. ; Function compile flags: /Ogtp
  5210. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  5211. ; COMDAT ??1_System_error_category@std@@UAE@XZ
  5212. _TEXT SEGMENT
  5213. ??1_System_error_category@std@@UAE@XZ PROC ; std::_System_error_category::~_System_error_category, COMDAT
  5214. ; _this$ = ecx
  5215.  
  5216. ; 167 : { // destroy the object
  5217.  
  5218. mov DWORD PTR [ecx], OFFSET ??_7error_category@std@@6B@
  5219. ret 0
  5220. ??1_System_error_category@std@@UAE@XZ ENDP ; std::_System_error_category::~_System_error_category
  5221. _TEXT ENDS
  5222. ; Function compile flags: /Ogtp
  5223. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  5224. ; COMDAT ?generic_category@std@@YAABVerror_category@1@XZ
  5225. _TEXT SEGMENT
  5226. ?generic_category@std@@YAABVerror_category@1@XZ PROC ; std::generic_category, COMDAT
  5227.  
  5228. ; 670 : return (_Error_objects<int>::_Generic_object);
  5229.  
  5230. mov eax, OFFSET ?_Generic_object@?$_Error_objects@H@std@@2V_Generic_error_category@2@A ; std::_Error_objects<int>::_Generic_object
  5231.  
  5232. ; 671 : }
  5233.  
  5234. ret 0
  5235. ?generic_category@std@@YAABVerror_category@1@XZ ENDP ; std::generic_category
  5236. _TEXT ENDS
  5237. ; Function compile flags: /Ogtp
  5238. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\system_error
  5239. ; COMDAT ?system_category@std@@YAABVerror_category@1@XZ
  5240. _TEXT SEGMENT
  5241. ?system_category@std@@YAABVerror_category@1@XZ PROC ; std::system_category, COMDAT
  5242.  
  5243. ; 680 : return (_Error_objects<int>::_System_object);
  5244.  
  5245. mov eax, OFFSET ?_System_object@?$_Error_objects@H@std@@2V_System_error_category@2@A ; std::_Error_objects<int>::_System_object
  5246.  
  5247. ; 681 : }
  5248.  
  5249. ret 0
  5250. ?system_category@std@@YAABVerror_category@1@XZ ENDP ; std::system_category
  5251. _TEXT ENDS
  5252. ; Function compile flags: /Ogtp
  5253. ; File e:\программирование\any\any\any.cpp
  5254. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5255. ; File e:\программирование\any\any\any.cpp
  5256. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5257. ; File e:\программирование\any\any\any.cpp
  5258. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5259. ; File e:\программирование\any\any\any.cpp
  5260. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5261. ; File e:\программирование\any\any\any.cpp
  5262. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5263. ; File e:\программирование\any\any\any.cpp
  5264. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5265. ; File e:\программирование\any\any\any.cpp
  5266. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5267. ; File e:\программирование\any\any\any.cpp
  5268. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5269. ; File e:\программирование\any\any\any.cpp
  5270. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5271. ; File e:\программирование\any\any\any.cpp
  5272. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5273. ; File e:\программирование\any\any\any.cpp
  5274. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5275. ; File e:\программирование\any\any\any.cpp
  5276. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5277. ; File e:\программирование\any\any\any.cpp
  5278. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5279. ; File e:\программирование\any\any\any.cpp
  5280. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5281. ; File e:\программирование\any\any\any.cpp
  5282. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5283. ; File e:\программирование\any\any\any.cpp
  5284. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5285. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  5286. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5287. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  5288. ; File e:\программирование\any\any\any.cpp
  5289. ; COMDAT _main
  5290. _TEXT SEGMENT
  5291. _vec1$ = -64 ; size = 12
  5292. _vec2$ = -52 ; size = 12
  5293. _res1$ = -40 ; size = 12
  5294. _res2$ = -28 ; size = 12
  5295. __$EHRec$ = -12 ; size = 12
  5296. _main PROC ; COMDAT
  5297.  
  5298. ; 149 : int main(){
  5299.  
  5300. push ebp
  5301. mov ebp, esp
  5302. and esp, -8 ; fffffff8H
  5303. push -1
  5304. push __ehhandler$_main
  5305. mov eax, DWORD PTR fs:0
  5306. push eax
  5307. sub esp, 56 ; 00000038H
  5308. push ebx
  5309. push esi
  5310. push edi
  5311. mov eax, DWORD PTR ___security_cookie
  5312. xor eax, esp
  5313. push eax
  5314. lea eax, DWORD PTR __$EHRec$[esp+84]
  5315. mov DWORD PTR fs:0, eax
  5316. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5317.  
  5318. ; 486 : _Myfirst = pointer();
  5319.  
  5320. mov DWORD PTR _res1$[esp+84], 0
  5321.  
  5322. ; 487 : _Mylast = pointer();
  5323.  
  5324. mov DWORD PTR _res1$[esp+88], 0
  5325.  
  5326. ; 488 : _Myend = pointer();
  5327.  
  5328. mov DWORD PTR _res1$[esp+92], 0
  5329. ; File e:\программирование\any\any\any.cpp
  5330.  
  5331. ; 150 : vector<int>res1,res2;
  5332.  
  5333. mov DWORD PTR __$EHRec$[esp+92], 0
  5334. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5335.  
  5336. ; 486 : _Myfirst = pointer();
  5337.  
  5338. mov DWORD PTR _res2$[esp+84], 0
  5339.  
  5340. ; 487 : _Mylast = pointer();
  5341.  
  5342. mov DWORD PTR _res2$[esp+88], 0
  5343.  
  5344. ; 488 : _Myend = pointer();
  5345.  
  5346. mov DWORD PTR _res2$[esp+92], 0
  5347. ; File e:\программирование\any\any\any.cpp
  5348.  
  5349. ; 150 : vector<int>res1,res2;
  5350.  
  5351. mov BYTE PTR __$EHRec$[esp+92], 1
  5352. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5353.  
  5354. ; 696 : resize(_Count);
  5355.  
  5356. push 1000 ; 000003e8H
  5357. lea ecx, DWORD PTR _vec1$[esp+88]
  5358.  
  5359. ; 486 : _Myfirst = pointer();
  5360.  
  5361. mov DWORD PTR _vec1$[esp+88], 0
  5362.  
  5363. ; 487 : _Mylast = pointer();
  5364.  
  5365. mov DWORD PTR _vec1$[esp+92], 0
  5366.  
  5367. ; 488 : _Myend = pointer();
  5368.  
  5369. mov DWORD PTR _vec1$[esp+96], 0
  5370.  
  5371. ; 696 : resize(_Count);
  5372.  
  5373. call ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ; std::vector<double,std::allocator<double> >::resize
  5374. ; File e:\программирование\any\any\any.cpp
  5375.  
  5376. ; 151 : vector<double>vec1(dim),vec2(N1);
  5377.  
  5378. mov BYTE PTR __$EHRec$[esp+92], 2
  5379. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5380.  
  5381. ; 696 : resize(_Count);
  5382.  
  5383. push 1000 ; 000003e8H
  5384. lea ecx, DWORD PTR _vec2$[esp+88]
  5385.  
  5386. ; 486 : _Myfirst = pointer();
  5387.  
  5388. mov DWORD PTR _vec2$[esp+88], 0
  5389.  
  5390. ; 487 : _Mylast = pointer();
  5391.  
  5392. mov DWORD PTR _vec2$[esp+92], 0
  5393.  
  5394. ; 488 : _Myend = pointer();
  5395.  
  5396. mov DWORD PTR _vec2$[esp+96], 0
  5397.  
  5398. ; 696 : resize(_Count);
  5399.  
  5400. call ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ; std::vector<double,std::allocator<double> >::resize
  5401. ; File e:\программирование\any\any\any.cpp
  5402.  
  5403. ; 151 : vector<double>vec1(dim),vec2(N1);
  5404.  
  5405. mov BYTE PTR __$EHRec$[esp+92], 3
  5406. movsd xmm0, QWORD PTR __real@3ff0000000000000
  5407. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5408.  
  5409. ; 486 : _Myfirst = pointer();
  5410.  
  5411. xor ecx, ecx
  5412. npad 7
  5413. $LL105@main:
  5414. ; File e:\программирование\any\any\any.cpp
  5415.  
  5416. ; 155 : vec1[k]=1;
  5417.  
  5418. mov eax, DWORD PTR _vec1$[esp+84]
  5419. add ecx, 8
  5420. movsd QWORD PTR [ecx+eax-8], xmm0
  5421. cmp ecx, 8000 ; 00001f40H
  5422. jl SHORT $LL105@main
  5423.  
  5424. ; 156 : }
  5425. ; 157 :
  5426. ; 158 : t = clock();
  5427.  
  5428. mov edi, DWORD PTR __imp__clock
  5429. call edi
  5430.  
  5431. ; 159 :
  5432. ; 160 : #pragma omp parallel shared(vec1) num_threads(4)
  5433.  
  5434. push 4
  5435. mov esi, eax
  5436. call __vcomp_set_num_threads
  5437. lea eax, DWORD PTR _vec1$[esp+88]
  5438. push eax
  5439. push OFFSET _main$omp$1
  5440. push 1
  5441. push 1
  5442. call __vcomp_fork
  5443. add esp, 20 ; 00000014H
  5444.  
  5445. ; 161 : {
  5446. ; 162 : double temp = 0;
  5447. ; 163 : int i,j,k;
  5448. ; 164 : #pragma omp for private(i)
  5449. ; 165 : for( i = 0; i<N1; i++){
  5450. ; 166 : for(j = 0; j<N2; j++){
  5451. ; 167 : for( k = 0; k<dim; k++){
  5452. ; 168 : temp+= j;
  5453. ; 169 : }
  5454. ; 170 : }
  5455. ; 171 : vec1[i]+=temp;
  5456. ; 172 : temp = 0;
  5457. ; 173 : }
  5458. ; 174 : }
  5459. ; 175 : tt = clock();
  5460.  
  5461. call edi
  5462.  
  5463. ; 176 : cout<<tt-t<<endl;
  5464.  
  5465. push DWORD PTR __imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z
  5466. mov ecx, DWORD PTR __imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A
  5467. sub eax, esi
  5468. push eax
  5469. call DWORD PTR __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z
  5470. mov ecx, eax
  5471. call DWORD PTR __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z
  5472. movsd xmm0, QWORD PTR __real@3ff0000000000000
  5473. xor ecx, ecx
  5474. npad 11
  5475. $LL107@main:
  5476.  
  5477. ; 177 : for(int k = 0; k<dim; k++){
  5478. ; 178 : vec1[k]=1;
  5479.  
  5480. mov eax, DWORD PTR _vec1$[esp+84]
  5481. add ecx, 8
  5482. movsd QWORD PTR [ecx+eax-8], xmm0
  5483. cmp ecx, 8000 ; 00001f40H
  5484. jl SHORT $LL107@main
  5485.  
  5486. ; 179 : }
  5487. ; 180 : t = clock();
  5488.  
  5489. call edi
  5490. mov ebx, eax
  5491. xor ecx, ecx
  5492. npad 5
  5493. $LL9@main:
  5494.  
  5495. ; 182 : for(int h = 0; h<N2; h++){
  5496.  
  5497. xor edx, edx
  5498. $LL6@main:
  5499. movd xmm1, edx
  5500. cvtdq2pd xmm1, xmm1
  5501.  
  5502. ; 183 : for(int y = 0; y<dim; y++){
  5503.  
  5504. mov esi, 100 ; 00000064H
  5505. npad 1
  5506. $LL3@main:
  5507. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5508.  
  5509. ; 1148 : return (*(this->_Myfirst + _Pos));
  5510.  
  5511. mov eax, DWORD PTR _vec1$[esp+84]
  5512. ; File e:\программирование\any\any\any.cpp
  5513.  
  5514. ; 184 : vec1[g]+=h;
  5515.  
  5516. movsd xmm0, QWORD PTR [ecx+eax]
  5517. addsd xmm0, xmm1
  5518. movsd QWORD PTR [ecx+eax], xmm0
  5519. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5520.  
  5521. ; 1148 : return (*(this->_Myfirst + _Pos));
  5522.  
  5523. mov eax, DWORD PTR _vec1$[esp+84]
  5524. ; File e:\программирование\any\any\any.cpp
  5525.  
  5526. ; 184 : vec1[g]+=h;
  5527.  
  5528. movsd xmm0, QWORD PTR [ecx+eax]
  5529. addsd xmm0, xmm1
  5530. movsd QWORD PTR [ecx+eax], xmm0
  5531. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5532.  
  5533. ; 1148 : return (*(this->_Myfirst + _Pos));
  5534.  
  5535. mov eax, DWORD PTR _vec1$[esp+84]
  5536. ; File e:\программирование\any\any\any.cpp
  5537.  
  5538. ; 184 : vec1[g]+=h;
  5539.  
  5540. movsd xmm0, QWORD PTR [ecx+eax]
  5541. addsd xmm0, xmm1
  5542. movsd QWORD PTR [ecx+eax], xmm0
  5543. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5544.  
  5545. ; 1148 : return (*(this->_Myfirst + _Pos));
  5546.  
  5547. mov eax, DWORD PTR _vec1$[esp+84]
  5548. ; File e:\программирование\any\any\any.cpp
  5549.  
  5550. ; 184 : vec1[g]+=h;
  5551.  
  5552. movsd xmm0, QWORD PTR [ecx+eax]
  5553. addsd xmm0, xmm1
  5554. movsd QWORD PTR [ecx+eax], xmm0
  5555. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5556.  
  5557. ; 1148 : return (*(this->_Myfirst + _Pos));
  5558.  
  5559. mov eax, DWORD PTR _vec1$[esp+84]
  5560. ; File e:\программирование\any\any\any.cpp
  5561.  
  5562. ; 184 : vec1[g]+=h;
  5563.  
  5564. movsd xmm0, QWORD PTR [ecx+eax]
  5565. addsd xmm0, xmm1
  5566. movsd QWORD PTR [ecx+eax], xmm0
  5567. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5568.  
  5569. ; 1148 : return (*(this->_Myfirst + _Pos));
  5570.  
  5571. mov eax, DWORD PTR _vec1$[esp+84]
  5572. ; File e:\программирование\any\any\any.cpp
  5573.  
  5574. ; 184 : vec1[g]+=h;
  5575.  
  5576. movsd xmm0, QWORD PTR [ecx+eax]
  5577. addsd xmm0, xmm1
  5578. movsd QWORD PTR [ecx+eax], xmm0
  5579. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5580.  
  5581. ; 1148 : return (*(this->_Myfirst + _Pos));
  5582.  
  5583. mov eax, DWORD PTR _vec1$[esp+84]
  5584. ; File e:\программирование\any\any\any.cpp
  5585.  
  5586. ; 184 : vec1[g]+=h;
  5587.  
  5588. movsd xmm0, QWORD PTR [ecx+eax]
  5589. addsd xmm0, xmm1
  5590. movsd QWORD PTR [ecx+eax], xmm0
  5591. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5592.  
  5593. ; 1148 : return (*(this->_Myfirst + _Pos));
  5594.  
  5595. mov eax, DWORD PTR _vec1$[esp+84]
  5596. ; File e:\программирование\any\any\any.cpp
  5597.  
  5598. ; 184 : vec1[g]+=h;
  5599.  
  5600. movsd xmm0, QWORD PTR [ecx+eax]
  5601. addsd xmm0, xmm1
  5602. movsd QWORD PTR [ecx+eax], xmm0
  5603. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5604.  
  5605. ; 1148 : return (*(this->_Myfirst + _Pos));
  5606.  
  5607. mov eax, DWORD PTR _vec1$[esp+84]
  5608. ; File e:\программирование\any\any\any.cpp
  5609.  
  5610. ; 184 : vec1[g]+=h;
  5611.  
  5612. movsd xmm0, QWORD PTR [ecx+eax]
  5613. addsd xmm0, xmm1
  5614. movsd QWORD PTR [ecx+eax], xmm0
  5615. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5616.  
  5617. ; 1148 : return (*(this->_Myfirst + _Pos));
  5618.  
  5619. mov eax, DWORD PTR _vec1$[esp+84]
  5620. ; File e:\программирование\any\any\any.cpp
  5621.  
  5622. ; 184 : vec1[g]+=h;
  5623.  
  5624. movsd xmm0, QWORD PTR [ecx+eax]
  5625. addsd xmm0, xmm1
  5626. movsd QWORD PTR [ecx+eax], xmm0
  5627. dec esi
  5628. jne $LL3@main
  5629.  
  5630. ; 182 : for(int h = 0; h<N2; h++){
  5631.  
  5632. inc edx
  5633. cmp edx, 4000 ; 00000fa0H
  5634. jl $LL6@main
  5635.  
  5636. ; 181 : for(int g = 0; g<N1/2; g++){
  5637.  
  5638. add ecx, 8
  5639. cmp ecx, 4000 ; 00000fa0H
  5640. jl $LL9@main
  5641.  
  5642. ; 185 : }
  5643. ; 186 : }
  5644. ; 187 : }
  5645. ; 188 : tt = clock();
  5646.  
  5647. call edi
  5648.  
  5649. ; 189 : cout<<tt-t<<endl;
  5650.  
  5651. push DWORD PTR __imp_?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z
  5652. mov ecx, DWORD PTR __imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A
  5653. sub eax, ebx
  5654. push eax
  5655. call DWORD PTR __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z
  5656. mov ecx, eax
  5657. call DWORD PTR __imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z
  5658.  
  5659. ; 190 : getchar();
  5660.  
  5661. call DWORD PTR __imp__getchar
  5662. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5663.  
  5664. ; 1536 : if (this->_Myfirst != pointer())
  5665.  
  5666. mov eax, DWORD PTR _vec2$[esp+84]
  5667. mov esi, DWORD PTR __imp_??3@YAXPAX@Z
  5668. test eax, eax
  5669. je SHORT $LN45@main
  5670. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  5671.  
  5672. ; 586 : ::operator delete(_Ptr);
  5673.  
  5674. push eax
  5675. call esi
  5676. add esp, 4
  5677. $LN45@main:
  5678. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  5679.  
  5680. ; 1536 : if (this->_Myfirst != pointer())
  5681.  
  5682. mov eax, DWORD PTR _vec1$[esp+84]
  5683. test eax, eax
  5684. je SHORT $LN84@main
  5685. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  5686.  
  5687. ; 586 : ::operator delete(_Ptr);
  5688.  
  5689. push eax
  5690. call esi
  5691. add esp, 4
  5692. $LN84@main:
  5693. ; File e:\программирование\any\any\any.cpp
  5694.  
  5695. ; 191 : }
  5696.  
  5697. mov ecx, DWORD PTR __$EHRec$[esp+84]
  5698. mov DWORD PTR fs:0, ecx
  5699. pop ecx
  5700. pop edi
  5701. pop esi
  5702. pop ebx
  5703. mov esp, ebp
  5704. pop ebp
  5705. ret 0
  5706. _TEXT ENDS
  5707. ; COMDAT text$x
  5708. text$x SEGMENT
  5709. __unwindfunclet$_main$0:
  5710. lea ecx, DWORD PTR _res1$[ebp]
  5711. jmp ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >
  5712. __unwindfunclet$_main$1:
  5713. lea ecx, DWORD PTR _res2$[ebp]
  5714. jmp ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >
  5715. __unwindfunclet$_main$2:
  5716. lea ecx, DWORD PTR _vec1$[ebp]
  5717. jmp ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >
  5718. __unwindfunclet$_main$3:
  5719. lea ecx, DWORD PTR _vec2$[ebp]
  5720. jmp ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >
  5721. __ehhandler$_main:
  5722. mov edx, DWORD PTR [esp+8]
  5723. lea eax, DWORD PTR [edx-68]
  5724. mov ecx, DWORD PTR [edx-72]
  5725. xor ecx, eax
  5726. call @__security_check_cookie@4
  5727. mov eax, OFFSET __ehfuncinfo$_main
  5728. jmp ___CxxFrameHandler3
  5729. text$x ENDS
  5730. _main ENDP
  5731. ; Function compile flags: /Ogtp
  5732. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  5733. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  5734. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  5735. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  5736. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  5737. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  5738. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  5739. ; COMDAT ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z
  5740. _TEXT SEGMENT
  5741. __Ptr$ = 8 ; size = 4
  5742. ??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
  5743. ; _this$ = ecx
  5744.  
  5745. ; 791 : { // construct from [_Ptr, <null>)
  5746.  
  5747. push ebp
  5748. mov ebp, esp
  5749. push esi
  5750. mov esi, ecx
  5751. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  5752.  
  5753. ; 523 : : _CSTD strlen(_First));
  5754.  
  5755. mov ecx, DWORD PTR __Ptr$[ebp]
  5756. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  5757.  
  5758. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  5759.  
  5760. mov DWORD PTR [esi+20], 15 ; 0000000fH
  5761.  
  5762. ; 1145 : }
  5763. ; 1146 :
  5764. ; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
  5765. ; 1148 : { // assign _Count * _Ch
  5766. ; 1149 : if (_Count == npos)
  5767. ; 1150 : _Xlen(); // result too long
  5768. ; 1151 :
  5769. ; 1152 : if (_Grow(_Count))
  5770. ; 1153 : { // make room and assign new stuff
  5771. ; 1154 : _Chassign(0, _Count, _Ch);
  5772. ; 1155 : _Eos(_Count);
  5773. ; 1156 : }
  5774. ; 1157 : return (*this);
  5775. ; 1158 : }
  5776. ; 1159 :
  5777. ; 1160 : template<class _Iter>
  5778. ; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
  5779. ; 1162 : _Myt&>::type
  5780. ; 1163 : assign(_Iter _First, _Iter _Last)
  5781. ; 1164 : { // assign [First, _Last), input iterators
  5782. ; 1165 : return (replace(begin(), end(), _First, _Last));
  5783. ; 1166 : }
  5784. ; 1167 :
  5785. ; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
  5786. ; 1169 : { // assign [First, _Last), const pointers
  5787. ; 1170 : return (replace(begin(), end(), _First, _Last));
  5788. ; 1171 : }
  5789. ; 1172 :
  5790. ; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
  5791. ; 1174 : { // assign [First, _Last), const_iterators
  5792. ; 1175 : return (replace(begin(), end(), _First, _Last));
  5793. ; 1176 : }
  5794. ; 1177 :
  5795. ; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
  5796. ; 1179 : { // insert _Right at _Off
  5797. ; 1180 : return (insert(_Off, _Right, 0, npos));
  5798. ; 1181 : }
  5799. ; 1182 :
  5800. ; 1183 : _Myt& insert(size_type _Off,
  5801. ; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
  5802. ; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
  5803. ; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  5804. ; 1187 : _Xran(); // _Off or _Roff off end
  5805. ; 1188 : size_type _Num = _Right.size() - _Roff;
  5806. ; 1189 : if (_Num < _Count)
  5807. ; 1190 : _Count = _Num; // trim _Count to size
  5808. ; 1191 : if (npos - this->_Mysize <= _Count)
  5809. ; 1192 : _Xlen(); // result too long
  5810. ; 1193 :
  5811. ; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  5812. ; 1195 : { // make room and insert new stuff
  5813. ; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
  5814. ; 1197 : this->_Myptr() + _Off,
  5815. ; 1198 : this->_Mysize - _Off); // empty out hole
  5816. ; 1199 : if (this == &_Right)
  5817. ; 1200 : _Traits::move(this->_Myptr() + _Off,
  5818. ; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
  5819. ; 1202 : _Count); // substring
  5820. ; 1203 : else
  5821. ; 1204 : _Traits::copy(this->_Myptr() + _Off,
  5822. ; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
  5823. ; 1206 : _Eos(_Num);
  5824. ; 1207 : }
  5825. ; 1208 : return (*this);
  5826. ; 1209 : }
  5827. ; 1210 :
  5828. ; 1211 : _Myt& insert(size_type _Off,
  5829. ; 1212 : const _Elem *_Ptr, size_type _Count)
  5830. ; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
  5831. ; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
  5832. ; 1215 : if (_Count != 0)
  5833. ; 1216 : _DEBUG_POINTER(_Ptr);
  5834. ; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  5835. ; 1218 :
  5836. ; 1219 : if (_Inside(_Ptr))
  5837. ; 1220 : return (insert(_Off, *this,
  5838. ; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
  5839. ; 1222 : if (this->_Mysize < _Off)
  5840. ; 1223 : _Xran(); // _Off off end
  5841. ; 1224 : if (npos - this->_Mysize <= _Count)
  5842. ; 1225 : _Xlen(); // result too long
  5843. ; 1226 : size_type _Num;
  5844. ; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  5845. ; 1228 : { // make room and insert new stuff
  5846. ; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
  5847. ; 1230 : this->_Myptr() + _Off,
  5848. ; 1231 : this->_Mysize - _Off); // empty out hole
  5849. ; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  5850. ; 1233 : _Eos(_Num);
  5851. ; 1234 : }
  5852. ; 1235 : return (*this);
  5853. ; 1236 : }
  5854. ; 1237 :
  5855. ; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
  5856. ; 1239 : { // insert [_Ptr, <null>) at _Off
  5857. ; 1240 : _DEBUG_POINTER(_Ptr);
  5858. ; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
  5859. ; 1242 : }
  5860. ; 1243 :
  5861. ; 1244 : _Myt& insert(size_type _Off,
  5862. ; 1245 : size_type _Count, _Elem _Ch)
  5863. ; 1246 : { // insert _Count * _Ch at _Off
  5864. ; 1247 : if (this->_Mysize < _Off)
  5865. ; 1248 : _Xran(); // _Off off end
  5866. ; 1249 : if (npos - this->_Mysize <= _Count)
  5867. ; 1250 : _Xlen(); // result too long
  5868. ; 1251 : size_type _Num;
  5869. ; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  5870. ; 1253 : { // make room and insert new stuff
  5871. ; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
  5872. ; 1255 : this->_Myptr() + _Off,
  5873. ; 1256 : this->_Mysize - _Off); // empty out hole
  5874. ; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
  5875. ; 1258 : _Eos(_Num);
  5876. ; 1259 : }
  5877. ; 1260 : return (*this);
  5878. ; 1261 : }
  5879. ; 1262 :
  5880. ; 1263 : iterator insert(const_iterator _Where)
  5881. ; 1264 : { // insert <null> at _Where
  5882. ; 1265 : return (insert(_Where, _Elem()));
  5883. ; 1266 : }
  5884. ; 1267 :
  5885. ; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
  5886. ; 1269 : { // insert _Ch at _Where
  5887. ; 1270 : size_type _Off = _Pdif(_Where, begin());
  5888. ; 1271 : insert(_Off, 1, _Ch);
  5889. ; 1272 : return (begin() + _Off);
  5890. ; 1273 : }
  5891. ; 1274 :
  5892. ; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
  5893. ; 1276 : { // insert _Count * _Elem at _Where
  5894. ; 1277 : size_type _Off = _Pdif(_Where, begin());
  5895. ; 1278 : insert(_Off, _Count, _Ch);
  5896. ; 1279 : return (begin() + _Off);
  5897. ; 1280 : }
  5898. ; 1281 :
  5899. ; 1282 : template<class _Iter>
  5900. ; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
  5901. ; 1284 : iterator>::type
  5902. ; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  5903. ; 1286 : { // insert [_First, _Last) at _Where, input iterators
  5904. ; 1287 : size_type _Off = _Pdif(_Where, begin());
  5905. ; 1288 : replace(_Where, _Where, _First, _Last);
  5906. ; 1289 : return (begin() + _Off);
  5907. ; 1290 : }
  5908. ; 1291 :
  5909. ; 1292 : iterator insert(const_iterator _Where,
  5910. ; 1293 : const_pointer _First, const_pointer _Last)
  5911. ; 1294 : { // insert [_First, _Last) at _Where, const pointers
  5912. ; 1295 : size_type _Off = _Pdif(_Where, begin());
  5913. ; 1296 : replace(_Where, _Where, _First, _Last);
  5914. ; 1297 : return (begin() + _Off);
  5915. ; 1298 : }
  5916. ; 1299 :
  5917. ; 1300 : iterator insert(const_iterator _Where,
  5918. ; 1301 : const_iterator _First, const_iterator _Last)
  5919. ; 1302 : { // insert [_First, _Last) at _Where, const_iterators
  5920. ; 1303 : size_type _Off = _Pdif(_Where, begin());
  5921. ; 1304 : replace(_Where, _Where, _First, _Last);
  5922. ; 1305 : return (begin() + _Off);
  5923. ; 1306 : }
  5924. ; 1307 :
  5925. ; 1308 : _Myt& erase(size_type _Off = 0)
  5926. ; 1309 : { // erase elements [_Off, ...)
  5927. ; 1310 : if (this->_Mysize < _Off)
  5928. ; 1311 : _Xran(); // _Off off end
  5929. ; 1312 : _Eos(_Off);
  5930. ; 1313 : return (*this);
  5931. ; 1314 : }
  5932. ; 1315 :
  5933. ; 1316 : _Myt& erase(size_type _Off, size_type _Count)
  5934. ; 1317 : { // erase elements [_Off, _Off + _Count)
  5935. ; 1318 : if (this->_Mysize < _Off)
  5936. ; 1319 : _Xran(); // _Off off end
  5937. ; 1320 : if (this->_Mysize - _Off <= _Count)
  5938. ; 1321 : _Eos(_Off); // erase elements [_Off, ...)
  5939. ; 1322 : else if (0 < _Count)
  5940. ; 1323 : { // move elements down
  5941. ; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
  5942. ; 1325 : size_type _Newsize = this->_Mysize - _Count;
  5943. ; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
  5944. ; 1327 : _Eos(_Newsize);
  5945. ; 1328 : }
  5946. ; 1329 : return (*this);
  5947. ; 1330 : }
  5948. ; 1331 :
  5949. ; 1332 : iterator erase(const_iterator _Where)
  5950. ; 1333 : { // erase element at _Where
  5951. ; 1334 : size_type _Count = _Pdif(_Where, begin());
  5952. ; 1335 : erase(_Count, 1);
  5953. ; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  5954. ; 1337 : }
  5955. ; 1338 :
  5956. ; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
  5957. ; 1340 : { // erase substring [_First, _Last)
  5958. ; 1341 : _DEBUG_RANGE(_First, _Last);
  5959. ; 1342 : size_type _Count = _Pdif(_First, begin());
  5960. ; 1343 : erase(_Count, _Pdif(_Last, _First));
  5961. ; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  5962. ; 1345 : }
  5963. ; 1346 :
  5964. ; 1347 : void clear() _NOEXCEPT
  5965. ; 1348 : { // erase all
  5966. ; 1349 : _Eos(0);
  5967. ; 1350 : }
  5968. ; 1351 :
  5969. ; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
  5970. ; 1353 : { // replace [_Off, _Off + _N0) with _Right
  5971. ; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
  5972. ; 1355 : }
  5973. ; 1356 :
  5974. ; 1357 : _Myt& replace(size_type _Off,
  5975. ; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
  5976. ; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  5977. ; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  5978. ; 1361 : _Xran(); // _Off or _Roff off end
  5979. ; 1362 : if (this->_Mysize - _Off < _N0)
  5980. ; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  5981. ; 1364 : size_type _Num = _Right.size() - _Roff;
  5982. ; 1365 : if (_Num < _Count)
  5983. ; 1366 : _Count = _Num; // trim _Count to size
  5984. ; 1367 : if (npos - _Count <= this->_Mysize - _N0)
  5985. ; 1368 : _Xlen(); // result too long
  5986. ; 1369 :
  5987. ; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
  5988. ; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
  5989. ; 1372 : if (this->_Mysize < _Newsize)
  5990. ; 1373 : _Grow(_Newsize);
  5991. ; 1374 :
  5992. ; 1375 : if (this != &_Right)
  5993. ; 1376 : { // no overlap, just move down and copy in new stuff
  5994. ; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
  5995. ; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
  5996. ; 1379 : _Traits::copy(this->_Myptr() + _Off,
  5997. ; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
  5998. ; 1381 : }
  5999. ; 1382 : else if (_Count <= _N0)
  6000. ; 1383 : { // hole doesn't get larger, just copy in substring
  6001. ; 1384 : _Traits::move(this->_Myptr() + _Off,
  6002. ; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
  6003. ; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
  6004. ; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  6005. ; 1388 : }
  6006. ; 1389 : else if (_Roff <= _Off)
  6007. ; 1390 : { // hole gets larger, substring begins before hole
  6008. ; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
  6009. ; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  6010. ; 1393 : _Traits::move(this->_Myptr() + _Off,
  6011. ; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
  6012. ; 1395 : }
  6013. ; 1396 : else if (_Off + _N0 <= _Roff)
  6014. ; 1397 : { // hole gets larger, substring begins after hole
  6015. ; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
  6016. ; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  6017. ; 1400 : _Traits::move(this->_Myptr() + _Off,
  6018. ; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
  6019. ; 1402 : _Count); // fill hole
  6020. ; 1403 : }
  6021. ; 1404 : else
  6022. ; 1405 : { // hole gets larger, substring begins in hole
  6023. ; 1406 : _Traits::move(this->_Myptr() + _Off,
  6024. ; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
  6025. ; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
  6026. ; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  6027. ; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
  6028. ; 1411 : this->_Myptr() + _Roff + _Count,
  6029. ; 1412 : _Count - _N0); // fill rest of new hole
  6030. ; 1413 : }
  6031. ; 1414 :
  6032. ; 1415 : _Eos(_Newsize);
  6033. ; 1416 : return (*this);
  6034. ; 1417 : }
  6035. ; 1418 :
  6036. ; 1419 : _Myt& replace(size_type _Off,
  6037. ; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
  6038. ; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  6039. ; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
  6040. ; 1423 : if (_Count != 0)
  6041. ; 1424 : _DEBUG_POINTER(_Ptr);
  6042. ; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6043. ; 1426 :
  6044. ; 1427 : if (_Inside(_Ptr))
  6045. ; 1428 : return (replace(_Off, _N0, *this,
  6046. ; 1429 : _Ptr - this->_Myptr(),
  6047. ; 1430 : _Count)); // substring, replace carefully
  6048. ; 1431 : if (this->_Mysize < _Off)
  6049. ; 1432 : _Xran(); // _Off off end
  6050. ; 1433 : if (this->_Mysize - _Off < _N0)
  6051. ; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  6052. ; 1435 : if (npos - _Count <= this->_Mysize - _N0)
  6053. ; 1436 : _Xlen(); // result too long
  6054. ; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
  6055. ; 1438 :
  6056. ; 1439 : if (_Count < _N0)
  6057. ; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
  6058. ; 1441 : this->_Myptr() + _Off + _N0,
  6059. ; 1442 : _Nm); // smaller hole, move tail up
  6060. ; 1443 : size_type _Num;
  6061. ; 1444 : if ((0 < _Count || 0 < _N0)
  6062. ; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  6063. ; 1446 : { // make room and rearrange
  6064. ; 1447 : if (_N0 < _Count)
  6065. ; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
  6066. ; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  6067. ; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  6068. ; 1451 : _Eos(_Num);
  6069. ; 1452 : }
  6070. ; 1453 : return (*this);
  6071. ; 1454 : }
  6072. ; 1455 :
  6073. ; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
  6074. ; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
  6075. ; 1458 : _DEBUG_POINTER(_Ptr);
  6076. ; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  6077. ; 1460 : }
  6078. ; 1461 :
  6079. ; 1462 : _Myt& replace(size_type _Off,
  6080. ; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
  6081. ; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
  6082. ; 1465 : if (this->_Mysize < _Off)
  6083. ; 1466 : _Xran(); // _Off off end
  6084. ; 1467 : if (this->_Mysize - _Off < _N0)
  6085. ; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  6086. ; 1469 : if (npos - _Count <= this->_Mysize - _N0)
  6087. ; 1470 : _Xlen(); // result too long
  6088. ; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
  6089. ; 1472 :
  6090. ; 1473 : if (_Count < _N0)
  6091. ; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
  6092. ; 1475 : this->_Myptr() + _Off + _N0,
  6093. ; 1476 : _Nm); // smaller hole, move tail up
  6094. ; 1477 : size_type _Num;
  6095. ; 1478 : if ((0 < _Count || 0 < _N0)
  6096. ; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  6097. ; 1480 : { // make room and rearrange
  6098. ; 1481 : if (_N0 < _Count)
  6099. ; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
  6100. ; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  6101. ; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
  6102. ; 1485 : _Eos(_Num);
  6103. ; 1486 : }
  6104. ; 1487 : return (*this);
  6105. ; 1488 : }
  6106. ; 1489 :
  6107. ; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
  6108. ; 1491 : const _Myt& _Right)
  6109. ; 1492 : { // replace [_First, _Last) with _Right
  6110. ; 1493 : return (replace(
  6111. ; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
  6112. ; 1495 : }
  6113. ; 1496 :
  6114. ; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
  6115. ; 1498 : const _Elem *_Ptr, size_type _Count)
  6116. ; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
  6117. ; 1500 : return (replace(
  6118. ; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
  6119. ; 1502 : }
  6120. ; 1503 :
  6121. ; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
  6122. ; 1505 : const _Elem *_Ptr)
  6123. ; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
  6124. ; 1507 : return (replace(
  6125. ; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
  6126. ; 1509 : }
  6127. ; 1510 :
  6128. ; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
  6129. ; 1512 : size_type _Count, _Elem _Ch)
  6130. ; 1513 : { // replace [_First, _Last) with _Count * _Ch
  6131. ; 1514 : return (replace(
  6132. ; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
  6133. ; 1516 : }
  6134. ; 1517 :
  6135. ; 1518 : template<class _Iter>
  6136. ; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
  6137. ; 1520 : _Myt&>::type
  6138. ; 1521 : replace(const_iterator _First, const_iterator _Last,
  6139. ; 1522 : _Iter _First2, _Iter _Last2)
  6140. ; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
  6141. ; 1524 : _Myt _Right(_First2, _Last2);
  6142. ; 1525 : replace(_First, _Last, _Right);
  6143. ; 1526 : return (*this);
  6144. ; 1527 : }
  6145. ; 1528 :
  6146. ; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
  6147. ; 1530 : const_pointer _First2, const_pointer _Last2)
  6148. ; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  6149. ; 1532 : if (_First2 == _Last2)
  6150. ; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  6151. ; 1534 : else
  6152. ; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  6153. ; 1536 : &*_First2, _Last2 - _First2);
  6154. ; 1537 : return (*this);
  6155. ; 1538 : }
  6156. ; 1539 :
  6157. ; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
  6158. ; 1541 : pointer _First2, pointer _Last2)
  6159. ; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  6160. ; 1543 : if (_First2 == _Last2)
  6161. ; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  6162. ; 1545 : else
  6163. ; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  6164. ; 1547 : &*_First2, _Last2 - _First2);
  6165. ; 1548 : return (*this);
  6166. ; 1549 : }
  6167. ; 1550 :
  6168. ; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
  6169. ; 1552 : const_iterator _First2, const_iterator _Last2)
  6170. ; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  6171. ; 1554 : if (_First2 == _Last2)
  6172. ; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  6173. ; 1556 : else
  6174. ; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  6175. ; 1558 : &*_First2, _Last2 - _First2);
  6176. ; 1559 : return (*this);
  6177. ; 1560 : }
  6178. ; 1561 :
  6179. ; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
  6180. ; 1563 : iterator _First2, iterator _Last2)
  6181. ; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  6182. ; 1565 : if (_First2 == _Last2)
  6183. ; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  6184. ; 1567 : else
  6185. ; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  6186. ; 1569 : &*_First2, _Last2 - _First2);
  6187. ; 1570 : return (*this);
  6188. ; 1571 : }
  6189. ; 1572 :
  6190. ; 1573 : iterator begin() _NOEXCEPT
  6191. ; 1574 : { // return iterator for beginning of mutable sequence
  6192. ; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
  6193. ; 1576 : }
  6194. ; 1577 :
  6195. ; 1578 : const_iterator begin() const _NOEXCEPT
  6196. ; 1579 : { // return iterator for beginning of nonmutable sequence
  6197. ; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
  6198. ; 1581 : }
  6199. ; 1582 :
  6200. ; 1583 : iterator end() _NOEXCEPT
  6201. ; 1584 : { // return iterator for end of mutable sequence
  6202. ; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
  6203. ; 1586 : }
  6204. ; 1587 :
  6205. ; 1588 : const_iterator end() const _NOEXCEPT
  6206. ; 1589 : { // return iterator for end of nonmutable sequence
  6207. ; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
  6208. ; 1591 : }
  6209. ; 1592 :
  6210. ; 1593 : reverse_iterator rbegin() _NOEXCEPT
  6211. ; 1594 : { // return iterator for beginning of reversed mutable sequence
  6212. ; 1595 : return (reverse_iterator(end()));
  6213. ; 1596 : }
  6214. ; 1597 :
  6215. ; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
  6216. ; 1599 : { // return iterator for beginning of reversed nonmutable sequence
  6217. ; 1600 : return (const_reverse_iterator(end()));
  6218. ; 1601 : }
  6219. ; 1602 :
  6220. ; 1603 : reverse_iterator rend() _NOEXCEPT
  6221. ; 1604 : { // return iterator for end of reversed mutable sequence
  6222. ; 1605 : return (reverse_iterator(begin()));
  6223. ; 1606 : }
  6224. ; 1607 :
  6225. ; 1608 : const_reverse_iterator rend() const _NOEXCEPT
  6226. ; 1609 : { // return iterator for end of reversed nonmutable sequence
  6227. ; 1610 : return (const_reverse_iterator(begin()));
  6228. ; 1611 : }
  6229. ; 1612 :
  6230. ; 1613 : #if _HAS_CPP0X
  6231. ; 1614 : const_iterator cbegin() const _NOEXCEPT
  6232. ; 1615 : { // return iterator for beginning of nonmutable sequence
  6233. ; 1616 : return (((const _Myt *)this)->begin());
  6234. ; 1617 : }
  6235. ; 1618 :
  6236. ; 1619 : const_iterator cend() const _NOEXCEPT
  6237. ; 1620 : { // return iterator for end of nonmutable sequence
  6238. ; 1621 : return (((const _Myt *)this)->end());
  6239. ; 1622 : }
  6240. ; 1623 :
  6241. ; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
  6242. ; 1625 : { // return iterator for beginning of reversed nonmutable sequence
  6243. ; 1626 : return (((const _Myt *)this)->rbegin());
  6244. ; 1627 : }
  6245. ; 1628 :
  6246. ; 1629 : const_reverse_iterator crend() const _NOEXCEPT
  6247. ; 1630 : { // return iterator for end of reversed nonmutable sequence
  6248. ; 1631 : return (((const _Myt *)this)->rend());
  6249. ; 1632 : }
  6250. ; 1633 :
  6251. ; 1634 : void shrink_to_fit()
  6252. ; 1635 : { // reduce capacity
  6253. ; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
  6254. ; 1637 : { // worth shrinking, do it
  6255. ; 1638 : _Myt _Tmp(*this);
  6256. ; 1639 : swap(_Tmp);
  6257. ; 1640 : }
  6258. ; 1641 : }
  6259. ; 1642 : #endif /* _HAS_CPP0X */
  6260. ; 1643 :
  6261. ; 1644 : reference at(size_type _Off)
  6262. ; 1645 : { // subscript mutable sequence with checking
  6263. ; 1646 : if (this->_Mysize <= _Off)
  6264. ; 1647 : _Xran(); // _Off off end
  6265. ; 1648 : return (this->_Myptr()[_Off]);
  6266. ; 1649 : }
  6267. ; 1650 :
  6268. ; 1651 : const_reference at(size_type _Off) const
  6269. ; 1652 : { // subscript nonmutable sequence with checking
  6270. ; 1653 : if (this->_Mysize <= _Off)
  6271. ; 1654 : _Xran(); // _Off off end
  6272. ; 1655 : return (this->_Myptr()[_Off]);
  6273. ; 1656 : }
  6274. ; 1657 :
  6275. ; 1658 : reference operator[](size_type _Off)
  6276. ; 1659 : { // subscript mutable sequence
  6277. ; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
  6278. ; 1661 : if (this->_Mysize < _Off) // sic
  6279. ; 1662 : _DEBUG_ERROR("string subscript out of range");
  6280. ; 1663 :
  6281. ; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
  6282. ; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  6283. ; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6284. ; 1667 :
  6285. ; 1668 : return (this->_Myptr()[_Off]);
  6286. ; 1669 : }
  6287. ; 1670 :
  6288. ; 1671 : const_reference operator[](size_type _Off) const
  6289. ; 1672 : { // subscript nonmutable sequence
  6290. ; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
  6291. ; 1674 : if (this->_Mysize < _Off) // sic
  6292. ; 1675 : _DEBUG_ERROR("string subscript out of range");
  6293. ; 1676 :
  6294. ; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
  6295. ; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  6296. ; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6297. ; 1680 :
  6298. ; 1681 : return (this->_Myptr()[_Off]);
  6299. ; 1682 : }
  6300. ; 1683 :
  6301. ; 1684 : void push_back(_Elem _Ch)
  6302. ; 1685 : { // insert element at end
  6303. ; 1686 : insert(end(), _Ch);
  6304. ; 1687 : }
  6305. ; 1688 :
  6306. ; 1689 : #if _HAS_CPP0X
  6307. ; 1690 : void pop_back()
  6308. ; 1691 : { // erase element at end
  6309. ; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
  6310. ; 1693 : }
  6311. ; 1694 :
  6312. ; 1695 : reference front()
  6313. ; 1696 : { // return first element of mutable sequence
  6314. ; 1697 : return (*begin());
  6315. ; 1698 : }
  6316. ; 1699 :
  6317. ; 1700 : const_reference front() const
  6318. ; 1701 : { // return first element of nonmutable sequence
  6319. ; 1702 : return (*begin());
  6320. ; 1703 : }
  6321. ; 1704 :
  6322. ; 1705 : reference back()
  6323. ; 1706 : { // return last element of mutable sequence
  6324. ; 1707 : return (*(end() - 1));
  6325. ; 1708 : }
  6326. ; 1709 :
  6327. ; 1710 : const_reference back() const
  6328. ; 1711 : { // return last element of nonmutable sequence
  6329. ; 1712 : return (*(end() - 1));
  6330. ; 1713 : }
  6331. ; 1714 : #endif /* _HAS_CPP0X */
  6332. ; 1715 :
  6333. ; 1716 : const _Elem *c_str() const _NOEXCEPT
  6334. ; 1717 : { // return pointer to null-terminated nonmutable array
  6335. ; 1718 : return (this->_Myptr());
  6336. ; 1719 : }
  6337. ; 1720 :
  6338. ; 1721 : const _Elem *data() const _NOEXCEPT
  6339. ; 1722 : { // return pointer to nonmutable array
  6340. ; 1723 : return (c_str());
  6341. ; 1724 : }
  6342. ; 1725 :
  6343. ; 1726 : size_type length() const _NOEXCEPT
  6344. ; 1727 : { // return length of sequence
  6345. ; 1728 : return (this->_Mysize);
  6346. ; 1729 : }
  6347. ; 1730 :
  6348. ; 1731 : size_type size() const _NOEXCEPT
  6349. ; 1732 : { // return length of sequence
  6350. ; 1733 : return (this->_Mysize);
  6351. ; 1734 : }
  6352. ; 1735 :
  6353. ; 1736 : size_type max_size() const _NOEXCEPT
  6354. ; 1737 : { // return maximum possible length of sequence
  6355. ; 1738 : size_type _Num = this->_Getal().max_size();
  6356. ; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
  6357. ; 1740 : }
  6358. ; 1741 :
  6359. ; 1742 : void resize(size_type _Newsize)
  6360. ; 1743 : { // determine new length, padding with null elements as needed
  6361. ; 1744 : resize(_Newsize, _Elem());
  6362. ; 1745 : }
  6363. ; 1746 :
  6364. ; 1747 : void resize(size_type _Newsize, _Elem _Ch)
  6365. ; 1748 : { // determine new length, padding with _Ch elements as needed
  6366. ; 1749 : if (_Newsize <= this->_Mysize)
  6367. ; 1750 : _Eos(_Newsize);
  6368. ; 1751 : else
  6369. ; 1752 : append(_Newsize - this->_Mysize, _Ch);
  6370. ; 1753 : }
  6371. ; 1754 :
  6372. ; 1755 : size_type capacity() const _NOEXCEPT
  6373. ; 1756 : { // return current length of allocated storage
  6374. ; 1757 : return (this->_Myres);
  6375. ; 1758 : }
  6376. ; 1759 :
  6377. ; 1760 : void reserve(size_type _Newcap = 0)
  6378. ; 1761 : { // determine new minimum length of allocated storage
  6379. ; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
  6380. ; 1763 : { // change reservation
  6381. ; 1764 : size_type _Size = this->_Mysize;
  6382. ; 1765 : if (_Grow(_Newcap, true))
  6383. ; 1766 : _Eos(_Size);
  6384. ; 1767 : }
  6385. ; 1768 : }
  6386. ; 1769 :
  6387. ; 1770 : bool empty() const _NOEXCEPT
  6388. ; 1771 : { // test if sequence is empty
  6389. ; 1772 : return (this->_Mysize == 0);
  6390. ; 1773 : }
  6391. ; 1774 :
  6392. ; 1775 : _SCL_INSECURE_DEPRECATE
  6393. ; 1776 :
  6394. ; 1777 : size_type copy(_Elem *_Ptr,
  6395. ; 1778 : size_type _Count, size_type _Off = 0) const
  6396. ; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
  6397. ; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
  6398. ; 1781 : if (_Count != 0)
  6399. ; 1782 : _DEBUG_POINTER(_Ptr);
  6400. ; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6401. ; 1784 :
  6402. ; 1785 : if (this->_Mysize < _Off)
  6403. ; 1786 : _Xran(); // _Off off end
  6404. ; 1787 : if (this->_Mysize - _Off < _Count)
  6405. ; 1788 : _Count = this->_Mysize - _Off;
  6406. ; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
  6407. ; 1790 : return (_Count);
  6408. ; 1791 : }
  6409. ; 1792 :
  6410. ; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
  6411. ; 1794 : size_type _Count, size_type _Off = 0) const
  6412. ; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
  6413. ; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
  6414. ; 1797 : if (_Count != 0)
  6415. ; 1798 : _DEBUG_POINTER(_Dest);
  6416. ; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6417. ; 1800 :
  6418. ; 1801 : if (this->_Mysize < _Off)
  6419. ; 1802 : _Xran(); // _Off off end
  6420. ; 1803 : if (this->_Mysize - _Off < _Count)
  6421. ; 1804 : _Count = this->_Mysize - _Off;
  6422. ; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
  6423. ; 1806 : return (_Count);
  6424. ; 1807 : }
  6425. ; 1808 :
  6426. ; 1809 : void _Swap_bx(_Myt& _Right)
  6427. ; 1810 : { // exchange _Bx with _Right._Bx
  6428. ; 1811 : if (this->_BUF_SIZE <= this->_Myres)
  6429. ; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
  6430. ; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
  6431. ; 1814 : else
  6432. ; 1815 : { // swap large with small
  6433. ; 1816 : pointer _Ptr = this->_Bx._Ptr;
  6434. ; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
  6435. ; 1818 : _Traits::copy(this->_Bx._Buf,
  6436. ; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
  6437. ; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
  6438. ; 1821 : }
  6439. ; 1822 : else
  6440. ; 1823 : if (_Right._Myres < this->_BUF_SIZE)
  6441. ; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
  6442. ; 1825 : else
  6443. ; 1826 : { // swap small with large
  6444. ; 1827 : pointer _Ptr = _Right._Bx._Ptr;
  6445. ; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
  6446. ; 1829 : _Traits::copy(_Right._Bx._Buf,
  6447. ; 1830 : this->_Bx._Buf, this->_Mysize + 1);
  6448. ; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  6449. ; 1832 : }
  6450. ; 1833 : }
  6451. ; 1834 :
  6452. ; 1835 : void swap(_Myt& _Right)
  6453. ; 1836 : { // exchange contents with _Right
  6454. ; 1837 : if (this == &_Right)
  6455. ; 1838 : ; // same object, do nothing
  6456. ; 1839 : else if (this->_Getal() == _Right._Getal())
  6457. ; 1840 : { // same allocator, swap control information
  6458. ; 1841 : this->_Swap_all(_Right);
  6459. ; 1842 : _Swap_bx(_Right);
  6460. ; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
  6461. ; 1844 : _STD swap(this->_Myres, _Right._Myres);
  6462. ; 1845 : }
  6463. ; 1846 :
  6464. ; 1847 : #if _HAS_CPP0X
  6465. ; 1848 : else if (_Alty::propagate_on_container_swap::value)
  6466. ; 1849 : { // swap allocators and control information
  6467. ; 1850 : this->_Swap_alloc(_Right);
  6468. ; 1851 : _Swap_bx(_Right);
  6469. ; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
  6470. ; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
  6471. ; 1854 : _STD swap(this->_Myres, _Right._Myres);
  6472. ; 1855 : }
  6473. ; 1856 : #endif /* _HAS_CPP0X */
  6474. ; 1857 :
  6475. ; 1858 : else
  6476. ; 1859 : { // different allocator, do multiple assigns
  6477. ; 1860 : _Myt _Tmp = *this;
  6478. ; 1861 :
  6479. ; 1862 : *this = _Right;
  6480. ; 1863 : _Right = _Tmp;
  6481. ; 1864 : }
  6482. ; 1865 : }
  6483. ; 1866 :
  6484. ; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
  6485. ; 1868 : { // look for _Right beginning at or after _Off
  6486. ; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
  6487. ; 1870 : }
  6488. ; 1871 :
  6489. ; 1872 : size_type find(const _Elem *_Ptr,
  6490. ; 1873 : size_type _Off, size_type _Count) const
  6491. ; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
  6492. ; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
  6493. ; 1876 : if (_Count != 0)
  6494. ; 1877 : _DEBUG_POINTER(_Ptr);
  6495. ; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6496. ; 1879 :
  6497. ; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
  6498. ; 1881 : return (_Off); // null string always matches (if inside string)
  6499. ; 1882 :
  6500. ; 1883 : size_type _Nm;
  6501. ; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
  6502. ; 1885 : { // room for match, look for it
  6503. ; 1886 : const _Elem *_Uptr, *_Vptr;
  6504. ; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
  6505. ; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
  6506. ; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
  6507. ; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
  6508. ; 1891 : return (_Uptr - this->_Myptr()); // found a match
  6509. ; 1892 : }
  6510. ; 1893 :
  6511. ; 1894 : return (npos); // no match
  6512. ; 1895 : }
  6513. ; 1896 :
  6514. ; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
  6515. ; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
  6516. ; 1899 : _DEBUG_POINTER(_Ptr);
  6517. ; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
  6518. ; 1901 : }
  6519. ; 1902 :
  6520. ; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
  6521. ; 1904 : { // look for _Ch at or after _Off
  6522. ; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
  6523. ; 1906 : }
  6524. ; 1907 :
  6525. ; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
  6526. ; 1909 : { // look for _Right beginning before _Off
  6527. ; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
  6528. ; 1911 : }
  6529. ; 1912 :
  6530. ; 1913 : size_type rfind(const _Elem *_Ptr,
  6531. ; 1914 : size_type _Off, size_type _Count) const
  6532. ; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
  6533. ; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
  6534. ; 1917 : if (_Count != 0)
  6535. ; 1918 : _DEBUG_POINTER(_Ptr);
  6536. ; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6537. ; 1920 :
  6538. ; 1921 : if (_Count == 0)
  6539. ; 1922 : return (_Off < this->_Mysize ? _Off
  6540. ; 1923 : : this->_Mysize); // null always matches
  6541. ; 1924 : if (_Count <= this->_Mysize)
  6542. ; 1925 : { // room for match, look for it
  6543. ; 1926 : const _Elem *_Uptr = this->_Myptr() +
  6544. ; 1927 : (_Off < this->_Mysize - _Count ? _Off
  6545. ; 1928 : : this->_Mysize - _Count);
  6546. ; 1929 : for (; ; --_Uptr)
  6547. ; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
  6548. ; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
  6549. ; 1932 : return (_Uptr - this->_Myptr()); // found a match
  6550. ; 1933 : else if (_Uptr == this->_Myptr())
  6551. ; 1934 : break; // at beginning, no more chance for match
  6552. ; 1935 : }
  6553. ; 1936 :
  6554. ; 1937 : return (npos); // no match
  6555. ; 1938 : }
  6556. ; 1939 :
  6557. ; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
  6558. ; 1941 : { // look for [_Ptr, <null>) beginning before _Off
  6559. ; 1942 : _DEBUG_POINTER(_Ptr);
  6560. ; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
  6561. ; 1944 : }
  6562. ; 1945 :
  6563. ; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
  6564. ; 1947 : { // look for _Ch before _Off
  6565. ; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  6566. ; 1949 : }
  6567. ; 1950 :
  6568. ; 1951 : size_type find_first_of(const _Myt& _Right,
  6569. ; 1952 : size_type _Off = 0) const _NOEXCEPT
  6570. ; 1953 : { // look for one of _Right at or after _Off
  6571. ; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
  6572. ; 1955 : }
  6573. ; 1956 :
  6574. ; 1957 : size_type find_first_of(const _Elem *_Ptr,
  6575. ; 1958 : size_type _Off, size_type _Count) const
  6576. ; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
  6577. ; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
  6578. ; 1961 : if (_Count != 0)
  6579. ; 1962 : _DEBUG_POINTER(_Ptr);
  6580. ; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6581. ; 1964 :
  6582. ; 1965 : if (0 < _Count && _Off < this->_Mysize)
  6583. ; 1966 : { // room for match, look for it
  6584. ; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  6585. ; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  6586. ; 1969 : _Uptr < _Vptr; ++_Uptr)
  6587. ; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  6588. ; 1971 : return (_Uptr - this->_Myptr()); // found a match
  6589. ; 1972 : }
  6590. ; 1973 :
  6591. ; 1974 : return (npos); // no match
  6592. ; 1975 : }
  6593. ; 1976 :
  6594. ; 1977 : size_type find_first_of(const _Elem *_Ptr,
  6595. ; 1978 : size_type _Off = 0) const
  6596. ; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
  6597. ; 1980 : _DEBUG_POINTER(_Ptr);
  6598. ; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
  6599. ; 1982 : }
  6600. ; 1983 :
  6601. ; 1984 : size_type find_first_of(_Elem _Ch,
  6602. ; 1985 : size_type _Off = 0) const
  6603. ; 1986 : { // look for _Ch at or after _Off
  6604. ; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
  6605. ; 1988 : }
  6606. ; 1989 :
  6607. ; 1990 : size_type find_last_of(const _Myt& _Right,
  6608. ; 1991 : size_type _Off = npos) const _NOEXCEPT
  6609. ; 1992 : { // look for one of _Right before _Off
  6610. ; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
  6611. ; 1994 : }
  6612. ; 1995 :
  6613. ; 1996 : size_type find_last_of(const _Elem *_Ptr,
  6614. ; 1997 : size_type _Off, size_type _Count) const
  6615. ; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
  6616. ; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
  6617. ; 2000 : if (_Count != 0)
  6618. ; 2001 : _DEBUG_POINTER(_Ptr);
  6619. ; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6620. ; 2003 :
  6621. ; 2004 : if (0 < _Count && 0 < this->_Mysize)
  6622. ; 2005 : { // worth searching, do it
  6623. ; 2006 : const _Elem *_Uptr = this->_Myptr()
  6624. ; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  6625. ; 2008 : for (; ; --_Uptr)
  6626. ; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  6627. ; 2010 : return (_Uptr - this->_Myptr()); // found a match
  6628. ; 2011 : else if (_Uptr == this->_Myptr())
  6629. ; 2012 : break; // at beginning, no more chance for match
  6630. ; 2013 : }
  6631. ; 2014 :
  6632. ; 2015 : return (npos); // no match
  6633. ; 2016 : }
  6634. ; 2017 :
  6635. ; 2018 : size_type find_last_of(const _Elem *_Ptr,
  6636. ; 2019 : size_type _Off = npos) const
  6637. ; 2020 : { // look for one of [_Ptr, <null>) before _Off
  6638. ; 2021 : _DEBUG_POINTER(_Ptr);
  6639. ; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
  6640. ; 2023 : }
  6641. ; 2024 :
  6642. ; 2025 : size_type find_last_of(_Elem _Ch,
  6643. ; 2026 : size_type _Off = npos) const
  6644. ; 2027 : { // look for _Ch before _Off
  6645. ; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  6646. ; 2029 : }
  6647. ; 2030 :
  6648. ; 2031 : size_type find_first_not_of(const _Myt& _Right,
  6649. ; 2032 : size_type _Off = 0) const _NOEXCEPT
  6650. ; 2033 : { // look for none of _Right at or after _Off
  6651. ; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
  6652. ; 2035 : _Right.size()));
  6653. ; 2036 : }
  6654. ; 2037 :
  6655. ; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
  6656. ; 2039 : size_type _Off, size_type _Count) const
  6657. ; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
  6658. ; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
  6659. ; 2042 : if (_Count != 0)
  6660. ; 2043 : _DEBUG_POINTER(_Ptr);
  6661. ; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6662. ; 2045 :
  6663. ; 2046 : if (_Off < this->_Mysize)
  6664. ; 2047 : { // room for match, look for it
  6665. ; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  6666. ; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  6667. ; 2050 : _Uptr < _Vptr; ++_Uptr)
  6668. ; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  6669. ; 2052 : return (_Uptr - this->_Myptr());
  6670. ; 2053 : }
  6671. ; 2054 : return (npos);
  6672. ; 2055 : }
  6673. ; 2056 :
  6674. ; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
  6675. ; 2058 : size_type _Off = 0) const
  6676. ; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
  6677. ; 2060 : _DEBUG_POINTER(_Ptr);
  6678. ; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  6679. ; 2062 : }
  6680. ; 2063 :
  6681. ; 2064 : size_type find_first_not_of(_Elem _Ch,
  6682. ; 2065 : size_type _Off = 0) const
  6683. ; 2066 : { // look for non _Ch at or after _Off
  6684. ; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
  6685. ; 2068 : }
  6686. ; 2069 :
  6687. ; 2070 : size_type find_last_not_of(const _Myt& _Right,
  6688. ; 2071 : size_type _Off = npos) const _NOEXCEPT
  6689. ; 2072 : { // look for none of _Right before _Off
  6690. ; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
  6691. ; 2074 : }
  6692. ; 2075 :
  6693. ; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
  6694. ; 2077 : size_type _Off, size_type _Count) const
  6695. ; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
  6696. ; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
  6697. ; 2080 : if (_Count != 0)
  6698. ; 2081 : _DEBUG_POINTER(_Ptr);
  6699. ; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6700. ; 2083 :
  6701. ; 2084 : if (0 < this->_Mysize)
  6702. ; 2085 : { // worth searching, do it
  6703. ; 2086 : const _Elem *_Uptr = this->_Myptr()
  6704. ; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  6705. ; 2088 : for (; ; --_Uptr)
  6706. ; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  6707. ; 2090 : return (_Uptr - this->_Myptr());
  6708. ; 2091 : else if (_Uptr == this->_Myptr())
  6709. ; 2092 : break;
  6710. ; 2093 : }
  6711. ; 2094 : return (npos);
  6712. ; 2095 : }
  6713. ; 2096 :
  6714. ; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
  6715. ; 2098 : size_type _Off = npos) const
  6716. ; 2099 : { // look for none of [_Ptr, <null>) before _Off
  6717. ; 2100 : _DEBUG_POINTER(_Ptr);
  6718. ; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  6719. ; 2102 : }
  6720. ; 2103 :
  6721. ; 2104 : size_type find_last_not_of(_Elem _Ch,
  6722. ; 2105 : size_type _Off = npos) const
  6723. ; 2106 : { // look for non _Ch before _Off
  6724. ; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
  6725. ; 2108 : }
  6726. ; 2109 :
  6727. ; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
  6728. ; 2111 : { // return [_Off, _Off + _Count) as new string
  6729. ; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
  6730. ; 2113 : }
  6731. ; 2114 :
  6732. ; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
  6733. ; 2116 : { // compare [0, _Mysize) with _Right
  6734. ; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
  6735. ; 2118 : }
  6736. ; 2119 :
  6737. ; 2120 : int compare(size_type _Off, size_type _N0,
  6738. ; 2121 : const _Myt& _Right) const
  6739. ; 2122 : { // compare [_Off, _Off + _N0) with _Right
  6740. ; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
  6741. ; 2124 : }
  6742. ; 2125 :
  6743. ; 2126 : int compare(size_type _Off,
  6744. ; 2127 : size_type _N0, const _Myt& _Right,
  6745. ; 2128 : size_type _Roff, size_type _Count) const
  6746. ; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  6747. ; 2130 : if (_Right.size() < _Roff)
  6748. ; 2131 : _Xran(); // _Off off end
  6749. ; 2132 : if (_Right._Mysize - _Roff < _Count)
  6750. ; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
  6751. ; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
  6752. ; 2135 : }
  6753. ; 2136 :
  6754. ; 2137 : int compare(const _Elem *_Ptr) const
  6755. ; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
  6756. ; 2139 : _DEBUG_POINTER(_Ptr);
  6757. ; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
  6758. ; 2141 : }
  6759. ; 2142 :
  6760. ; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
  6761. ; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
  6762. ; 2145 : _DEBUG_POINTER(_Ptr);
  6763. ; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  6764. ; 2147 : }
  6765. ; 2148 :
  6766. ; 2149 : int compare(size_type _Off,
  6767. ; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
  6768. ; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  6769. ; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
  6770. ; 2153 : if (_Count != 0)
  6771. ; 2154 : _DEBUG_POINTER(_Ptr);
  6772. ; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  6773. ; 2156 :
  6774. ; 2157 : if (this->_Mysize < _Off)
  6775. ; 2158 : _Xran(); // _Off off end
  6776. ; 2159 : if (this->_Mysize - _Off < _N0)
  6777. ; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  6778. ; 2161 :
  6779. ; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
  6780. ; 2163 : _N0 < _Count ? _N0 : _Count);
  6781. ; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
  6782. ; 2165 : : _N0 == _Count ? 0 : +1);
  6783. ; 2166 : }
  6784. ; 2167 :
  6785. ; 2168 : allocator_type get_allocator() const _NOEXCEPT
  6786. ; 2169 : { // return allocator object for values
  6787. ; 2170 : return (this->_Getal());
  6788. ; 2171 : }
  6789. ; 2172 :
  6790. ; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
  6791. ; 2174 : { // assign _Count copies of _Ch beginning at _Off
  6792. ; 2175 : if (_Count == 1)
  6793. ; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
  6794. ; 2177 : else
  6795. ; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
  6796. ; 2179 : }
  6797. ; 2180 :
  6798. ; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
  6799. ; 2182 : { // copy _Oldlen elements to newly allocated buffer
  6800. ; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
  6801. ; 2184 : if (max_size() < _Newres)
  6802. ; 2185 : _Newres = _Newsize; // undo roundup if too big
  6803. ; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
  6804. ; 2187 : ;
  6805. ; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
  6806. ; 2189 : _Newres = this->_Myres
  6807. ; 2190 : + this->_Myres / 2; // grow exponentially if possible
  6808. ; 2191 : else
  6809. ; 2192 : _Newres = max_size(); // settle for max_size()
  6810. ; 2193 :
  6811. ; 2194 : _Elem *_Ptr;
  6812. ; 2195 : _TRY_BEGIN
  6813. ; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
  6814. ; 2197 : _CATCH_ALL
  6815. ; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
  6816. ; 2199 : _TRY_BEGIN
  6817. ; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
  6818. ; 2201 : _CATCH_ALL
  6819. ; 2202 : _Tidy(true); // failed again, discard storage and reraise
  6820. ; 2203 : _RERAISE;
  6821. ; 2204 : _CATCH_END
  6822. ; 2205 : _CATCH_END
  6823. ; 2206 :
  6824. ; 2207 : if (0 < _Oldlen)
  6825. ; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
  6826. ; 2209 : _Oldlen); // copy existing elements
  6827. ; 2210 : _Tidy(true);
  6828. ; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  6829. ; 2212 : this->_Myres = _Newres;
  6830. ; 2213 : _Eos(_Oldlen);
  6831. ; 2214 : }
  6832. ; 2215 :
  6833. ; 2216 : void _Eos(size_type _Newsize)
  6834. ; 2217 : { // set new length and null terminator
  6835. ; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
  6836.  
  6837. mov DWORD PTR [esi+16], 0
  6838. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  6839.  
  6840. ; 564 : _Left = _Right;
  6841.  
  6842. mov BYTE PTR [esi], 0
  6843.  
  6844. ; 523 : : _CSTD strlen(_First));
  6845.  
  6846. cmp BYTE PTR [ecx], 0
  6847. jne SHORT $LN43@basic_stri
  6848. xor edx, edx
  6849. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  6850.  
  6851. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  6852.  
  6853. push edx
  6854. push ecx
  6855. mov ecx, esi
  6856. 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
  6857.  
  6858. ; 792 : _Tidy();
  6859. ; 793 : assign(_Ptr);
  6860. ; 794 : }
  6861.  
  6862. mov eax, esi
  6863. pop esi
  6864. pop ebp
  6865. ret 4
  6866. $LN43@basic_stri:
  6867. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  6868.  
  6869. ; 523 : : _CSTD strlen(_First));
  6870.  
  6871. mov edx, ecx
  6872. push edi
  6873. lea edi, DWORD PTR [edx+1]
  6874. $LL45@basic_stri:
  6875. mov al, BYTE PTR [edx]
  6876. inc edx
  6877. test al, al
  6878. jne SHORT $LL45@basic_stri
  6879. sub edx, edi
  6880. pop edi
  6881. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  6882.  
  6883. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  6884.  
  6885. push edx
  6886. push ecx
  6887. mov ecx, esi
  6888. 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
  6889.  
  6890. ; 792 : _Tidy();
  6891. ; 793 : assign(_Ptr);
  6892. ; 794 : }
  6893.  
  6894. mov eax, esi
  6895. pop esi
  6896. pop ebp
  6897. ret 4
  6898. ??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> >
  6899. _TEXT ENDS
  6900. ; Function compile flags: /Ogtp
  6901. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  6902. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  6903. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  6904. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  6905. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  6906. ; COMDAT ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ
  6907. _TEXT SEGMENT
  6908. ??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
  6909. ; _this$ = ecx
  6910.  
  6911. ; 963 : { // destroy the string
  6912.  
  6913. push esi
  6914. mov esi, ecx
  6915.  
  6916. ; 2219 : }
  6917. ; 2220 :
  6918. ; 2221 : bool _Grow(size_type _Newsize,
  6919. ; 2222 : bool _Trim = false)
  6920. ; 2223 : { // ensure buffer is big enough, trim to size if _Trim is true
  6921. ; 2224 : if (max_size() < _Newsize)
  6922. ; 2225 : _Xlen(); // result too long
  6923. ; 2226 : if (this->_Myres < _Newsize)
  6924. ; 2227 : _Copy(_Newsize, this->_Mysize); // reallocate to grow
  6925. ; 2228 : else if (_Trim && _Newsize < this->_BUF_SIZE)
  6926. ; 2229 : _Tidy(true, // copy and deallocate if trimming to small string
  6927. ; 2230 : _Newsize < this->_Mysize ? _Newsize : this->_Mysize);
  6928. ; 2231 : else if (_Newsize == 0)
  6929. ; 2232 : _Eos(0); // new size is zero, just null terminate
  6930. ; 2233 : return (0 < _Newsize); // return true only if more work to do
  6931. ; 2234 : }
  6932. ; 2235 :
  6933. ; 2236 : bool _Inside(const _Elem *_Ptr)
  6934. ; 2237 : { // test if _Ptr points inside string
  6935. ; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
  6936. ; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
  6937. ; 2240 : return (false); // don't ask
  6938. ; 2241 : else
  6939. ; 2242 : return (true);
  6940. ; 2243 : }
  6941. ; 2244 :
  6942. ; 2245 : static size_type _Pdif(const_iterator _P2,
  6943. ; 2246 : const_iterator _P1)
  6944. ; 2247 : { // compute safe iterator difference
  6945. ; 2248 : return (_STRING_ITER_BASE(_P2) == 0 ? 0 : _P2 - _P1);
  6946. ; 2249 : }
  6947. ; 2250 :
  6948. ; 2251 : void _Tidy(bool _Built = false,
  6949. ; 2252 : size_type _Newsize = 0)
  6950. ; 2253 : { // initialize buffer, deallocating any storage
  6951. ; 2254 : if (!_Built)
  6952. ; 2255 : ;
  6953. ; 2256 : else if (this->_BUF_SIZE <= this->_Myres)
  6954.  
  6955. cmp DWORD PTR [esi+20], 16 ; 00000010H
  6956. jb SHORT $LN21@basic_stri
  6957. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  6958.  
  6959. ; 586 : ::operator delete(_Ptr);
  6960.  
  6961. push DWORD PTR [esi]
  6962. call DWORD PTR __imp_??3@YAXPAX@Z
  6963. add esp, 4
  6964. $LN21@basic_stri:
  6965. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  6966.  
  6967. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  6968.  
  6969. mov DWORD PTR [esi+20], 15 ; 0000000fH
  6970.  
  6971. ; 966 :
  6972. ; 967 : _PGLOBAL static const size_type npos; // bad/missing length/position
  6973. ; 968 :
  6974. ; 969 : _Myt& operator=(const _Myt& _Right)
  6975. ; 970 : { // assign _Right
  6976. ; 971 : if (this != &_Right)
  6977. ; 972 : { // different, assign it
  6978. ; 973 : #if _HAS_CPP0X
  6979. ; 974 : if (this->_Getal() != _Right._Getal()
  6980. ; 975 : && _Alty::propagate_on_container_copy_assignment::value)
  6981. ; 976 : { // change allocator before copying
  6982. ; 977 : _Tidy(true);
  6983. ; 978 : this->_Change_alloc(_Right._Getal());
  6984. ; 979 : }
  6985. ; 980 : #endif /* _HAS_CPP0X */
  6986. ; 981 :
  6987. ; 982 : assign(_Right);
  6988. ; 983 : }
  6989. ; 984 : return (*this);
  6990. ; 985 : }
  6991. ; 986 :
  6992. ; 987 : _Myt& operator=(const _Elem *_Ptr)
  6993. ; 988 : { // assign [_Ptr, <null>)
  6994. ; 989 : return (assign(_Ptr));
  6995. ; 990 : }
  6996. ; 991 :
  6997. ; 992 : _Myt& operator=(_Elem _Ch)
  6998. ; 993 : { // assign 1 * _Ch
  6999. ; 994 : return (assign(1, _Ch));
  7000. ; 995 : }
  7001. ; 996 :
  7002. ; 997 : _Myt& operator+=(const _Myt& _Right)
  7003. ; 998 : { // append _Right
  7004. ; 999 : return (append(_Right));
  7005. ; 1000 : }
  7006. ; 1001 :
  7007. ; 1002 : _Myt& operator+=(const _Elem *_Ptr)
  7008. ; 1003 : { // append [_Ptr, <null>)
  7009. ; 1004 : return (append(_Ptr));
  7010. ; 1005 : }
  7011. ; 1006 :
  7012. ; 1007 : _Myt& operator+=(_Elem _Ch)
  7013. ; 1008 : { // append 1 * _Ch
  7014. ; 1009 : return (append((size_type)1, _Ch));
  7015. ; 1010 : }
  7016. ; 1011 :
  7017. ; 1012 : _Myt& append(const _Myt& _Right)
  7018. ; 1013 : { // append _Right
  7019. ; 1014 : return (append(_Right, 0, npos));
  7020. ; 1015 : }
  7021. ; 1016 :
  7022. ; 1017 : _Myt& append(const _Myt& _Right,
  7023. ; 1018 : size_type _Roff, size_type _Count)
  7024. ; 1019 : { // append _Right [_Roff, _Roff + _Count)
  7025. ; 1020 : if (_Right.size() < _Roff)
  7026. ; 1021 : _Xran(); // _Roff off end
  7027. ; 1022 : size_type _Num = _Right.size() - _Roff;
  7028. ; 1023 : if (_Num < _Count)
  7029. ; 1024 : _Count = _Num; // trim _Count to size
  7030. ; 1025 : if (npos - this->_Mysize <= _Count)
  7031. ; 1026 : _Xlen(); // result too long
  7032. ; 1027 :
  7033. ; 1028 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  7034. ; 1029 : { // make room and append new stuff
  7035. ; 1030 : _Traits::copy(this->_Myptr() + this->_Mysize,
  7036. ; 1031 : _Right._Myptr() + _Roff, _Count);
  7037. ; 1032 : _Eos(_Num);
  7038. ; 1033 : }
  7039. ; 1034 : return (*this);
  7040. ; 1035 : }
  7041. ; 1036 :
  7042. ; 1037 : _Myt& append(const _Elem *_Ptr, size_type _Count)
  7043. ; 1038 : { // append [_Ptr, _Ptr + _Count)
  7044. ; 1039 : #if _ITERATOR_DEBUG_LEVEL == 2
  7045. ; 1040 : if (_Count != 0)
  7046. ; 1041 : _DEBUG_POINTER(_Ptr);
  7047. ; 1042 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7048. ; 1043 :
  7049. ; 1044 : if (_Inside(_Ptr))
  7050. ; 1045 : return (append(*this,
  7051. ; 1046 : _Ptr - this->_Myptr(), _Count)); // substring
  7052. ; 1047 : if (npos - this->_Mysize <= _Count)
  7053. ; 1048 : _Xlen(); // result too long
  7054. ; 1049 :
  7055. ; 1050 : size_type _Num;
  7056. ; 1051 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  7057. ; 1052 : { // make room and append new stuff
  7058. ; 1053 : _Traits::copy(this->_Myptr() + this->_Mysize, _Ptr, _Count);
  7059. ; 1054 : _Eos(_Num);
  7060. ; 1055 : }
  7061. ; 1056 : return (*this);
  7062. ; 1057 : }
  7063. ; 1058 :
  7064. ; 1059 : _Myt& append(const _Elem *_Ptr)
  7065. ; 1060 : { // append [_Ptr, <null>)
  7066. ; 1061 : _DEBUG_POINTER(_Ptr);
  7067. ; 1062 : return (append(_Ptr, _Traits::length(_Ptr)));
  7068. ; 1063 : }
  7069. ; 1064 :
  7070. ; 1065 : _Myt& append(size_type _Count, _Elem _Ch)
  7071. ; 1066 : { // append _Count * _Ch
  7072. ; 1067 : if (npos - this->_Mysize <= _Count)
  7073. ; 1068 : _Xlen(); // result too long
  7074. ; 1069 :
  7075. ; 1070 : size_type _Num;
  7076. ; 1071 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  7077. ; 1072 : { // make room and append new stuff using assign
  7078. ; 1073 : _Chassign(this->_Mysize, _Count, _Ch);
  7079. ; 1074 : _Eos(_Num);
  7080. ; 1075 : }
  7081. ; 1076 : return (*this);
  7082. ; 1077 : }
  7083. ; 1078 :
  7084. ; 1079 : template<class _Iter>
  7085. ; 1080 : typename enable_if<_Is_iterator<_Iter>::value,
  7086. ; 1081 : _Myt&>::type
  7087. ; 1082 : append(_Iter _First, _Iter _Last)
  7088. ; 1083 : { // append [_First, _Last), input iterators
  7089. ; 1084 : return (replace(end(), end(), _First, _Last));
  7090. ; 1085 : }
  7091. ; 1086 :
  7092. ; 1087 : _Myt& append(const_pointer _First, const_pointer _Last)
  7093. ; 1088 : { // append [_First, _Last), const pointers
  7094. ; 1089 : return (replace(end(), end(), _First, _Last));
  7095. ; 1090 : }
  7096. ; 1091 :
  7097. ; 1092 : _Myt& append(const_iterator _First, const_iterator _Last)
  7098. ; 1093 : { // append [_First, _Last), const_iterators
  7099. ; 1094 : return (replace(end(), end(), _First, _Last));
  7100. ; 1095 : }
  7101. ; 1096 :
  7102. ; 1097 : _Myt& assign(const _Myt& _Right)
  7103. ; 1098 : { // assign _Right
  7104. ; 1099 : return (assign(_Right, 0, npos));
  7105. ; 1100 : }
  7106. ; 1101 :
  7107. ; 1102 : _Myt& assign(const _Myt& _Right,
  7108. ; 1103 : size_type _Roff, size_type _Count)
  7109. ; 1104 : { // assign _Right [_Roff, _Roff + _Count)
  7110. ; 1105 : if (_Right.size() < _Roff)
  7111. ; 1106 : _Xran(); // _Roff off end
  7112. ; 1107 : size_type _Num = _Right.size() - _Roff;
  7113. ; 1108 : if (_Count < _Num)
  7114. ; 1109 : _Num = _Count; // trim _Num to size
  7115. ; 1110 :
  7116. ; 1111 : if (this == &_Right)
  7117. ; 1112 : erase((size_type)(_Roff + _Num)), erase(0, _Roff); // substring
  7118. ; 1113 : else if (_Grow(_Num))
  7119. ; 1114 : { // make room and assign new stuff
  7120. ; 1115 : _Traits::copy(this->_Myptr(),
  7121. ; 1116 : _Right._Myptr() + _Roff, _Num);
  7122. ; 1117 : _Eos(_Num);
  7123. ; 1118 : }
  7124. ; 1119 : return (*this);
  7125. ; 1120 : }
  7126. ; 1121 :
  7127. ; 1122 : _Myt& assign(const _Elem *_Ptr, size_type _Count)
  7128. ; 1123 : { // assign [_Ptr, _Ptr + _Count)
  7129. ; 1124 : #if _ITERATOR_DEBUG_LEVEL == 2
  7130. ; 1125 : if (_Count != 0)
  7131. ; 1126 : _DEBUG_POINTER(_Ptr);
  7132. ; 1127 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7133. ; 1128 :
  7134. ; 1129 : if (_Inside(_Ptr))
  7135. ; 1130 : return (assign(*this,
  7136. ; 1131 : _Ptr - this->_Myptr(), _Count)); // substring
  7137. ; 1132 :
  7138. ; 1133 : if (_Grow(_Count))
  7139. ; 1134 : { // make room and assign new stuff
  7140. ; 1135 : _Traits::copy(this->_Myptr(), _Ptr, _Count);
  7141. ; 1136 : _Eos(_Count);
  7142. ; 1137 : }
  7143. ; 1138 : return (*this);
  7144. ; 1139 : }
  7145. ; 1140 :
  7146. ; 1141 : _Myt& assign(const _Elem *_Ptr)
  7147. ; 1142 : { // assign [_Ptr, <null>)
  7148. ; 1143 : _DEBUG_POINTER(_Ptr);
  7149. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  7150. ; 1145 : }
  7151. ; 1146 :
  7152. ; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
  7153. ; 1148 : { // assign _Count * _Ch
  7154. ; 1149 : if (_Count == npos)
  7155. ; 1150 : _Xlen(); // result too long
  7156. ; 1151 :
  7157. ; 1152 : if (_Grow(_Count))
  7158. ; 1153 : { // make room and assign new stuff
  7159. ; 1154 : _Chassign(0, _Count, _Ch);
  7160. ; 1155 : _Eos(_Count);
  7161. ; 1156 : }
  7162. ; 1157 : return (*this);
  7163. ; 1158 : }
  7164. ; 1159 :
  7165. ; 1160 : template<class _Iter>
  7166. ; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
  7167. ; 1162 : _Myt&>::type
  7168. ; 1163 : assign(_Iter _First, _Iter _Last)
  7169. ; 1164 : { // assign [First, _Last), input iterators
  7170. ; 1165 : return (replace(begin(), end(), _First, _Last));
  7171. ; 1166 : }
  7172. ; 1167 :
  7173. ; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
  7174. ; 1169 : { // assign [First, _Last), const pointers
  7175. ; 1170 : return (replace(begin(), end(), _First, _Last));
  7176. ; 1171 : }
  7177. ; 1172 :
  7178. ; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
  7179. ; 1174 : { // assign [First, _Last), const_iterators
  7180. ; 1175 : return (replace(begin(), end(), _First, _Last));
  7181. ; 1176 : }
  7182. ; 1177 :
  7183. ; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
  7184. ; 1179 : { // insert _Right at _Off
  7185. ; 1180 : return (insert(_Off, _Right, 0, npos));
  7186. ; 1181 : }
  7187. ; 1182 :
  7188. ; 1183 : _Myt& insert(size_type _Off,
  7189. ; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
  7190. ; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
  7191. ; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  7192. ; 1187 : _Xran(); // _Off or _Roff off end
  7193. ; 1188 : size_type _Num = _Right.size() - _Roff;
  7194. ; 1189 : if (_Num < _Count)
  7195. ; 1190 : _Count = _Num; // trim _Count to size
  7196. ; 1191 : if (npos - this->_Mysize <= _Count)
  7197. ; 1192 : _Xlen(); // result too long
  7198. ; 1193 :
  7199. ; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  7200. ; 1195 : { // make room and insert new stuff
  7201. ; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
  7202. ; 1197 : this->_Myptr() + _Off,
  7203. ; 1198 : this->_Mysize - _Off); // empty out hole
  7204. ; 1199 : if (this == &_Right)
  7205. ; 1200 : _Traits::move(this->_Myptr() + _Off,
  7206. ; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
  7207. ; 1202 : _Count); // substring
  7208. ; 1203 : else
  7209. ; 1204 : _Traits::copy(this->_Myptr() + _Off,
  7210. ; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
  7211. ; 1206 : _Eos(_Num);
  7212. ; 1207 : }
  7213. ; 1208 : return (*this);
  7214. ; 1209 : }
  7215. ; 1210 :
  7216. ; 1211 : _Myt& insert(size_type _Off,
  7217. ; 1212 : const _Elem *_Ptr, size_type _Count)
  7218. ; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
  7219. ; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
  7220. ; 1215 : if (_Count != 0)
  7221. ; 1216 : _DEBUG_POINTER(_Ptr);
  7222. ; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7223. ; 1218 :
  7224. ; 1219 : if (_Inside(_Ptr))
  7225. ; 1220 : return (insert(_Off, *this,
  7226. ; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
  7227. ; 1222 : if (this->_Mysize < _Off)
  7228. ; 1223 : _Xran(); // _Off off end
  7229. ; 1224 : if (npos - this->_Mysize <= _Count)
  7230. ; 1225 : _Xlen(); // result too long
  7231. ; 1226 : size_type _Num;
  7232. ; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  7233. ; 1228 : { // make room and insert new stuff
  7234. ; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
  7235. ; 1230 : this->_Myptr() + _Off,
  7236. ; 1231 : this->_Mysize - _Off); // empty out hole
  7237. ; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  7238. ; 1233 : _Eos(_Num);
  7239. ; 1234 : }
  7240. ; 1235 : return (*this);
  7241. ; 1236 : }
  7242. ; 1237 :
  7243. ; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
  7244. ; 1239 : { // insert [_Ptr, <null>) at _Off
  7245. ; 1240 : _DEBUG_POINTER(_Ptr);
  7246. ; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
  7247. ; 1242 : }
  7248. ; 1243 :
  7249. ; 1244 : _Myt& insert(size_type _Off,
  7250. ; 1245 : size_type _Count, _Elem _Ch)
  7251. ; 1246 : { // insert _Count * _Ch at _Off
  7252. ; 1247 : if (this->_Mysize < _Off)
  7253. ; 1248 : _Xran(); // _Off off end
  7254. ; 1249 : if (npos - this->_Mysize <= _Count)
  7255. ; 1250 : _Xlen(); // result too long
  7256. ; 1251 : size_type _Num;
  7257. ; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  7258. ; 1253 : { // make room and insert new stuff
  7259. ; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
  7260. ; 1255 : this->_Myptr() + _Off,
  7261. ; 1256 : this->_Mysize - _Off); // empty out hole
  7262. ; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
  7263. ; 1258 : _Eos(_Num);
  7264. ; 1259 : }
  7265. ; 1260 : return (*this);
  7266. ; 1261 : }
  7267. ; 1262 :
  7268. ; 1263 : iterator insert(const_iterator _Where)
  7269. ; 1264 : { // insert <null> at _Where
  7270. ; 1265 : return (insert(_Where, _Elem()));
  7271. ; 1266 : }
  7272. ; 1267 :
  7273. ; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
  7274. ; 1269 : { // insert _Ch at _Where
  7275. ; 1270 : size_type _Off = _Pdif(_Where, begin());
  7276. ; 1271 : insert(_Off, 1, _Ch);
  7277. ; 1272 : return (begin() + _Off);
  7278. ; 1273 : }
  7279. ; 1274 :
  7280. ; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
  7281. ; 1276 : { // insert _Count * _Elem at _Where
  7282. ; 1277 : size_type _Off = _Pdif(_Where, begin());
  7283. ; 1278 : insert(_Off, _Count, _Ch);
  7284. ; 1279 : return (begin() + _Off);
  7285. ; 1280 : }
  7286. ; 1281 :
  7287. ; 1282 : template<class _Iter>
  7288. ; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
  7289. ; 1284 : iterator>::type
  7290. ; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  7291. ; 1286 : { // insert [_First, _Last) at _Where, input iterators
  7292. ; 1287 : size_type _Off = _Pdif(_Where, begin());
  7293. ; 1288 : replace(_Where, _Where, _First, _Last);
  7294. ; 1289 : return (begin() + _Off);
  7295. ; 1290 : }
  7296. ; 1291 :
  7297. ; 1292 : iterator insert(const_iterator _Where,
  7298. ; 1293 : const_pointer _First, const_pointer _Last)
  7299. ; 1294 : { // insert [_First, _Last) at _Where, const pointers
  7300. ; 1295 : size_type _Off = _Pdif(_Where, begin());
  7301. ; 1296 : replace(_Where, _Where, _First, _Last);
  7302. ; 1297 : return (begin() + _Off);
  7303. ; 1298 : }
  7304. ; 1299 :
  7305. ; 1300 : iterator insert(const_iterator _Where,
  7306. ; 1301 : const_iterator _First, const_iterator _Last)
  7307. ; 1302 : { // insert [_First, _Last) at _Where, const_iterators
  7308. ; 1303 : size_type _Off = _Pdif(_Where, begin());
  7309. ; 1304 : replace(_Where, _Where, _First, _Last);
  7310. ; 1305 : return (begin() + _Off);
  7311. ; 1306 : }
  7312. ; 1307 :
  7313. ; 1308 : _Myt& erase(size_type _Off = 0)
  7314. ; 1309 : { // erase elements [_Off, ...)
  7315. ; 1310 : if (this->_Mysize < _Off)
  7316. ; 1311 : _Xran(); // _Off off end
  7317. ; 1312 : _Eos(_Off);
  7318. ; 1313 : return (*this);
  7319. ; 1314 : }
  7320. ; 1315 :
  7321. ; 1316 : _Myt& erase(size_type _Off, size_type _Count)
  7322. ; 1317 : { // erase elements [_Off, _Off + _Count)
  7323. ; 1318 : if (this->_Mysize < _Off)
  7324. ; 1319 : _Xran(); // _Off off end
  7325. ; 1320 : if (this->_Mysize - _Off <= _Count)
  7326. ; 1321 : _Eos(_Off); // erase elements [_Off, ...)
  7327. ; 1322 : else if (0 < _Count)
  7328. ; 1323 : { // move elements down
  7329. ; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
  7330. ; 1325 : size_type _Newsize = this->_Mysize - _Count;
  7331. ; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
  7332. ; 1327 : _Eos(_Newsize);
  7333. ; 1328 : }
  7334. ; 1329 : return (*this);
  7335. ; 1330 : }
  7336. ; 1331 :
  7337. ; 1332 : iterator erase(const_iterator _Where)
  7338. ; 1333 : { // erase element at _Where
  7339. ; 1334 : size_type _Count = _Pdif(_Where, begin());
  7340. ; 1335 : erase(_Count, 1);
  7341. ; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  7342. ; 1337 : }
  7343. ; 1338 :
  7344. ; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
  7345. ; 1340 : { // erase substring [_First, _Last)
  7346. ; 1341 : _DEBUG_RANGE(_First, _Last);
  7347. ; 1342 : size_type _Count = _Pdif(_First, begin());
  7348. ; 1343 : erase(_Count, _Pdif(_Last, _First));
  7349. ; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  7350. ; 1345 : }
  7351. ; 1346 :
  7352. ; 1347 : void clear() _NOEXCEPT
  7353. ; 1348 : { // erase all
  7354. ; 1349 : _Eos(0);
  7355. ; 1350 : }
  7356. ; 1351 :
  7357. ; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
  7358. ; 1353 : { // replace [_Off, _Off + _N0) with _Right
  7359. ; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
  7360. ; 1355 : }
  7361. ; 1356 :
  7362. ; 1357 : _Myt& replace(size_type _Off,
  7363. ; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
  7364. ; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  7365. ; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  7366. ; 1361 : _Xran(); // _Off or _Roff off end
  7367. ; 1362 : if (this->_Mysize - _Off < _N0)
  7368. ; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  7369. ; 1364 : size_type _Num = _Right.size() - _Roff;
  7370. ; 1365 : if (_Num < _Count)
  7371. ; 1366 : _Count = _Num; // trim _Count to size
  7372. ; 1367 : if (npos - _Count <= this->_Mysize - _N0)
  7373. ; 1368 : _Xlen(); // result too long
  7374. ; 1369 :
  7375. ; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
  7376. ; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
  7377. ; 1372 : if (this->_Mysize < _Newsize)
  7378. ; 1373 : _Grow(_Newsize);
  7379. ; 1374 :
  7380. ; 1375 : if (this != &_Right)
  7381. ; 1376 : { // no overlap, just move down and copy in new stuff
  7382. ; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
  7383. ; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
  7384. ; 1379 : _Traits::copy(this->_Myptr() + _Off,
  7385. ; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
  7386. ; 1381 : }
  7387. ; 1382 : else if (_Count <= _N0)
  7388. ; 1383 : { // hole doesn't get larger, just copy in substring
  7389. ; 1384 : _Traits::move(this->_Myptr() + _Off,
  7390. ; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
  7391. ; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
  7392. ; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  7393. ; 1388 : }
  7394. ; 1389 : else if (_Roff <= _Off)
  7395. ; 1390 : { // hole gets larger, substring begins before hole
  7396. ; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
  7397. ; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  7398. ; 1393 : _Traits::move(this->_Myptr() + _Off,
  7399. ; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
  7400. ; 1395 : }
  7401. ; 1396 : else if (_Off + _N0 <= _Roff)
  7402. ; 1397 : { // hole gets larger, substring begins after hole
  7403. ; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
  7404. ; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  7405. ; 1400 : _Traits::move(this->_Myptr() + _Off,
  7406. ; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
  7407. ; 1402 : _Count); // fill hole
  7408. ; 1403 : }
  7409. ; 1404 : else
  7410. ; 1405 : { // hole gets larger, substring begins in hole
  7411. ; 1406 : _Traits::move(this->_Myptr() + _Off,
  7412. ; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
  7413. ; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
  7414. ; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  7415. ; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
  7416. ; 1411 : this->_Myptr() + _Roff + _Count,
  7417. ; 1412 : _Count - _N0); // fill rest of new hole
  7418. ; 1413 : }
  7419. ; 1414 :
  7420. ; 1415 : _Eos(_Newsize);
  7421. ; 1416 : return (*this);
  7422. ; 1417 : }
  7423. ; 1418 :
  7424. ; 1419 : _Myt& replace(size_type _Off,
  7425. ; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
  7426. ; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  7427. ; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
  7428. ; 1423 : if (_Count != 0)
  7429. ; 1424 : _DEBUG_POINTER(_Ptr);
  7430. ; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7431. ; 1426 :
  7432. ; 1427 : if (_Inside(_Ptr))
  7433. ; 1428 : return (replace(_Off, _N0, *this,
  7434. ; 1429 : _Ptr - this->_Myptr(),
  7435. ; 1430 : _Count)); // substring, replace carefully
  7436. ; 1431 : if (this->_Mysize < _Off)
  7437. ; 1432 : _Xran(); // _Off off end
  7438. ; 1433 : if (this->_Mysize - _Off < _N0)
  7439. ; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  7440. ; 1435 : if (npos - _Count <= this->_Mysize - _N0)
  7441. ; 1436 : _Xlen(); // result too long
  7442. ; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
  7443. ; 1438 :
  7444. ; 1439 : if (_Count < _N0)
  7445. ; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
  7446. ; 1441 : this->_Myptr() + _Off + _N0,
  7447. ; 1442 : _Nm); // smaller hole, move tail up
  7448. ; 1443 : size_type _Num;
  7449. ; 1444 : if ((0 < _Count || 0 < _N0)
  7450. ; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  7451. ; 1446 : { // make room and rearrange
  7452. ; 1447 : if (_N0 < _Count)
  7453. ; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
  7454. ; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  7455. ; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  7456. ; 1451 : _Eos(_Num);
  7457. ; 1452 : }
  7458. ; 1453 : return (*this);
  7459. ; 1454 : }
  7460. ; 1455 :
  7461. ; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
  7462. ; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
  7463. ; 1458 : _DEBUG_POINTER(_Ptr);
  7464. ; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  7465. ; 1460 : }
  7466. ; 1461 :
  7467. ; 1462 : _Myt& replace(size_type _Off,
  7468. ; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
  7469. ; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
  7470. ; 1465 : if (this->_Mysize < _Off)
  7471. ; 1466 : _Xran(); // _Off off end
  7472. ; 1467 : if (this->_Mysize - _Off < _N0)
  7473. ; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  7474. ; 1469 : if (npos - _Count <= this->_Mysize - _N0)
  7475. ; 1470 : _Xlen(); // result too long
  7476. ; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
  7477. ; 1472 :
  7478. ; 1473 : if (_Count < _N0)
  7479. ; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
  7480. ; 1475 : this->_Myptr() + _Off + _N0,
  7481. ; 1476 : _Nm); // smaller hole, move tail up
  7482. ; 1477 : size_type _Num;
  7483. ; 1478 : if ((0 < _Count || 0 < _N0)
  7484. ; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  7485. ; 1480 : { // make room and rearrange
  7486. ; 1481 : if (_N0 < _Count)
  7487. ; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
  7488. ; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  7489. ; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
  7490. ; 1485 : _Eos(_Num);
  7491. ; 1486 : }
  7492. ; 1487 : return (*this);
  7493. ; 1488 : }
  7494. ; 1489 :
  7495. ; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
  7496. ; 1491 : const _Myt& _Right)
  7497. ; 1492 : { // replace [_First, _Last) with _Right
  7498. ; 1493 : return (replace(
  7499. ; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
  7500. ; 1495 : }
  7501. ; 1496 :
  7502. ; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
  7503. ; 1498 : const _Elem *_Ptr, size_type _Count)
  7504. ; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
  7505. ; 1500 : return (replace(
  7506. ; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
  7507. ; 1502 : }
  7508. ; 1503 :
  7509. ; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
  7510. ; 1505 : const _Elem *_Ptr)
  7511. ; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
  7512. ; 1507 : return (replace(
  7513. ; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
  7514. ; 1509 : }
  7515. ; 1510 :
  7516. ; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
  7517. ; 1512 : size_type _Count, _Elem _Ch)
  7518. ; 1513 : { // replace [_First, _Last) with _Count * _Ch
  7519. ; 1514 : return (replace(
  7520. ; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
  7521. ; 1516 : }
  7522. ; 1517 :
  7523. ; 1518 : template<class _Iter>
  7524. ; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
  7525. ; 1520 : _Myt&>::type
  7526. ; 1521 : replace(const_iterator _First, const_iterator _Last,
  7527. ; 1522 : _Iter _First2, _Iter _Last2)
  7528. ; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
  7529. ; 1524 : _Myt _Right(_First2, _Last2);
  7530. ; 1525 : replace(_First, _Last, _Right);
  7531. ; 1526 : return (*this);
  7532. ; 1527 : }
  7533. ; 1528 :
  7534. ; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
  7535. ; 1530 : const_pointer _First2, const_pointer _Last2)
  7536. ; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  7537. ; 1532 : if (_First2 == _Last2)
  7538. ; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  7539. ; 1534 : else
  7540. ; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  7541. ; 1536 : &*_First2, _Last2 - _First2);
  7542. ; 1537 : return (*this);
  7543. ; 1538 : }
  7544. ; 1539 :
  7545. ; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
  7546. ; 1541 : pointer _First2, pointer _Last2)
  7547. ; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  7548. ; 1543 : if (_First2 == _Last2)
  7549. ; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  7550. ; 1545 : else
  7551. ; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  7552. ; 1547 : &*_First2, _Last2 - _First2);
  7553. ; 1548 : return (*this);
  7554. ; 1549 : }
  7555. ; 1550 :
  7556. ; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
  7557. ; 1552 : const_iterator _First2, const_iterator _Last2)
  7558. ; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  7559. ; 1554 : if (_First2 == _Last2)
  7560. ; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  7561. ; 1556 : else
  7562. ; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  7563. ; 1558 : &*_First2, _Last2 - _First2);
  7564. ; 1559 : return (*this);
  7565. ; 1560 : }
  7566. ; 1561 :
  7567. ; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
  7568. ; 1563 : iterator _First2, iterator _Last2)
  7569. ; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  7570. ; 1565 : if (_First2 == _Last2)
  7571. ; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  7572. ; 1567 : else
  7573. ; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  7574. ; 1569 : &*_First2, _Last2 - _First2);
  7575. ; 1570 : return (*this);
  7576. ; 1571 : }
  7577. ; 1572 :
  7578. ; 1573 : iterator begin() _NOEXCEPT
  7579. ; 1574 : { // return iterator for beginning of mutable sequence
  7580. ; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
  7581. ; 1576 : }
  7582. ; 1577 :
  7583. ; 1578 : const_iterator begin() const _NOEXCEPT
  7584. ; 1579 : { // return iterator for beginning of nonmutable sequence
  7585. ; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
  7586. ; 1581 : }
  7587. ; 1582 :
  7588. ; 1583 : iterator end() _NOEXCEPT
  7589. ; 1584 : { // return iterator for end of mutable sequence
  7590. ; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
  7591. ; 1586 : }
  7592. ; 1587 :
  7593. ; 1588 : const_iterator end() const _NOEXCEPT
  7594. ; 1589 : { // return iterator for end of nonmutable sequence
  7595. ; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
  7596. ; 1591 : }
  7597. ; 1592 :
  7598. ; 1593 : reverse_iterator rbegin() _NOEXCEPT
  7599. ; 1594 : { // return iterator for beginning of reversed mutable sequence
  7600. ; 1595 : return (reverse_iterator(end()));
  7601. ; 1596 : }
  7602. ; 1597 :
  7603. ; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
  7604. ; 1599 : { // return iterator for beginning of reversed nonmutable sequence
  7605. ; 1600 : return (const_reverse_iterator(end()));
  7606. ; 1601 : }
  7607. ; 1602 :
  7608. ; 1603 : reverse_iterator rend() _NOEXCEPT
  7609. ; 1604 : { // return iterator for end of reversed mutable sequence
  7610. ; 1605 : return (reverse_iterator(begin()));
  7611. ; 1606 : }
  7612. ; 1607 :
  7613. ; 1608 : const_reverse_iterator rend() const _NOEXCEPT
  7614. ; 1609 : { // return iterator for end of reversed nonmutable sequence
  7615. ; 1610 : return (const_reverse_iterator(begin()));
  7616. ; 1611 : }
  7617. ; 1612 :
  7618. ; 1613 : #if _HAS_CPP0X
  7619. ; 1614 : const_iterator cbegin() const _NOEXCEPT
  7620. ; 1615 : { // return iterator for beginning of nonmutable sequence
  7621. ; 1616 : return (((const _Myt *)this)->begin());
  7622. ; 1617 : }
  7623. ; 1618 :
  7624. ; 1619 : const_iterator cend() const _NOEXCEPT
  7625. ; 1620 : { // return iterator for end of nonmutable sequence
  7626. ; 1621 : return (((const _Myt *)this)->end());
  7627. ; 1622 : }
  7628. ; 1623 :
  7629. ; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
  7630. ; 1625 : { // return iterator for beginning of reversed nonmutable sequence
  7631. ; 1626 : return (((const _Myt *)this)->rbegin());
  7632. ; 1627 : }
  7633. ; 1628 :
  7634. ; 1629 : const_reverse_iterator crend() const _NOEXCEPT
  7635. ; 1630 : { // return iterator for end of reversed nonmutable sequence
  7636. ; 1631 : return (((const _Myt *)this)->rend());
  7637. ; 1632 : }
  7638. ; 1633 :
  7639. ; 1634 : void shrink_to_fit()
  7640. ; 1635 : { // reduce capacity
  7641. ; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
  7642. ; 1637 : { // worth shrinking, do it
  7643. ; 1638 : _Myt _Tmp(*this);
  7644. ; 1639 : swap(_Tmp);
  7645. ; 1640 : }
  7646. ; 1641 : }
  7647. ; 1642 : #endif /* _HAS_CPP0X */
  7648. ; 1643 :
  7649. ; 1644 : reference at(size_type _Off)
  7650. ; 1645 : { // subscript mutable sequence with checking
  7651. ; 1646 : if (this->_Mysize <= _Off)
  7652. ; 1647 : _Xran(); // _Off off end
  7653. ; 1648 : return (this->_Myptr()[_Off]);
  7654. ; 1649 : }
  7655. ; 1650 :
  7656. ; 1651 : const_reference at(size_type _Off) const
  7657. ; 1652 : { // subscript nonmutable sequence with checking
  7658. ; 1653 : if (this->_Mysize <= _Off)
  7659. ; 1654 : _Xran(); // _Off off end
  7660. ; 1655 : return (this->_Myptr()[_Off]);
  7661. ; 1656 : }
  7662. ; 1657 :
  7663. ; 1658 : reference operator[](size_type _Off)
  7664. ; 1659 : { // subscript mutable sequence
  7665. ; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
  7666. ; 1661 : if (this->_Mysize < _Off) // sic
  7667. ; 1662 : _DEBUG_ERROR("string subscript out of range");
  7668. ; 1663 :
  7669. ; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
  7670. ; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  7671. ; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7672. ; 1667 :
  7673. ; 1668 : return (this->_Myptr()[_Off]);
  7674. ; 1669 : }
  7675. ; 1670 :
  7676. ; 1671 : const_reference operator[](size_type _Off) const
  7677. ; 1672 : { // subscript nonmutable sequence
  7678. ; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
  7679. ; 1674 : if (this->_Mysize < _Off) // sic
  7680. ; 1675 : _DEBUG_ERROR("string subscript out of range");
  7681. ; 1676 :
  7682. ; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
  7683. ; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  7684. ; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7685. ; 1680 :
  7686. ; 1681 : return (this->_Myptr()[_Off]);
  7687. ; 1682 : }
  7688. ; 1683 :
  7689. ; 1684 : void push_back(_Elem _Ch)
  7690. ; 1685 : { // insert element at end
  7691. ; 1686 : insert(end(), _Ch);
  7692. ; 1687 : }
  7693. ; 1688 :
  7694. ; 1689 : #if _HAS_CPP0X
  7695. ; 1690 : void pop_back()
  7696. ; 1691 : { // erase element at end
  7697. ; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
  7698. ; 1693 : }
  7699. ; 1694 :
  7700. ; 1695 : reference front()
  7701. ; 1696 : { // return first element of mutable sequence
  7702. ; 1697 : return (*begin());
  7703. ; 1698 : }
  7704. ; 1699 :
  7705. ; 1700 : const_reference front() const
  7706. ; 1701 : { // return first element of nonmutable sequence
  7707. ; 1702 : return (*begin());
  7708. ; 1703 : }
  7709. ; 1704 :
  7710. ; 1705 : reference back()
  7711. ; 1706 : { // return last element of mutable sequence
  7712. ; 1707 : return (*(end() - 1));
  7713. ; 1708 : }
  7714. ; 1709 :
  7715. ; 1710 : const_reference back() const
  7716. ; 1711 : { // return last element of nonmutable sequence
  7717. ; 1712 : return (*(end() - 1));
  7718. ; 1713 : }
  7719. ; 1714 : #endif /* _HAS_CPP0X */
  7720. ; 1715 :
  7721. ; 1716 : const _Elem *c_str() const _NOEXCEPT
  7722. ; 1717 : { // return pointer to null-terminated nonmutable array
  7723. ; 1718 : return (this->_Myptr());
  7724. ; 1719 : }
  7725. ; 1720 :
  7726. ; 1721 : const _Elem *data() const _NOEXCEPT
  7727. ; 1722 : { // return pointer to nonmutable array
  7728. ; 1723 : return (c_str());
  7729. ; 1724 : }
  7730. ; 1725 :
  7731. ; 1726 : size_type length() const _NOEXCEPT
  7732. ; 1727 : { // return length of sequence
  7733. ; 1728 : return (this->_Mysize);
  7734. ; 1729 : }
  7735. ; 1730 :
  7736. ; 1731 : size_type size() const _NOEXCEPT
  7737. ; 1732 : { // return length of sequence
  7738. ; 1733 : return (this->_Mysize);
  7739. ; 1734 : }
  7740. ; 1735 :
  7741. ; 1736 : size_type max_size() const _NOEXCEPT
  7742. ; 1737 : { // return maximum possible length of sequence
  7743. ; 1738 : size_type _Num = this->_Getal().max_size();
  7744. ; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
  7745. ; 1740 : }
  7746. ; 1741 :
  7747. ; 1742 : void resize(size_type _Newsize)
  7748. ; 1743 : { // determine new length, padding with null elements as needed
  7749. ; 1744 : resize(_Newsize, _Elem());
  7750. ; 1745 : }
  7751. ; 1746 :
  7752. ; 1747 : void resize(size_type _Newsize, _Elem _Ch)
  7753. ; 1748 : { // determine new length, padding with _Ch elements as needed
  7754. ; 1749 : if (_Newsize <= this->_Mysize)
  7755. ; 1750 : _Eos(_Newsize);
  7756. ; 1751 : else
  7757. ; 1752 : append(_Newsize - this->_Mysize, _Ch);
  7758. ; 1753 : }
  7759. ; 1754 :
  7760. ; 1755 : size_type capacity() const _NOEXCEPT
  7761. ; 1756 : { // return current length of allocated storage
  7762. ; 1757 : return (this->_Myres);
  7763. ; 1758 : }
  7764. ; 1759 :
  7765. ; 1760 : void reserve(size_type _Newcap = 0)
  7766. ; 1761 : { // determine new minimum length of allocated storage
  7767. ; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
  7768. ; 1763 : { // change reservation
  7769. ; 1764 : size_type _Size = this->_Mysize;
  7770. ; 1765 : if (_Grow(_Newcap, true))
  7771. ; 1766 : _Eos(_Size);
  7772. ; 1767 : }
  7773. ; 1768 : }
  7774. ; 1769 :
  7775. ; 1770 : bool empty() const _NOEXCEPT
  7776. ; 1771 : { // test if sequence is empty
  7777. ; 1772 : return (this->_Mysize == 0);
  7778. ; 1773 : }
  7779. ; 1774 :
  7780. ; 1775 : _SCL_INSECURE_DEPRECATE
  7781. ; 1776 :
  7782. ; 1777 : size_type copy(_Elem *_Ptr,
  7783. ; 1778 : size_type _Count, size_type _Off = 0) const
  7784. ; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
  7785. ; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
  7786. ; 1781 : if (_Count != 0)
  7787. ; 1782 : _DEBUG_POINTER(_Ptr);
  7788. ; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7789. ; 1784 :
  7790. ; 1785 : if (this->_Mysize < _Off)
  7791. ; 1786 : _Xran(); // _Off off end
  7792. ; 1787 : if (this->_Mysize - _Off < _Count)
  7793. ; 1788 : _Count = this->_Mysize - _Off;
  7794. ; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
  7795. ; 1790 : return (_Count);
  7796. ; 1791 : }
  7797. ; 1792 :
  7798. ; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
  7799. ; 1794 : size_type _Count, size_type _Off = 0) const
  7800. ; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
  7801. ; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
  7802. ; 1797 : if (_Count != 0)
  7803. ; 1798 : _DEBUG_POINTER(_Dest);
  7804. ; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7805. ; 1800 :
  7806. ; 1801 : if (this->_Mysize < _Off)
  7807. ; 1802 : _Xran(); // _Off off end
  7808. ; 1803 : if (this->_Mysize - _Off < _Count)
  7809. ; 1804 : _Count = this->_Mysize - _Off;
  7810. ; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
  7811. ; 1806 : return (_Count);
  7812. ; 1807 : }
  7813. ; 1808 :
  7814. ; 1809 : void _Swap_bx(_Myt& _Right)
  7815. ; 1810 : { // exchange _Bx with _Right._Bx
  7816. ; 1811 : if (this->_BUF_SIZE <= this->_Myres)
  7817. ; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
  7818. ; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
  7819. ; 1814 : else
  7820. ; 1815 : { // swap large with small
  7821. ; 1816 : pointer _Ptr = this->_Bx._Ptr;
  7822. ; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
  7823. ; 1818 : _Traits::copy(this->_Bx._Buf,
  7824. ; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
  7825. ; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
  7826. ; 1821 : }
  7827. ; 1822 : else
  7828. ; 1823 : if (_Right._Myres < this->_BUF_SIZE)
  7829. ; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
  7830. ; 1825 : else
  7831. ; 1826 : { // swap small with large
  7832. ; 1827 : pointer _Ptr = _Right._Bx._Ptr;
  7833. ; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
  7834. ; 1829 : _Traits::copy(_Right._Bx._Buf,
  7835. ; 1830 : this->_Bx._Buf, this->_Mysize + 1);
  7836. ; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  7837. ; 1832 : }
  7838. ; 1833 : }
  7839. ; 1834 :
  7840. ; 1835 : void swap(_Myt& _Right)
  7841. ; 1836 : { // exchange contents with _Right
  7842. ; 1837 : if (this == &_Right)
  7843. ; 1838 : ; // same object, do nothing
  7844. ; 1839 : else if (this->_Getal() == _Right._Getal())
  7845. ; 1840 : { // same allocator, swap control information
  7846. ; 1841 : this->_Swap_all(_Right);
  7847. ; 1842 : _Swap_bx(_Right);
  7848. ; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
  7849. ; 1844 : _STD swap(this->_Myres, _Right._Myres);
  7850. ; 1845 : }
  7851. ; 1846 :
  7852. ; 1847 : #if _HAS_CPP0X
  7853. ; 1848 : else if (_Alty::propagate_on_container_swap::value)
  7854. ; 1849 : { // swap allocators and control information
  7855. ; 1850 : this->_Swap_alloc(_Right);
  7856. ; 1851 : _Swap_bx(_Right);
  7857. ; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
  7858. ; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
  7859. ; 1854 : _STD swap(this->_Myres, _Right._Myres);
  7860. ; 1855 : }
  7861. ; 1856 : #endif /* _HAS_CPP0X */
  7862. ; 1857 :
  7863. ; 1858 : else
  7864. ; 1859 : { // different allocator, do multiple assigns
  7865. ; 1860 : _Myt _Tmp = *this;
  7866. ; 1861 :
  7867. ; 1862 : *this = _Right;
  7868. ; 1863 : _Right = _Tmp;
  7869. ; 1864 : }
  7870. ; 1865 : }
  7871. ; 1866 :
  7872. ; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
  7873. ; 1868 : { // look for _Right beginning at or after _Off
  7874. ; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
  7875. ; 1870 : }
  7876. ; 1871 :
  7877. ; 1872 : size_type find(const _Elem *_Ptr,
  7878. ; 1873 : size_type _Off, size_type _Count) const
  7879. ; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
  7880. ; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
  7881. ; 1876 : if (_Count != 0)
  7882. ; 1877 : _DEBUG_POINTER(_Ptr);
  7883. ; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7884. ; 1879 :
  7885. ; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
  7886. ; 1881 : return (_Off); // null string always matches (if inside string)
  7887. ; 1882 :
  7888. ; 1883 : size_type _Nm;
  7889. ; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
  7890. ; 1885 : { // room for match, look for it
  7891. ; 1886 : const _Elem *_Uptr, *_Vptr;
  7892. ; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
  7893. ; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
  7894. ; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
  7895. ; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
  7896. ; 1891 : return (_Uptr - this->_Myptr()); // found a match
  7897. ; 1892 : }
  7898. ; 1893 :
  7899. ; 1894 : return (npos); // no match
  7900. ; 1895 : }
  7901. ; 1896 :
  7902. ; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
  7903. ; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
  7904. ; 1899 : _DEBUG_POINTER(_Ptr);
  7905. ; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
  7906. ; 1901 : }
  7907. ; 1902 :
  7908. ; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
  7909. ; 1904 : { // look for _Ch at or after _Off
  7910. ; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
  7911. ; 1906 : }
  7912. ; 1907 :
  7913. ; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
  7914. ; 1909 : { // look for _Right beginning before _Off
  7915. ; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
  7916. ; 1911 : }
  7917. ; 1912 :
  7918. ; 1913 : size_type rfind(const _Elem *_Ptr,
  7919. ; 1914 : size_type _Off, size_type _Count) const
  7920. ; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
  7921. ; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
  7922. ; 1917 : if (_Count != 0)
  7923. ; 1918 : _DEBUG_POINTER(_Ptr);
  7924. ; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7925. ; 1920 :
  7926. ; 1921 : if (_Count == 0)
  7927. ; 1922 : return (_Off < this->_Mysize ? _Off
  7928. ; 1923 : : this->_Mysize); // null always matches
  7929. ; 1924 : if (_Count <= this->_Mysize)
  7930. ; 1925 : { // room for match, look for it
  7931. ; 1926 : const _Elem *_Uptr = this->_Myptr() +
  7932. ; 1927 : (_Off < this->_Mysize - _Count ? _Off
  7933. ; 1928 : : this->_Mysize - _Count);
  7934. ; 1929 : for (; ; --_Uptr)
  7935. ; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
  7936. ; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
  7937. ; 1932 : return (_Uptr - this->_Myptr()); // found a match
  7938. ; 1933 : else if (_Uptr == this->_Myptr())
  7939. ; 1934 : break; // at beginning, no more chance for match
  7940. ; 1935 : }
  7941. ; 1936 :
  7942. ; 1937 : return (npos); // no match
  7943. ; 1938 : }
  7944. ; 1939 :
  7945. ; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
  7946. ; 1941 : { // look for [_Ptr, <null>) beginning before _Off
  7947. ; 1942 : _DEBUG_POINTER(_Ptr);
  7948. ; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
  7949. ; 1944 : }
  7950. ; 1945 :
  7951. ; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
  7952. ; 1947 : { // look for _Ch before _Off
  7953. ; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  7954. ; 1949 : }
  7955. ; 1950 :
  7956. ; 1951 : size_type find_first_of(const _Myt& _Right,
  7957. ; 1952 : size_type _Off = 0) const _NOEXCEPT
  7958. ; 1953 : { // look for one of _Right at or after _Off
  7959. ; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
  7960. ; 1955 : }
  7961. ; 1956 :
  7962. ; 1957 : size_type find_first_of(const _Elem *_Ptr,
  7963. ; 1958 : size_type _Off, size_type _Count) const
  7964. ; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
  7965. ; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
  7966. ; 1961 : if (_Count != 0)
  7967. ; 1962 : _DEBUG_POINTER(_Ptr);
  7968. ; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  7969. ; 1964 :
  7970. ; 1965 : if (0 < _Count && _Off < this->_Mysize)
  7971. ; 1966 : { // room for match, look for it
  7972. ; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  7973. ; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  7974. ; 1969 : _Uptr < _Vptr; ++_Uptr)
  7975. ; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  7976. ; 1971 : return (_Uptr - this->_Myptr()); // found a match
  7977. ; 1972 : }
  7978. ; 1973 :
  7979. ; 1974 : return (npos); // no match
  7980. ; 1975 : }
  7981. ; 1976 :
  7982. ; 1977 : size_type find_first_of(const _Elem *_Ptr,
  7983. ; 1978 : size_type _Off = 0) const
  7984. ; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
  7985. ; 1980 : _DEBUG_POINTER(_Ptr);
  7986. ; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
  7987. ; 1982 : }
  7988. ; 1983 :
  7989. ; 1984 : size_type find_first_of(_Elem _Ch,
  7990. ; 1985 : size_type _Off = 0) const
  7991. ; 1986 : { // look for _Ch at or after _Off
  7992. ; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
  7993. ; 1988 : }
  7994. ; 1989 :
  7995. ; 1990 : size_type find_last_of(const _Myt& _Right,
  7996. ; 1991 : size_type _Off = npos) const _NOEXCEPT
  7997. ; 1992 : { // look for one of _Right before _Off
  7998. ; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
  7999. ; 1994 : }
  8000. ; 1995 :
  8001. ; 1996 : size_type find_last_of(const _Elem *_Ptr,
  8002. ; 1997 : size_type _Off, size_type _Count) const
  8003. ; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
  8004. ; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
  8005. ; 2000 : if (_Count != 0)
  8006. ; 2001 : _DEBUG_POINTER(_Ptr);
  8007. ; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  8008. ; 2003 :
  8009. ; 2004 : if (0 < _Count && 0 < this->_Mysize)
  8010. ; 2005 : { // worth searching, do it
  8011. ; 2006 : const _Elem *_Uptr = this->_Myptr()
  8012. ; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  8013. ; 2008 : for (; ; --_Uptr)
  8014. ; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  8015. ; 2010 : return (_Uptr - this->_Myptr()); // found a match
  8016. ; 2011 : else if (_Uptr == this->_Myptr())
  8017. ; 2012 : break; // at beginning, no more chance for match
  8018. ; 2013 : }
  8019. ; 2014 :
  8020. ; 2015 : return (npos); // no match
  8021. ; 2016 : }
  8022. ; 2017 :
  8023. ; 2018 : size_type find_last_of(const _Elem *_Ptr,
  8024. ; 2019 : size_type _Off = npos) const
  8025. ; 2020 : { // look for one of [_Ptr, <null>) before _Off
  8026. ; 2021 : _DEBUG_POINTER(_Ptr);
  8027. ; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
  8028. ; 2023 : }
  8029. ; 2024 :
  8030. ; 2025 : size_type find_last_of(_Elem _Ch,
  8031. ; 2026 : size_type _Off = npos) const
  8032. ; 2027 : { // look for _Ch before _Off
  8033. ; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  8034. ; 2029 : }
  8035. ; 2030 :
  8036. ; 2031 : size_type find_first_not_of(const _Myt& _Right,
  8037. ; 2032 : size_type _Off = 0) const _NOEXCEPT
  8038. ; 2033 : { // look for none of _Right at or after _Off
  8039. ; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
  8040. ; 2035 : _Right.size()));
  8041. ; 2036 : }
  8042. ; 2037 :
  8043. ; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
  8044. ; 2039 : size_type _Off, size_type _Count) const
  8045. ; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
  8046. ; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
  8047. ; 2042 : if (_Count != 0)
  8048. ; 2043 : _DEBUG_POINTER(_Ptr);
  8049. ; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  8050. ; 2045 :
  8051. ; 2046 : if (_Off < this->_Mysize)
  8052. ; 2047 : { // room for match, look for it
  8053. ; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  8054. ; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  8055. ; 2050 : _Uptr < _Vptr; ++_Uptr)
  8056. ; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  8057. ; 2052 : return (_Uptr - this->_Myptr());
  8058. ; 2053 : }
  8059. ; 2054 : return (npos);
  8060. ; 2055 : }
  8061. ; 2056 :
  8062. ; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
  8063. ; 2058 : size_type _Off = 0) const
  8064. ; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
  8065. ; 2060 : _DEBUG_POINTER(_Ptr);
  8066. ; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  8067. ; 2062 : }
  8068. ; 2063 :
  8069. ; 2064 : size_type find_first_not_of(_Elem _Ch,
  8070. ; 2065 : size_type _Off = 0) const
  8071. ; 2066 : { // look for non _Ch at or after _Off
  8072. ; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
  8073. ; 2068 : }
  8074. ; 2069 :
  8075. ; 2070 : size_type find_last_not_of(const _Myt& _Right,
  8076. ; 2071 : size_type _Off = npos) const _NOEXCEPT
  8077. ; 2072 : { // look for none of _Right before _Off
  8078. ; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
  8079. ; 2074 : }
  8080. ; 2075 :
  8081. ; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
  8082. ; 2077 : size_type _Off, size_type _Count) const
  8083. ; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
  8084. ; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
  8085. ; 2080 : if (_Count != 0)
  8086. ; 2081 : _DEBUG_POINTER(_Ptr);
  8087. ; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  8088. ; 2083 :
  8089. ; 2084 : if (0 < this->_Mysize)
  8090. ; 2085 : { // worth searching, do it
  8091. ; 2086 : const _Elem *_Uptr = this->_Myptr()
  8092. ; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  8093. ; 2088 : for (; ; --_Uptr)
  8094. ; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  8095. ; 2090 : return (_Uptr - this->_Myptr());
  8096. ; 2091 : else if (_Uptr == this->_Myptr())
  8097. ; 2092 : break;
  8098. ; 2093 : }
  8099. ; 2094 : return (npos);
  8100. ; 2095 : }
  8101. ; 2096 :
  8102. ; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
  8103. ; 2098 : size_type _Off = npos) const
  8104. ; 2099 : { // look for none of [_Ptr, <null>) before _Off
  8105. ; 2100 : _DEBUG_POINTER(_Ptr);
  8106. ; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  8107. ; 2102 : }
  8108. ; 2103 :
  8109. ; 2104 : size_type find_last_not_of(_Elem _Ch,
  8110. ; 2105 : size_type _Off = npos) const
  8111. ; 2106 : { // look for non _Ch before _Off
  8112. ; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
  8113. ; 2108 : }
  8114. ; 2109 :
  8115. ; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
  8116. ; 2111 : { // return [_Off, _Off + _Count) as new string
  8117. ; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
  8118. ; 2113 : }
  8119. ; 2114 :
  8120. ; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
  8121. ; 2116 : { // compare [0, _Mysize) with _Right
  8122. ; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
  8123. ; 2118 : }
  8124. ; 2119 :
  8125. ; 2120 : int compare(size_type _Off, size_type _N0,
  8126. ; 2121 : const _Myt& _Right) const
  8127. ; 2122 : { // compare [_Off, _Off + _N0) with _Right
  8128. ; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
  8129. ; 2124 : }
  8130. ; 2125 :
  8131. ; 2126 : int compare(size_type _Off,
  8132. ; 2127 : size_type _N0, const _Myt& _Right,
  8133. ; 2128 : size_type _Roff, size_type _Count) const
  8134. ; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  8135. ; 2130 : if (_Right.size() < _Roff)
  8136. ; 2131 : _Xran(); // _Off off end
  8137. ; 2132 : if (_Right._Mysize - _Roff < _Count)
  8138. ; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
  8139. ; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
  8140. ; 2135 : }
  8141. ; 2136 :
  8142. ; 2137 : int compare(const _Elem *_Ptr) const
  8143. ; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
  8144. ; 2139 : _DEBUG_POINTER(_Ptr);
  8145. ; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
  8146. ; 2141 : }
  8147. ; 2142 :
  8148. ; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
  8149. ; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
  8150. ; 2145 : _DEBUG_POINTER(_Ptr);
  8151. ; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  8152. ; 2147 : }
  8153. ; 2148 :
  8154. ; 2149 : int compare(size_type _Off,
  8155. ; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
  8156. ; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  8157. ; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
  8158. ; 2153 : if (_Count != 0)
  8159. ; 2154 : _DEBUG_POINTER(_Ptr);
  8160. ; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  8161. ; 2156 :
  8162. ; 2157 : if (this->_Mysize < _Off)
  8163. ; 2158 : _Xran(); // _Off off end
  8164. ; 2159 : if (this->_Mysize - _Off < _N0)
  8165. ; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  8166. ; 2161 :
  8167. ; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
  8168. ; 2163 : _N0 < _Count ? _N0 : _Count);
  8169. ; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
  8170. ; 2165 : : _N0 == _Count ? 0 : +1);
  8171. ; 2166 : }
  8172. ; 2167 :
  8173. ; 2168 : allocator_type get_allocator() const _NOEXCEPT
  8174. ; 2169 : { // return allocator object for values
  8175. ; 2170 : return (this->_Getal());
  8176. ; 2171 : }
  8177. ; 2172 :
  8178. ; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
  8179. ; 2174 : { // assign _Count copies of _Ch beginning at _Off
  8180. ; 2175 : if (_Count == 1)
  8181. ; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
  8182. ; 2177 : else
  8183. ; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
  8184. ; 2179 : }
  8185. ; 2180 :
  8186. ; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
  8187. ; 2182 : { // copy _Oldlen elements to newly allocated buffer
  8188. ; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
  8189. ; 2184 : if (max_size() < _Newres)
  8190. ; 2185 : _Newres = _Newsize; // undo roundup if too big
  8191. ; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
  8192. ; 2187 : ;
  8193. ; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
  8194. ; 2189 : _Newres = this->_Myres
  8195. ; 2190 : + this->_Myres / 2; // grow exponentially if possible
  8196. ; 2191 : else
  8197. ; 2192 : _Newres = max_size(); // settle for max_size()
  8198. ; 2193 :
  8199. ; 2194 : _Elem *_Ptr;
  8200. ; 2195 : _TRY_BEGIN
  8201. ; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
  8202. ; 2197 : _CATCH_ALL
  8203. ; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
  8204. ; 2199 : _TRY_BEGIN
  8205. ; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
  8206. ; 2201 : _CATCH_ALL
  8207. ; 2202 : _Tidy(true); // failed again, discard storage and reraise
  8208. ; 2203 : _RERAISE;
  8209. ; 2204 : _CATCH_END
  8210. ; 2205 : _CATCH_END
  8211. ; 2206 :
  8212. ; 2207 : if (0 < _Oldlen)
  8213. ; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
  8214. ; 2209 : _Oldlen); // copy existing elements
  8215. ; 2210 : _Tidy(true);
  8216. ; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  8217. ; 2212 : this->_Myres = _Newres;
  8218. ; 2213 : _Eos(_Oldlen);
  8219. ; 2214 : }
  8220. ; 2215 :
  8221. ; 2216 : void _Eos(size_type _Newsize)
  8222. ; 2217 : { // set new length and null terminator
  8223. ; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
  8224.  
  8225. mov DWORD PTR [esi+16], 0
  8226. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  8227.  
  8228. ; 564 : _Left = _Right;
  8229.  
  8230. mov BYTE PTR [esi], 0
  8231. pop esi
  8232. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  8233.  
  8234. ; 965 : }
  8235.  
  8236. ret 0
  8237. ??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> >
  8238. _TEXT ENDS
  8239. ; Function compile flags: /Ogtp
  8240. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  8241. ; COMDAT ??0?$vector@HV?$allocator@H@std@@@std@@QAE@XZ
  8242. _TEXT SEGMENT
  8243. ??0?$vector@HV?$allocator@H@std@@@std@@QAE@XZ PROC ; std::vector<int,std::allocator<int> >::vector<int,std::allocator<int> >, COMDAT
  8244. ; _this$ = ecx
  8245.  
  8246. ; 486 : _Myfirst = pointer();
  8247.  
  8248. mov DWORD PTR [ecx], 0
  8249.  
  8250. ; 487 : _Mylast = pointer();
  8251.  
  8252. mov DWORD PTR [ecx+4], 0
  8253.  
  8254. ; 488 : _Myend = pointer();
  8255.  
  8256. mov DWORD PTR [ecx+8], 0
  8257.  
  8258. ; 686 : }
  8259.  
  8260. mov eax, ecx
  8261. ret 0
  8262. ??0?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ENDP ; std::vector<int,std::allocator<int> >::vector<int,std::allocator<int> >
  8263. _TEXT ENDS
  8264. ; Function compile flags: /Ogtp
  8265. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  8266. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  8267. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  8268. ; COMDAT ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ
  8269. _TEXT SEGMENT
  8270. ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ PROC ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >, COMDAT
  8271. ; _this$ = ecx
  8272.  
  8273. ; 899 : { // destroy the object
  8274.  
  8275. push esi
  8276. mov esi, ecx
  8277.  
  8278. ; 902 :
  8279. ; 903 : _Myt& operator=(const _Myt& _Right)
  8280. ; 904 : { // assign _Right
  8281. ; 905 : if (this != &_Right)
  8282. ; 906 : { // different, assign it
  8283. ; 907 : #if _HAS_CPP0X
  8284. ; 908 : if (this->_Getal() != _Right._Getal()
  8285. ; 909 : && _Alty::propagate_on_container_copy_assignment::value)
  8286. ; 910 : { // change allocator before copying
  8287. ; 911 : _Tidy();
  8288. ; 912 : this->_Change_alloc(_Right._Getal());
  8289. ; 913 : }
  8290. ; 914 : #endif /* _HAS_CPP0X */
  8291. ; 915 :
  8292. ; 916 : this->_Orphan_all();
  8293. ; 917 :
  8294. ; 918 : if (_Right.empty())
  8295. ; 919 : clear(); // new sequence empty, erase existing sequence
  8296. ; 920 : else if (_Right.size() <= size())
  8297. ; 921 : { // enough elements, copy new and destroy old
  8298. ; 922 : pointer _Ptr = _Copy_impl(_Right._Myfirst,
  8299. ; 923 : _Right._Mylast, this->_Myfirst); // copy new
  8300. ; 924 : _Destroy(_Ptr, this->_Mylast); // destroy old
  8301. ; 925 : this->_Mylast = this->_Myfirst + _Right.size();
  8302. ; 926 : }
  8303. ; 927 : else if (_Right.size() <= capacity())
  8304. ; 928 : { // enough room, copy and construct new
  8305. ; 929 : pointer _Ptr = _Right._Myfirst + size();
  8306. ; 930 : _Copy_impl(_Right._Myfirst,
  8307. ; 931 : _Ptr, this->_Myfirst);
  8308. ; 932 : this->_Mylast = _Ucopy(_Ptr, _Right._Mylast, this->_Mylast);
  8309. ; 933 : }
  8310. ; 934 : else
  8311. ; 935 : { // not enough room, allocate new array and construct new
  8312. ; 936 : if (this->_Myfirst != pointer())
  8313. ; 937 : { // discard old array
  8314. ; 938 : _Destroy(this->_Myfirst, this->_Mylast);
  8315. ; 939 : this->_Getal().deallocate(this->_Myfirst,
  8316. ; 940 : this->_Myend - this->_Myfirst);
  8317. ; 941 : }
  8318. ; 942 : if (_Buy(_Right.size()))
  8319. ; 943 : _TRY_BEGIN
  8320. ; 944 : this->_Mylast = _Ucopy(_Right._Myfirst, _Right._Mylast,
  8321. ; 945 : this->_Myfirst);
  8322. ; 946 : _CATCH_ALL
  8323. ; 947 : _Tidy();
  8324. ; 948 : _RERAISE;
  8325. ; 949 : _CATCH_END
  8326. ; 950 : }
  8327. ; 951 : }
  8328. ; 952 : return (*this);
  8329. ; 953 : }
  8330. ; 954 :
  8331. ; 955 : void reserve(size_type _Count)
  8332. ; 956 : { // determine new minimum length of allocated storage
  8333. ; 957 : if (capacity() < _Count)
  8334. ; 958 : { // something to do, check and reallocate
  8335. ; 959 : if (max_size() < _Count)
  8336. ; 960 : _Xlen();
  8337. ; 961 : _Reallocate(_Count);
  8338. ; 962 : }
  8339. ; 963 : }
  8340. ; 964 :
  8341. ; 965 : size_type capacity() const _NOEXCEPT
  8342. ; 966 : { // return current length of allocated storage
  8343. ; 967 : return (this->_Myend - this->_Myfirst);
  8344. ; 968 : }
  8345. ; 969 :
  8346. ; 970 : size_type _Unused_capacity() const _NOEXCEPT
  8347. ; 971 : { // micro-optimization for capacity() - size()
  8348. ; 972 : return (this->_Myend - this->_Mylast);
  8349. ; 973 : }
  8350. ; 974 :
  8351. ; 975 : size_type _Has_unused_capacity() const _NOEXCEPT
  8352. ; 976 : { // micro-optimization for capacity() != size()
  8353. ; 977 : return (this->_Myend != this->_Mylast);
  8354. ; 978 : }
  8355. ; 979 :
  8356. ; 980 : iterator begin() _NOEXCEPT
  8357. ; 981 : { // return iterator for beginning of mutable sequence
  8358. ; 982 : return (iterator(this->_Myfirst, this));
  8359. ; 983 : }
  8360. ; 984 :
  8361. ; 985 : const_iterator begin() const _NOEXCEPT
  8362. ; 986 : { // return iterator for beginning of nonmutable sequence
  8363. ; 987 : return (const_iterator(this->_Myfirst, this));
  8364. ; 988 : }
  8365. ; 989 :
  8366. ; 990 : iterator end() _NOEXCEPT
  8367. ; 991 : { // return iterator for end of mutable sequence
  8368. ; 992 : return (iterator(this->_Mylast, this));
  8369. ; 993 : }
  8370. ; 994 :
  8371. ; 995 : const_iterator end() const _NOEXCEPT
  8372. ; 996 : { // return iterator for end of nonmutable sequence
  8373. ; 997 : return (const_iterator(this->_Mylast, this));
  8374. ; 998 : }
  8375. ; 999 :
  8376. ; 1000 : iterator _Make_iter(const_iterator _Where) const
  8377. ; 1001 : { // make iterator from const_iterator
  8378. ; 1002 : return (iterator(_Where._Ptr, this));
  8379. ; 1003 : }
  8380. ; 1004 :
  8381. ; 1005 : reverse_iterator rbegin() _NOEXCEPT
  8382. ; 1006 : { // return iterator for beginning of reversed mutable sequence
  8383. ; 1007 : return (reverse_iterator(end()));
  8384. ; 1008 : }
  8385. ; 1009 :
  8386. ; 1010 : const_reverse_iterator rbegin() const _NOEXCEPT
  8387. ; 1011 : { // return iterator for beginning of reversed nonmutable sequence
  8388. ; 1012 : return (const_reverse_iterator(end()));
  8389. ; 1013 : }
  8390. ; 1014 :
  8391. ; 1015 : reverse_iterator rend() _NOEXCEPT
  8392. ; 1016 : { // return iterator for end of reversed mutable sequence
  8393. ; 1017 : return (reverse_iterator(begin()));
  8394. ; 1018 : }
  8395. ; 1019 :
  8396. ; 1020 : const_reverse_iterator rend() const _NOEXCEPT
  8397. ; 1021 : { // return iterator for end of reversed nonmutable sequence
  8398. ; 1022 : return (const_reverse_iterator(begin()));
  8399. ; 1023 : }
  8400. ; 1024 :
  8401. ; 1025 : #if _HAS_CPP0X
  8402. ; 1026 : const_iterator cbegin() const _NOEXCEPT
  8403. ; 1027 : { // return iterator for beginning of nonmutable sequence
  8404. ; 1028 : return (((const _Myt *)this)->begin());
  8405. ; 1029 : }
  8406. ; 1030 :
  8407. ; 1031 : const_iterator cend() const _NOEXCEPT
  8408. ; 1032 : { // return iterator for end of nonmutable sequence
  8409. ; 1033 : return (((const _Myt *)this)->end());
  8410. ; 1034 : }
  8411. ; 1035 :
  8412. ; 1036 : const_reverse_iterator crbegin() const _NOEXCEPT
  8413. ; 1037 : { // return iterator for beginning of reversed nonmutable sequence
  8414. ; 1038 : return (((const _Myt *)this)->rbegin());
  8415. ; 1039 : }
  8416. ; 1040 :
  8417. ; 1041 : const_reverse_iterator crend() const _NOEXCEPT
  8418. ; 1042 : { // return iterator for end of reversed nonmutable sequence
  8419. ; 1043 : return (((const _Myt *)this)->rend());
  8420. ; 1044 : }
  8421. ; 1045 :
  8422. ; 1046 : void shrink_to_fit()
  8423. ; 1047 : { // reduce capacity
  8424. ; 1048 : if (_Has_unused_capacity())
  8425. ; 1049 : { // worth shrinking, do it
  8426. ; 1050 : if (empty())
  8427. ; 1051 : _Tidy();
  8428. ; 1052 : else
  8429. ; 1053 : _Reallocate(size());
  8430. ; 1054 : }
  8431. ; 1055 : }
  8432. ; 1056 : #endif /* _HAS_CPP0X */
  8433. ; 1057 :
  8434. ; 1058 : void resize(size_type _Newsize)
  8435. ; 1059 : { // determine new length, padding as needed
  8436. ; 1060 : if (_Newsize < size())
  8437. ; 1061 : erase(begin() + _Newsize, end());
  8438. ; 1062 : else if (size() < _Newsize)
  8439. ; 1063 : { // pad as needed
  8440. ; 1064 : _Alty _Alval(this->_Getal());
  8441. ; 1065 : _Reserve(_Newsize - size());
  8442. ; 1066 : _TRY_BEGIN
  8443. ; 1067 : _Uninitialized_default_fill_n(this->_Mylast, _Newsize - size(),
  8444. ; 1068 : _Alval);
  8445. ; 1069 : _CATCH_ALL
  8446. ; 1070 : _Tidy();
  8447. ; 1071 : _RERAISE;
  8448. ; 1072 : _CATCH_END
  8449. ; 1073 : this->_Mylast += _Newsize - size();
  8450. ; 1074 : }
  8451. ; 1075 : }
  8452. ; 1076 :
  8453. ; 1077 : void resize(size_type _Newsize, const value_type& _Val)
  8454. ; 1078 : { // determine new length, padding with _Val elements as needed
  8455. ; 1079 : if (_Newsize < size())
  8456. ; 1080 : erase(begin() + _Newsize, end());
  8457. ; 1081 : else if (size() < _Newsize)
  8458. ; 1082 : _Insert_n(end(), _Newsize - size(), _Val);
  8459. ; 1083 : }
  8460. ; 1084 :
  8461. ; 1085 : size_type size() const _NOEXCEPT
  8462. ; 1086 : { // return length of sequence
  8463. ; 1087 : return (this->_Mylast - this->_Myfirst);
  8464. ; 1088 : }
  8465. ; 1089 :
  8466. ; 1090 : size_type max_size() const _NOEXCEPT
  8467. ; 1091 : { // return maximum possible length of sequence
  8468. ; 1092 : return (this->_Getal().max_size());
  8469. ; 1093 : }
  8470. ; 1094 :
  8471. ; 1095 : bool empty() const _NOEXCEPT
  8472. ; 1096 : { // test if sequence is empty
  8473. ; 1097 : return (this->_Myfirst == this->_Mylast);
  8474. ; 1098 : }
  8475. ; 1099 :
  8476. ; 1100 : _Alloc get_allocator() const _NOEXCEPT
  8477. ; 1101 : { // return allocator object for values
  8478. ; 1102 : return (this->_Getal());
  8479. ; 1103 : }
  8480. ; 1104 :
  8481. ; 1105 : const_reference at(size_type _Pos) const
  8482. ; 1106 : { // subscript nonmutable sequence with checking
  8483. ; 1107 : if (size() <= _Pos)
  8484. ; 1108 : _Xran();
  8485. ; 1109 : return (*(this->_Myfirst + _Pos));
  8486. ; 1110 : }
  8487. ; 1111 :
  8488. ; 1112 : reference at(size_type _Pos)
  8489. ; 1113 : { // subscript mutable sequence with checking
  8490. ; 1114 : if (size() <= _Pos)
  8491. ; 1115 : _Xran();
  8492. ; 1116 : return (*(this->_Myfirst + _Pos));
  8493. ; 1117 : }
  8494. ; 1118 :
  8495. ; 1119 : const_reference operator[](size_type _Pos) const
  8496. ; 1120 : { // subscript nonmutable sequence
  8497. ; 1121 : #if _ITERATOR_DEBUG_LEVEL == 2
  8498. ; 1122 : if (size() <= _Pos)
  8499. ; 1123 : { // report error
  8500. ; 1124 : _DEBUG_ERROR("vector subscript out of range");
  8501. ; 1125 : _SCL_SECURE_OUT_OF_RANGE;
  8502. ; 1126 : }
  8503. ; 1127 :
  8504. ; 1128 : #elif _ITERATOR_DEBUG_LEVEL == 1
  8505. ; 1129 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
  8506. ; 1130 : #endif /* _ITERATOR_DEBUG_LEVEL */
  8507. ; 1131 :
  8508. ; 1132 : return (*(this->_Myfirst + _Pos));
  8509. ; 1133 : }
  8510. ; 1134 :
  8511. ; 1135 : reference operator[](size_type _Pos)
  8512. ; 1136 : { // subscript mutable sequence
  8513. ; 1137 : #if _ITERATOR_DEBUG_LEVEL == 2
  8514. ; 1138 : if (size() <= _Pos)
  8515. ; 1139 : { // report error
  8516. ; 1140 : _DEBUG_ERROR("vector subscript out of range");
  8517. ; 1141 : _SCL_SECURE_OUT_OF_RANGE;
  8518. ; 1142 : }
  8519. ; 1143 :
  8520. ; 1144 : #elif _ITERATOR_DEBUG_LEVEL == 1
  8521. ; 1145 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
  8522. ; 1146 : #endif /* _ITERATOR_DEBUG_LEVEL */
  8523. ; 1147 :
  8524. ; 1148 : return (*(this->_Myfirst + _Pos));
  8525. ; 1149 : }
  8526. ; 1150 :
  8527. ; 1151 : #if _HAS_CPP0X
  8528. ; 1152 : pointer data() _NOEXCEPT
  8529. ; 1153 : { // return address of first element
  8530. ; 1154 : return (this->_Myfirst);
  8531. ; 1155 : }
  8532. ; 1156 :
  8533. ; 1157 : const_pointer data() const _NOEXCEPT
  8534. ; 1158 : { // return address of first element
  8535. ; 1159 : return (this->_Myfirst);
  8536. ; 1160 : }
  8537. ; 1161 : #endif /* _HAS_CPP0X */
  8538. ; 1162 :
  8539. ; 1163 : reference front()
  8540. ; 1164 : { // return first element of mutable sequence
  8541. ; 1165 : return (*begin());
  8542. ; 1166 : }
  8543. ; 1167 :
  8544. ; 1168 : const_reference front() const
  8545. ; 1169 : { // return first element of nonmutable sequence
  8546. ; 1170 : return (*begin());
  8547. ; 1171 : }
  8548. ; 1172 :
  8549. ; 1173 : reference back()
  8550. ; 1174 : { // return last element of mutable sequence
  8551. ; 1175 : return (*(end() - 1));
  8552. ; 1176 : }
  8553. ; 1177 :
  8554. ; 1178 : const_reference back() const
  8555. ; 1179 : { // return last element of nonmutable sequence
  8556. ; 1180 : return (*(end() - 1));
  8557. ; 1181 : }
  8558. ; 1182 :
  8559. ; 1183 : void push_back(const value_type& _Val)
  8560. ; 1184 : { // insert element at end
  8561. ; 1185 : if (_Inside(_STD addressof(_Val)))
  8562. ; 1186 : { // push back an element
  8563. ; 1187 : size_type _Idx = _STD addressof(_Val) - this->_Myfirst;
  8564. ; 1188 : if (this->_Mylast == this->_Myend)
  8565. ; 1189 : _Reserve(1);
  8566. ; 1190 : _Orphan_range(this->_Mylast, this->_Mylast);
  8567. ; 1191 : this->_Getal().construct(this->_Mylast,
  8568. ; 1192 : this->_Myfirst[_Idx]);
  8569. ; 1193 : ++this->_Mylast;
  8570. ; 1194 : }
  8571. ; 1195 : else
  8572. ; 1196 : { // push back a non-element
  8573. ; 1197 : if (this->_Mylast == this->_Myend)
  8574. ; 1198 : _Reserve(1);
  8575. ; 1199 : _Orphan_range(this->_Mylast, this->_Mylast);
  8576. ; 1200 : this->_Getal().construct(this->_Mylast,
  8577. ; 1201 : _Val);
  8578. ; 1202 : ++this->_Mylast;
  8579. ; 1203 : }
  8580. ; 1204 : }
  8581. ; 1205 :
  8582. ; 1206 : #if _ITERATOR_DEBUG_LEVEL == 2
  8583. ; 1207 : void pop_back()
  8584. ; 1208 : { // erase element at end
  8585. ; 1209 : if (empty())
  8586. ; 1210 : _DEBUG_ERROR("vector empty before pop");
  8587. ; 1211 : else
  8588. ; 1212 : { // erase last element
  8589. ; 1213 : _Orphan_range(this->_Mylast - 1, this->_Mylast);
  8590. ; 1214 : this->_Getal().destroy(this->_Mylast - 1);
  8591. ; 1215 : --this->_Mylast;
  8592. ; 1216 : }
  8593. ; 1217 : }
  8594. ; 1218 :
  8595. ; 1219 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
  8596. ; 1220 : void pop_back()
  8597. ; 1221 : { // erase element at end
  8598. ; 1222 : if (!empty())
  8599. ; 1223 : { // erase last element
  8600. ; 1224 : this->_Getal().destroy(this->_Mylast - 1);
  8601. ; 1225 : --this->_Mylast;
  8602. ; 1226 : }
  8603. ; 1227 : }
  8604. ; 1228 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  8605. ; 1229 :
  8606. ; 1230 : template<class _Iter>
  8607. ; 1231 : typename enable_if<_Is_iterator<_Iter>::value,
  8608. ; 1232 : void>::type
  8609. ; 1233 : assign(_Iter _First, _Iter _Last)
  8610. ; 1234 : { // assign [_First, _Last), input iterators
  8611. ; 1235 : erase(begin(), end());
  8612. ; 1236 : insert(begin(), _First, _Last);
  8613. ; 1237 : }
  8614. ; 1238 :
  8615. ; 1239 : void assign(size_type _Count, const value_type& _Val)
  8616. ; 1240 : { // assign _Count * _Val
  8617. ; 1241 : _Assign_n(_Count, _Val);
  8618. ; 1242 : }
  8619. ; 1243 :
  8620. ; 1244 : iterator insert(const_iterator _Where, const _Ty& _Val)
  8621. ; 1245 : { // insert _Val at _Where
  8622. ; 1246 : return (_Insert_n(_Where, (size_type)1, _Val));
  8623. ; 1247 : }
  8624. ; 1248 :
  8625. ; 1249 : iterator insert(const_iterator _Where, size_type _Count,
  8626. ; 1250 : const _Ty& _Val)
  8627. ; 1251 : { // insert _Count * _Val at _Where
  8628. ; 1252 : return (_Insert_n(_Where, _Count, _Val));
  8629. ; 1253 : }
  8630. ; 1254 :
  8631. ; 1255 : template<class _Iter>
  8632. ; 1256 : typename enable_if<_Is_iterator<_Iter>::value,
  8633. ; 1257 : iterator>::type
  8634. ; 1258 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  8635. ; 1259 : { // insert [_First, _Last) at _Where
  8636. ; 1260 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
  8637. ; 1261 : _Insert(_Where, _First, _Last, _Iter_cat(_First));
  8638. ; 1262 : return (begin() + _Off);
  8639. ; 1263 : }
  8640. ; 1264 :
  8641. ; 1265 : template<class _Iter>
  8642. ; 1266 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
  8643. ; 1267 : input_iterator_tag)
  8644. ; 1268 : { // insert [_First, _Last) at _Where, input iterators
  8645. ; 1269 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
  8646. ; 1270 :
  8647. ; 1271 : #if _ITERATOR_DEBUG_LEVEL == 2
  8648. ; 1272 : if (size() < _Off)
  8649. ; 1273 : _DEBUG_ERROR("vector insert iterator outside range");
  8650. ; 1274 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  8651. ; 1275 :
  8652. ; 1276 : if (_First != _Last)
  8653. ; 1277 : { // worth doing, gather at end and rotate into place
  8654. ; 1278 : size_type _Oldsize = size();
  8655. ; 1279 :
  8656. ; 1280 : _TRY_BEGIN
  8657. ; 1281 : for (; _First != _Last; ++_First)
  8658. ; 1282 : push_back(*_First); // append
  8659. ; 1283 :
  8660. ; 1284 : _CATCH_ALL
  8661. ; 1285 : erase(begin() + _Oldsize, end());
  8662. ; 1286 : _RERAISE;
  8663. ; 1287 : _CATCH_END
  8664. ; 1288 :
  8665. ; 1289 : _STD rotate(begin() + _Off, begin() + _Oldsize, end());
  8666. ; 1290 : }
  8667. ; 1291 : }
  8668. ; 1292 :
  8669. ; 1293 : template<class _Iter>
  8670. ; 1294 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
  8671. ; 1295 : forward_iterator_tag)
  8672. ; 1296 : { // insert [_First, _Last) at _Where, forward iterators
  8673. ; 1297 : #if _ITERATOR_DEBUG_LEVEL == 2
  8674. ; 1298 : if (_VICONT(_Where) != this
  8675. ; 1299 : || _VIPTR(_Where) < this->_Myfirst
  8676. ; 1300 : || this->_Mylast < _VIPTR(_Where))
  8677. ; 1301 : _DEBUG_ERROR("vector insert iterator outside range");
  8678. ; 1302 : _DEBUG_RANGE(_First, _Last);
  8679. ; 1303 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  8680. ; 1304 :
  8681. ; 1305 : size_type _Count = 0;
  8682. ; 1306 : _Distance(_First, _Last, _Count);
  8683. ; 1307 :
  8684. ; 1308 : if (_Count == 0)
  8685. ; 1309 : ;
  8686. ; 1310 : else if (_Unused_capacity() < _Count)
  8687. ; 1311 : { // not enough room, reallocate
  8688. ; 1312 : if (max_size() - size() < _Count)
  8689. ; 1313 : _Xlen(); // result too long
  8690. ; 1314 :
  8691. ; 1315 : size_type _Capacity = _Grow_to(size() + _Count);
  8692. ; 1316 : pointer _Newvec = this->_Getal().allocate(_Capacity);
  8693. ; 1317 : pointer _Ptr = _Newvec;
  8694. ; 1318 :
  8695. ; 1319 : _TRY_BEGIN
  8696. ; 1320 : _Ptr = _Umove(this->_Myfirst, _VIPTR(_Where),
  8697. ; 1321 : _Newvec); // copy prefix
  8698. ; 1322 : _Ptr = _Ucopy(_First, _Last, _Ptr); // add new stuff
  8699. ; 1323 : _Umove(_VIPTR(_Where), this->_Mylast,
  8700. ; 1324 : _Ptr); // copy suffix
  8701. ; 1325 : _CATCH_ALL
  8702. ; 1326 : _Destroy(_Newvec, _Ptr);
  8703. ; 1327 : this->_Getal().deallocate(_Newvec, _Capacity);
  8704. ; 1328 : _RERAISE;
  8705. ; 1329 : _CATCH_END
  8706. ; 1330 :
  8707. ; 1331 : _Count += size();
  8708. ; 1332 : if (this->_Myfirst != pointer())
  8709. ; 1333 : { // destroy and deallocate old array
  8710. ; 1334 : _Destroy(this->_Myfirst, this->_Mylast);
  8711. ; 1335 : this->_Getal().deallocate(this->_Myfirst,
  8712. ; 1336 : this->_Myend - this->_Myfirst);
  8713. ; 1337 : }
  8714. ; 1338 :
  8715. ; 1339 : this->_Orphan_all();
  8716. ; 1340 : this->_Myend = _Newvec + _Capacity;
  8717. ; 1341 : this->_Mylast = _Newvec + _Count;
  8718. ; 1342 : this->_Myfirst = _Newvec;
  8719. ; 1343 : }
  8720. ; 1344 : else
  8721. ; 1345 : { // new stuff fits, append and rotate into place
  8722. ; 1346 : _Ucopy(_First, _Last, this->_Mylast);
  8723. ; 1347 : _STD rotate(_VIPTR(_Where), this->_Mylast,
  8724. ; 1348 : this->_Mylast + _Count);
  8725. ; 1349 : this->_Mylast += _Count;
  8726. ; 1350 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
  8727. ; 1351 : }
  8728. ; 1352 : }
  8729. ; 1353 :
  8730. ; 1354 : #if _ITERATOR_DEBUG_LEVEL == 2
  8731. ; 1355 : iterator erase(const_iterator _Where)
  8732. ; 1356 : { // erase element at where
  8733. ; 1357 : if (_VICONT(_Where) != this
  8734. ; 1358 : || _VIPTR(_Where) < this->_Myfirst
  8735. ; 1359 : || this->_Mylast <= _VIPTR(_Where))
  8736. ; 1360 : _DEBUG_ERROR("vector erase iterator outside range");
  8737. ; 1361 : _Move(_VIPTR(_Where) + 1, this->_Mylast, _VIPTR(_Where));
  8738. ; 1362 : _Destroy(this->_Mylast - 1, this->_Mylast);
  8739. ; 1363 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
  8740. ; 1364 : --this->_Mylast;
  8741. ; 1365 : return (_Make_iter(_Where));
  8742. ; 1366 : }
  8743. ; 1367 :
  8744. ; 1368 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
  8745. ; 1369 : iterator erase(const_iterator _Where)
  8746. ; 1370 : { // erase element at where
  8747. ; 1371 : _Move(_VIPTR(_Where) + 1, this->_Mylast,
  8748. ; 1372 : _VIPTR(_Where));
  8749. ; 1373 : _Destroy(this->_Mylast - 1, this->_Mylast);
  8750. ; 1374 : --this->_Mylast;
  8751. ; 1375 : return (_Make_iter(_Where));
  8752. ; 1376 : }
  8753. ; 1377 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  8754. ; 1378 :
  8755. ; 1379 : iterator erase(const_iterator _First_arg,
  8756. ; 1380 : const_iterator _Last_arg)
  8757. ; 1381 : { // erase [_First, _Last)
  8758. ; 1382 : if (_First_arg == begin() && _Last_arg == end())
  8759. ; 1383 : clear();
  8760. ; 1384 : else if (_First_arg != _Last_arg)
  8761. ; 1385 : { // clear partial
  8762. ; 1386 : iterator _First = _Make_iter(_First_arg);
  8763. ; 1387 : iterator _Last = _Make_iter(_Last_arg);
  8764. ; 1388 :
  8765. ; 1389 : if (_First != _Last)
  8766. ; 1390 : { // worth doing, copy down over hole
  8767. ; 1391 : #if _ITERATOR_DEBUG_LEVEL == 2
  8768. ; 1392 : if (_Last < _First || _VICONT(_First) != this
  8769. ; 1393 : || _VIPTR(_First) < this->_Myfirst
  8770. ; 1394 : || this->_Mylast < _VIPTR(_Last))
  8771. ; 1395 : _DEBUG_ERROR("vector erase iterator outside range");
  8772. ; 1396 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
  8773. ; 1397 : _VIPTR(_First));
  8774. ; 1398 : _Orphan_range(_VIPTR(_First), this->_Mylast);
  8775. ; 1399 :
  8776. ; 1400 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
  8777. ; 1401 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
  8778. ; 1402 : _VIPTR(_First));
  8779. ; 1403 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  8780. ; 1404 :
  8781. ; 1405 : _Destroy(_Ptr, this->_Mylast);
  8782. ; 1406 : this->_Mylast = _Ptr;
  8783. ; 1407 : }
  8784. ; 1408 : }
  8785. ; 1409 : return (_Make_iter(_First_arg));
  8786. ; 1410 : }
  8787. ; 1411 :
  8788. ; 1412 : void clear() _NOEXCEPT
  8789. ; 1413 : { // erase all
  8790. ; 1414 : this->_Orphan_all();
  8791. ; 1415 : _Destroy(this->_Myfirst, this->_Mylast);
  8792. ; 1416 : this->_Mylast = this->_Myfirst;
  8793. ; 1417 : }
  8794. ; 1418 :
  8795. ; 1419 : void swap(_Myt& _Right)
  8796. ; 1420 : { // exchange contents with _Right
  8797. ; 1421 : if (this == &_Right)
  8798. ; 1422 : ; // same object, do nothing
  8799. ; 1423 : else if (this->_Getal() == _Right._Getal())
  8800. ; 1424 : { // same allocator, swap control information
  8801. ; 1425 : this->_Swap_all(_Right);
  8802. ; 1426 : _Swap_adl(this->_Myfirst, _Right._Myfirst);
  8803. ; 1427 : _Swap_adl(this->_Mylast, _Right._Mylast);
  8804. ; 1428 : _Swap_adl(this->_Myend, _Right._Myend);
  8805. ; 1429 : }
  8806. ; 1430 :
  8807. ; 1431 : #if _HAS_CPP0X
  8808. ; 1432 : else if (_Alty::propagate_on_container_swap::value)
  8809. ; 1433 : { // swap allocators and control information
  8810. ; 1434 : this->_Swap_alloc(_Right);
  8811. ; 1435 : _Swap_adl(this->_Myfirst, _Right._Myfirst);
  8812. ; 1436 : _Swap_adl(this->_Mylast, _Right._Mylast);
  8813. ; 1437 : _Swap_adl(this->_Myend, _Right._Myend);
  8814. ; 1438 : }
  8815. ; 1439 : #endif /* _HAS_CPP0X */
  8816. ; 1440 :
  8817. ; 1441 : else
  8818. ; 1442 : { // different allocator, do multiple moves
  8819. ; 1443 : _Myt _Ts = _Move(*this);
  8820. ; 1444 :
  8821. ; 1445 : *this = _Move(_Right);
  8822. ; 1446 : _Right = _Move(_Ts);
  8823. ; 1447 : }
  8824. ; 1448 : }
  8825. ; 1449 :
  8826. ; 1450 : protected:
  8827. ; 1451 : void _Assign_n(size_type _Count, const value_type& _Val)
  8828. ; 1452 : { // assign _Count * _Val
  8829. ; 1453 : value_type _Tmp = _Val; // in case _Val is in sequence
  8830. ; 1454 : erase(begin(), end());
  8831. ; 1455 : insert(begin(), _Count, _Tmp);
  8832. ; 1456 : }
  8833. ; 1457 :
  8834. ; 1458 : bool _Buy(size_type _Capacity)
  8835. ; 1459 : { // allocate array with _Capacity elements
  8836. ; 1460 : this->_Myfirst = pointer();
  8837. ; 1461 : this->_Mylast = pointer();
  8838. ; 1462 : this->_Myend = pointer();
  8839. ; 1463 :
  8840. ; 1464 : if (_Capacity == 0)
  8841. ; 1465 : return (false);
  8842. ; 1466 : else if (max_size() < _Capacity)
  8843. ; 1467 : _Xlen(); // result too long
  8844. ; 1468 : else
  8845. ; 1469 : { // nonempty array, allocate storage
  8846. ; 1470 : this->_Myfirst = this->_Getal().allocate(_Capacity);
  8847. ; 1471 : this->_Mylast = this->_Myfirst;
  8848. ; 1472 : this->_Myend = this->_Myfirst + _Capacity;
  8849. ; 1473 : }
  8850. ; 1474 : return (true);
  8851. ; 1475 : }
  8852. ; 1476 :
  8853. ; 1477 : void _Destroy(pointer _First, pointer _Last)
  8854. ; 1478 : { // destroy [_First, _Last) using allocator
  8855. ; 1479 : _Alty _Alval(this->_Getal());
  8856. ; 1480 : _Destroy_range(_First, _Last, _Alval);
  8857. ; 1481 : }
  8858. ; 1482 :
  8859. ; 1483 : size_type _Grow_to(size_type _Count) const
  8860. ; 1484 : { // grow by 50% or at least to _Count
  8861. ; 1485 : size_type _Capacity = capacity();
  8862. ; 1486 :
  8863. ; 1487 : _Capacity = max_size() - _Capacity / 2 < _Capacity
  8864. ; 1488 : ? 0 : _Capacity + _Capacity / 2; // try to grow by 50%
  8865. ; 1489 : if (_Capacity < _Count)
  8866. ; 1490 : _Capacity = _Count;
  8867. ; 1491 : return (_Capacity);
  8868. ; 1492 : }
  8869. ; 1493 :
  8870. ; 1494 : bool _Inside(const value_type *_Ptr) const
  8871. ; 1495 : { // test if _Ptr points inside vector
  8872. ; 1496 : return (_Ptr < this->_Mylast && this->_Myfirst <= _Ptr);
  8873. ; 1497 : }
  8874. ; 1498 :
  8875. ; 1499 : void _Reallocate(size_type _Count)
  8876. ; 1500 : { // move to array of exactly _Count elements
  8877. ; 1501 : pointer _Ptr = this->_Getal().allocate(_Count);
  8878. ; 1502 :
  8879. ; 1503 : _TRY_BEGIN
  8880. ; 1504 : _Umove(this->_Myfirst, this->_Mylast, _Ptr);
  8881. ; 1505 : _CATCH_ALL
  8882. ; 1506 : this->_Getal().deallocate(_Ptr, _Count);
  8883. ; 1507 : _RERAISE;
  8884. ; 1508 : _CATCH_END
  8885. ; 1509 :
  8886. ; 1510 : size_type _Size = size();
  8887. ; 1511 : if (this->_Myfirst != pointer())
  8888. ; 1512 : { // destroy and deallocate old array
  8889. ; 1513 : _Destroy(this->_Myfirst, this->_Mylast);
  8890. ; 1514 : this->_Getal().deallocate(this->_Myfirst,
  8891. ; 1515 : this->_Myend - this->_Myfirst);
  8892. ; 1516 : }
  8893. ; 1517 :
  8894. ; 1518 : this->_Orphan_all();
  8895. ; 1519 : this->_Myend = _Ptr + _Count;
  8896. ; 1520 : this->_Mylast = _Ptr + _Size;
  8897. ; 1521 : this->_Myfirst = _Ptr;
  8898. ; 1522 : }
  8899. ; 1523 :
  8900. ; 1524 : void _Reserve(size_type _Count)
  8901. ; 1525 : { // ensure room for _Count new elements, grow exponentially
  8902. ; 1526 : if (_Unused_capacity() < _Count)
  8903. ; 1527 : { // need more room, try to get it
  8904. ; 1528 : if (max_size() - size() < _Count)
  8905. ; 1529 : _Xlen();
  8906. ; 1530 : _Reallocate(_Grow_to(size() + _Count));
  8907. ; 1531 : }
  8908. ; 1532 : }
  8909. ; 1533 :
  8910. ; 1534 : void _Tidy()
  8911. ; 1535 : { // free all storage
  8912. ; 1536 : if (this->_Myfirst != pointer())
  8913.  
  8914. mov eax, DWORD PTR [esi]
  8915. test eax, eax
  8916. je SHORT $LN3@vector
  8917. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  8918.  
  8919. ; 586 : ::operator delete(_Ptr);
  8920.  
  8921. push eax
  8922. call DWORD PTR __imp_??3@YAXPAX@Z
  8923. add esp, 4
  8924. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  8925.  
  8926. ; 1542 : this->_Myfirst = pointer();
  8927.  
  8928. mov DWORD PTR [esi], 0
  8929.  
  8930. ; 1543 : this->_Mylast = pointer();
  8931.  
  8932. mov DWORD PTR [esi+4], 0
  8933.  
  8934. ; 1544 : this->_Myend = pointer();
  8935.  
  8936. mov DWORD PTR [esi+8], 0
  8937. $LN3@vector:
  8938. pop esi
  8939.  
  8940. ; 900 : _Tidy();
  8941. ; 901 : }
  8942.  
  8943. ret 0
  8944. ??1?$vector@HV?$allocator@H@std@@@std@@QAE@XZ ENDP ; std::vector<int,std::allocator<int> >::~vector<int,std::allocator<int> >
  8945. _TEXT ENDS
  8946. ; Function compile flags: /Ogtp
  8947. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  8948. ; COMDAT ??0?$vector@NV?$allocator@N@std@@@std@@QAE@I@Z
  8949. _TEXT SEGMENT
  8950. __Count$ = 8 ; size = 4
  8951. ??0?$vector@NV?$allocator@N@std@@@std@@QAE@I@Z PROC ; std::vector<double,std::allocator<double> >::vector<double,std::allocator<double> >, COMDAT
  8952. ; _this$ = ecx
  8953.  
  8954. ; 695 : { // construct from _Count * value_type()
  8955.  
  8956. push ebp
  8957. mov ebp, esp
  8958. push esi
  8959.  
  8960. ; 696 : resize(_Count);
  8961.  
  8962. push DWORD PTR __Count$[ebp]
  8963. mov esi, ecx
  8964.  
  8965. ; 486 : _Myfirst = pointer();
  8966.  
  8967. mov DWORD PTR [esi], 0
  8968.  
  8969. ; 487 : _Mylast = pointer();
  8970.  
  8971. mov DWORD PTR [esi+4], 0
  8972.  
  8973. ; 488 : _Myend = pointer();
  8974.  
  8975. mov DWORD PTR [esi+8], 0
  8976.  
  8977. ; 696 : resize(_Count);
  8978.  
  8979. call ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ; std::vector<double,std::allocator<double> >::resize
  8980.  
  8981. ; 697 : }
  8982.  
  8983. mov eax, esi
  8984. pop esi
  8985. pop ebp
  8986. ret 4
  8987. ??0?$vector@NV?$allocator@N@std@@@std@@QAE@I@Z ENDP ; std::vector<double,std::allocator<double> >::vector<double,std::allocator<double> >
  8988. _TEXT ENDS
  8989. ; Function compile flags: /Ogtp
  8990. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  8991. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  8992. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  8993. ; COMDAT ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ
  8994. _TEXT SEGMENT
  8995. ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ PROC ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >, COMDAT
  8996. ; _this$ = ecx
  8997.  
  8998. ; 899 : { // destroy the object
  8999.  
  9000. push esi
  9001. mov esi, ecx
  9002.  
  9003. ; 902 :
  9004. ; 903 : _Myt& operator=(const _Myt& _Right)
  9005. ; 904 : { // assign _Right
  9006. ; 905 : if (this != &_Right)
  9007. ; 906 : { // different, assign it
  9008. ; 907 : #if _HAS_CPP0X
  9009. ; 908 : if (this->_Getal() != _Right._Getal()
  9010. ; 909 : && _Alty::propagate_on_container_copy_assignment::value)
  9011. ; 910 : { // change allocator before copying
  9012. ; 911 : _Tidy();
  9013. ; 912 : this->_Change_alloc(_Right._Getal());
  9014. ; 913 : }
  9015. ; 914 : #endif /* _HAS_CPP0X */
  9016. ; 915 :
  9017. ; 916 : this->_Orphan_all();
  9018. ; 917 :
  9019. ; 918 : if (_Right.empty())
  9020. ; 919 : clear(); // new sequence empty, erase existing sequence
  9021. ; 920 : else if (_Right.size() <= size())
  9022. ; 921 : { // enough elements, copy new and destroy old
  9023. ; 922 : pointer _Ptr = _Copy_impl(_Right._Myfirst,
  9024. ; 923 : _Right._Mylast, this->_Myfirst); // copy new
  9025. ; 924 : _Destroy(_Ptr, this->_Mylast); // destroy old
  9026. ; 925 : this->_Mylast = this->_Myfirst + _Right.size();
  9027. ; 926 : }
  9028. ; 927 : else if (_Right.size() <= capacity())
  9029. ; 928 : { // enough room, copy and construct new
  9030. ; 929 : pointer _Ptr = _Right._Myfirst + size();
  9031. ; 930 : _Copy_impl(_Right._Myfirst,
  9032. ; 931 : _Ptr, this->_Myfirst);
  9033. ; 932 : this->_Mylast = _Ucopy(_Ptr, _Right._Mylast, this->_Mylast);
  9034. ; 933 : }
  9035. ; 934 : else
  9036. ; 935 : { // not enough room, allocate new array and construct new
  9037. ; 936 : if (this->_Myfirst != pointer())
  9038. ; 937 : { // discard old array
  9039. ; 938 : _Destroy(this->_Myfirst, this->_Mylast);
  9040. ; 939 : this->_Getal().deallocate(this->_Myfirst,
  9041. ; 940 : this->_Myend - this->_Myfirst);
  9042. ; 941 : }
  9043. ; 942 : if (_Buy(_Right.size()))
  9044. ; 943 : _TRY_BEGIN
  9045. ; 944 : this->_Mylast = _Ucopy(_Right._Myfirst, _Right._Mylast,
  9046. ; 945 : this->_Myfirst);
  9047. ; 946 : _CATCH_ALL
  9048. ; 947 : _Tidy();
  9049. ; 948 : _RERAISE;
  9050. ; 949 : _CATCH_END
  9051. ; 950 : }
  9052. ; 951 : }
  9053. ; 952 : return (*this);
  9054. ; 953 : }
  9055. ; 954 :
  9056. ; 955 : void reserve(size_type _Count)
  9057. ; 956 : { // determine new minimum length of allocated storage
  9058. ; 957 : if (capacity() < _Count)
  9059. ; 958 : { // something to do, check and reallocate
  9060. ; 959 : if (max_size() < _Count)
  9061. ; 960 : _Xlen();
  9062. ; 961 : _Reallocate(_Count);
  9063. ; 962 : }
  9064. ; 963 : }
  9065. ; 964 :
  9066. ; 965 : size_type capacity() const _NOEXCEPT
  9067. ; 966 : { // return current length of allocated storage
  9068. ; 967 : return (this->_Myend - this->_Myfirst);
  9069. ; 968 : }
  9070. ; 969 :
  9071. ; 970 : size_type _Unused_capacity() const _NOEXCEPT
  9072. ; 971 : { // micro-optimization for capacity() - size()
  9073. ; 972 : return (this->_Myend - this->_Mylast);
  9074. ; 973 : }
  9075. ; 974 :
  9076. ; 975 : size_type _Has_unused_capacity() const _NOEXCEPT
  9077. ; 976 : { // micro-optimization for capacity() != size()
  9078. ; 977 : return (this->_Myend != this->_Mylast);
  9079. ; 978 : }
  9080. ; 979 :
  9081. ; 980 : iterator begin() _NOEXCEPT
  9082. ; 981 : { // return iterator for beginning of mutable sequence
  9083. ; 982 : return (iterator(this->_Myfirst, this));
  9084. ; 983 : }
  9085. ; 984 :
  9086. ; 985 : const_iterator begin() const _NOEXCEPT
  9087. ; 986 : { // return iterator for beginning of nonmutable sequence
  9088. ; 987 : return (const_iterator(this->_Myfirst, this));
  9089. ; 988 : }
  9090. ; 989 :
  9091. ; 990 : iterator end() _NOEXCEPT
  9092. ; 991 : { // return iterator for end of mutable sequence
  9093. ; 992 : return (iterator(this->_Mylast, this));
  9094. ; 993 : }
  9095. ; 994 :
  9096. ; 995 : const_iterator end() const _NOEXCEPT
  9097. ; 996 : { // return iterator for end of nonmutable sequence
  9098. ; 997 : return (const_iterator(this->_Mylast, this));
  9099. ; 998 : }
  9100. ; 999 :
  9101. ; 1000 : iterator _Make_iter(const_iterator _Where) const
  9102. ; 1001 : { // make iterator from const_iterator
  9103. ; 1002 : return (iterator(_Where._Ptr, this));
  9104. ; 1003 : }
  9105. ; 1004 :
  9106. ; 1005 : reverse_iterator rbegin() _NOEXCEPT
  9107. ; 1006 : { // return iterator for beginning of reversed mutable sequence
  9108. ; 1007 : return (reverse_iterator(end()));
  9109. ; 1008 : }
  9110. ; 1009 :
  9111. ; 1010 : const_reverse_iterator rbegin() const _NOEXCEPT
  9112. ; 1011 : { // return iterator for beginning of reversed nonmutable sequence
  9113. ; 1012 : return (const_reverse_iterator(end()));
  9114. ; 1013 : }
  9115. ; 1014 :
  9116. ; 1015 : reverse_iterator rend() _NOEXCEPT
  9117. ; 1016 : { // return iterator for end of reversed mutable sequence
  9118. ; 1017 : return (reverse_iterator(begin()));
  9119. ; 1018 : }
  9120. ; 1019 :
  9121. ; 1020 : const_reverse_iterator rend() const _NOEXCEPT
  9122. ; 1021 : { // return iterator for end of reversed nonmutable sequence
  9123. ; 1022 : return (const_reverse_iterator(begin()));
  9124. ; 1023 : }
  9125. ; 1024 :
  9126. ; 1025 : #if _HAS_CPP0X
  9127. ; 1026 : const_iterator cbegin() const _NOEXCEPT
  9128. ; 1027 : { // return iterator for beginning of nonmutable sequence
  9129. ; 1028 : return (((const _Myt *)this)->begin());
  9130. ; 1029 : }
  9131. ; 1030 :
  9132. ; 1031 : const_iterator cend() const _NOEXCEPT
  9133. ; 1032 : { // return iterator for end of nonmutable sequence
  9134. ; 1033 : return (((const _Myt *)this)->end());
  9135. ; 1034 : }
  9136. ; 1035 :
  9137. ; 1036 : const_reverse_iterator crbegin() const _NOEXCEPT
  9138. ; 1037 : { // return iterator for beginning of reversed nonmutable sequence
  9139. ; 1038 : return (((const _Myt *)this)->rbegin());
  9140. ; 1039 : }
  9141. ; 1040 :
  9142. ; 1041 : const_reverse_iterator crend() const _NOEXCEPT
  9143. ; 1042 : { // return iterator for end of reversed nonmutable sequence
  9144. ; 1043 : return (((const _Myt *)this)->rend());
  9145. ; 1044 : }
  9146. ; 1045 :
  9147. ; 1046 : void shrink_to_fit()
  9148. ; 1047 : { // reduce capacity
  9149. ; 1048 : if (_Has_unused_capacity())
  9150. ; 1049 : { // worth shrinking, do it
  9151. ; 1050 : if (empty())
  9152. ; 1051 : _Tidy();
  9153. ; 1052 : else
  9154. ; 1053 : _Reallocate(size());
  9155. ; 1054 : }
  9156. ; 1055 : }
  9157. ; 1056 : #endif /* _HAS_CPP0X */
  9158. ; 1057 :
  9159. ; 1058 : void resize(size_type _Newsize)
  9160. ; 1059 : { // determine new length, padding as needed
  9161. ; 1060 : if (_Newsize < size())
  9162. ; 1061 : erase(begin() + _Newsize, end());
  9163. ; 1062 : else if (size() < _Newsize)
  9164. ; 1063 : { // pad as needed
  9165. ; 1064 : _Alty _Alval(this->_Getal());
  9166. ; 1065 : _Reserve(_Newsize - size());
  9167. ; 1066 : _TRY_BEGIN
  9168. ; 1067 : _Uninitialized_default_fill_n(this->_Mylast, _Newsize - size(),
  9169. ; 1068 : _Alval);
  9170. ; 1069 : _CATCH_ALL
  9171. ; 1070 : _Tidy();
  9172. ; 1071 : _RERAISE;
  9173. ; 1072 : _CATCH_END
  9174. ; 1073 : this->_Mylast += _Newsize - size();
  9175. ; 1074 : }
  9176. ; 1075 : }
  9177. ; 1076 :
  9178. ; 1077 : void resize(size_type _Newsize, const value_type& _Val)
  9179. ; 1078 : { // determine new length, padding with _Val elements as needed
  9180. ; 1079 : if (_Newsize < size())
  9181. ; 1080 : erase(begin() + _Newsize, end());
  9182. ; 1081 : else if (size() < _Newsize)
  9183. ; 1082 : _Insert_n(end(), _Newsize - size(), _Val);
  9184. ; 1083 : }
  9185. ; 1084 :
  9186. ; 1085 : size_type size() const _NOEXCEPT
  9187. ; 1086 : { // return length of sequence
  9188. ; 1087 : return (this->_Mylast - this->_Myfirst);
  9189. ; 1088 : }
  9190. ; 1089 :
  9191. ; 1090 : size_type max_size() const _NOEXCEPT
  9192. ; 1091 : { // return maximum possible length of sequence
  9193. ; 1092 : return (this->_Getal().max_size());
  9194. ; 1093 : }
  9195. ; 1094 :
  9196. ; 1095 : bool empty() const _NOEXCEPT
  9197. ; 1096 : { // test if sequence is empty
  9198. ; 1097 : return (this->_Myfirst == this->_Mylast);
  9199. ; 1098 : }
  9200. ; 1099 :
  9201. ; 1100 : _Alloc get_allocator() const _NOEXCEPT
  9202. ; 1101 : { // return allocator object for values
  9203. ; 1102 : return (this->_Getal());
  9204. ; 1103 : }
  9205. ; 1104 :
  9206. ; 1105 : const_reference at(size_type _Pos) const
  9207. ; 1106 : { // subscript nonmutable sequence with checking
  9208. ; 1107 : if (size() <= _Pos)
  9209. ; 1108 : _Xran();
  9210. ; 1109 : return (*(this->_Myfirst + _Pos));
  9211. ; 1110 : }
  9212. ; 1111 :
  9213. ; 1112 : reference at(size_type _Pos)
  9214. ; 1113 : { // subscript mutable sequence with checking
  9215. ; 1114 : if (size() <= _Pos)
  9216. ; 1115 : _Xran();
  9217. ; 1116 : return (*(this->_Myfirst + _Pos));
  9218. ; 1117 : }
  9219. ; 1118 :
  9220. ; 1119 : const_reference operator[](size_type _Pos) const
  9221. ; 1120 : { // subscript nonmutable sequence
  9222. ; 1121 : #if _ITERATOR_DEBUG_LEVEL == 2
  9223. ; 1122 : if (size() <= _Pos)
  9224. ; 1123 : { // report error
  9225. ; 1124 : _DEBUG_ERROR("vector subscript out of range");
  9226. ; 1125 : _SCL_SECURE_OUT_OF_RANGE;
  9227. ; 1126 : }
  9228. ; 1127 :
  9229. ; 1128 : #elif _ITERATOR_DEBUG_LEVEL == 1
  9230. ; 1129 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
  9231. ; 1130 : #endif /* _ITERATOR_DEBUG_LEVEL */
  9232. ; 1131 :
  9233. ; 1132 : return (*(this->_Myfirst + _Pos));
  9234. ; 1133 : }
  9235. ; 1134 :
  9236. ; 1135 : reference operator[](size_type _Pos)
  9237. ; 1136 : { // subscript mutable sequence
  9238. ; 1137 : #if _ITERATOR_DEBUG_LEVEL == 2
  9239. ; 1138 : if (size() <= _Pos)
  9240. ; 1139 : { // report error
  9241. ; 1140 : _DEBUG_ERROR("vector subscript out of range");
  9242. ; 1141 : _SCL_SECURE_OUT_OF_RANGE;
  9243. ; 1142 : }
  9244. ; 1143 :
  9245. ; 1144 : #elif _ITERATOR_DEBUG_LEVEL == 1
  9246. ; 1145 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
  9247. ; 1146 : #endif /* _ITERATOR_DEBUG_LEVEL */
  9248. ; 1147 :
  9249. ; 1148 : return (*(this->_Myfirst + _Pos));
  9250. ; 1149 : }
  9251. ; 1150 :
  9252. ; 1151 : #if _HAS_CPP0X
  9253. ; 1152 : pointer data() _NOEXCEPT
  9254. ; 1153 : { // return address of first element
  9255. ; 1154 : return (this->_Myfirst);
  9256. ; 1155 : }
  9257. ; 1156 :
  9258. ; 1157 : const_pointer data() const _NOEXCEPT
  9259. ; 1158 : { // return address of first element
  9260. ; 1159 : return (this->_Myfirst);
  9261. ; 1160 : }
  9262. ; 1161 : #endif /* _HAS_CPP0X */
  9263. ; 1162 :
  9264. ; 1163 : reference front()
  9265. ; 1164 : { // return first element of mutable sequence
  9266. ; 1165 : return (*begin());
  9267. ; 1166 : }
  9268. ; 1167 :
  9269. ; 1168 : const_reference front() const
  9270. ; 1169 : { // return first element of nonmutable sequence
  9271. ; 1170 : return (*begin());
  9272. ; 1171 : }
  9273. ; 1172 :
  9274. ; 1173 : reference back()
  9275. ; 1174 : { // return last element of mutable sequence
  9276. ; 1175 : return (*(end() - 1));
  9277. ; 1176 : }
  9278. ; 1177 :
  9279. ; 1178 : const_reference back() const
  9280. ; 1179 : { // return last element of nonmutable sequence
  9281. ; 1180 : return (*(end() - 1));
  9282. ; 1181 : }
  9283. ; 1182 :
  9284. ; 1183 : void push_back(const value_type& _Val)
  9285. ; 1184 : { // insert element at end
  9286. ; 1185 : if (_Inside(_STD addressof(_Val)))
  9287. ; 1186 : { // push back an element
  9288. ; 1187 : size_type _Idx = _STD addressof(_Val) - this->_Myfirst;
  9289. ; 1188 : if (this->_Mylast == this->_Myend)
  9290. ; 1189 : _Reserve(1);
  9291. ; 1190 : _Orphan_range(this->_Mylast, this->_Mylast);
  9292. ; 1191 : this->_Getal().construct(this->_Mylast,
  9293. ; 1192 : this->_Myfirst[_Idx]);
  9294. ; 1193 : ++this->_Mylast;
  9295. ; 1194 : }
  9296. ; 1195 : else
  9297. ; 1196 : { // push back a non-element
  9298. ; 1197 : if (this->_Mylast == this->_Myend)
  9299. ; 1198 : _Reserve(1);
  9300. ; 1199 : _Orphan_range(this->_Mylast, this->_Mylast);
  9301. ; 1200 : this->_Getal().construct(this->_Mylast,
  9302. ; 1201 : _Val);
  9303. ; 1202 : ++this->_Mylast;
  9304. ; 1203 : }
  9305. ; 1204 : }
  9306. ; 1205 :
  9307. ; 1206 : #if _ITERATOR_DEBUG_LEVEL == 2
  9308. ; 1207 : void pop_back()
  9309. ; 1208 : { // erase element at end
  9310. ; 1209 : if (empty())
  9311. ; 1210 : _DEBUG_ERROR("vector empty before pop");
  9312. ; 1211 : else
  9313. ; 1212 : { // erase last element
  9314. ; 1213 : _Orphan_range(this->_Mylast - 1, this->_Mylast);
  9315. ; 1214 : this->_Getal().destroy(this->_Mylast - 1);
  9316. ; 1215 : --this->_Mylast;
  9317. ; 1216 : }
  9318. ; 1217 : }
  9319. ; 1218 :
  9320. ; 1219 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
  9321. ; 1220 : void pop_back()
  9322. ; 1221 : { // erase element at end
  9323. ; 1222 : if (!empty())
  9324. ; 1223 : { // erase last element
  9325. ; 1224 : this->_Getal().destroy(this->_Mylast - 1);
  9326. ; 1225 : --this->_Mylast;
  9327. ; 1226 : }
  9328. ; 1227 : }
  9329. ; 1228 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  9330. ; 1229 :
  9331. ; 1230 : template<class _Iter>
  9332. ; 1231 : typename enable_if<_Is_iterator<_Iter>::value,
  9333. ; 1232 : void>::type
  9334. ; 1233 : assign(_Iter _First, _Iter _Last)
  9335. ; 1234 : { // assign [_First, _Last), input iterators
  9336. ; 1235 : erase(begin(), end());
  9337. ; 1236 : insert(begin(), _First, _Last);
  9338. ; 1237 : }
  9339. ; 1238 :
  9340. ; 1239 : void assign(size_type _Count, const value_type& _Val)
  9341. ; 1240 : { // assign _Count * _Val
  9342. ; 1241 : _Assign_n(_Count, _Val);
  9343. ; 1242 : }
  9344. ; 1243 :
  9345. ; 1244 : iterator insert(const_iterator _Where, const _Ty& _Val)
  9346. ; 1245 : { // insert _Val at _Where
  9347. ; 1246 : return (_Insert_n(_Where, (size_type)1, _Val));
  9348. ; 1247 : }
  9349. ; 1248 :
  9350. ; 1249 : iterator insert(const_iterator _Where, size_type _Count,
  9351. ; 1250 : const _Ty& _Val)
  9352. ; 1251 : { // insert _Count * _Val at _Where
  9353. ; 1252 : return (_Insert_n(_Where, _Count, _Val));
  9354. ; 1253 : }
  9355. ; 1254 :
  9356. ; 1255 : template<class _Iter>
  9357. ; 1256 : typename enable_if<_Is_iterator<_Iter>::value,
  9358. ; 1257 : iterator>::type
  9359. ; 1258 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  9360. ; 1259 : { // insert [_First, _Last) at _Where
  9361. ; 1260 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
  9362. ; 1261 : _Insert(_Where, _First, _Last, _Iter_cat(_First));
  9363. ; 1262 : return (begin() + _Off);
  9364. ; 1263 : }
  9365. ; 1264 :
  9366. ; 1265 : template<class _Iter>
  9367. ; 1266 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
  9368. ; 1267 : input_iterator_tag)
  9369. ; 1268 : { // insert [_First, _Last) at _Where, input iterators
  9370. ; 1269 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
  9371. ; 1270 :
  9372. ; 1271 : #if _ITERATOR_DEBUG_LEVEL == 2
  9373. ; 1272 : if (size() < _Off)
  9374. ; 1273 : _DEBUG_ERROR("vector insert iterator outside range");
  9375. ; 1274 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  9376. ; 1275 :
  9377. ; 1276 : if (_First != _Last)
  9378. ; 1277 : { // worth doing, gather at end and rotate into place
  9379. ; 1278 : size_type _Oldsize = size();
  9380. ; 1279 :
  9381. ; 1280 : _TRY_BEGIN
  9382. ; 1281 : for (; _First != _Last; ++_First)
  9383. ; 1282 : push_back(*_First); // append
  9384. ; 1283 :
  9385. ; 1284 : _CATCH_ALL
  9386. ; 1285 : erase(begin() + _Oldsize, end());
  9387. ; 1286 : _RERAISE;
  9388. ; 1287 : _CATCH_END
  9389. ; 1288 :
  9390. ; 1289 : _STD rotate(begin() + _Off, begin() + _Oldsize, end());
  9391. ; 1290 : }
  9392. ; 1291 : }
  9393. ; 1292 :
  9394. ; 1293 : template<class _Iter>
  9395. ; 1294 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
  9396. ; 1295 : forward_iterator_tag)
  9397. ; 1296 : { // insert [_First, _Last) at _Where, forward iterators
  9398. ; 1297 : #if _ITERATOR_DEBUG_LEVEL == 2
  9399. ; 1298 : if (_VICONT(_Where) != this
  9400. ; 1299 : || _VIPTR(_Where) < this->_Myfirst
  9401. ; 1300 : || this->_Mylast < _VIPTR(_Where))
  9402. ; 1301 : _DEBUG_ERROR("vector insert iterator outside range");
  9403. ; 1302 : _DEBUG_RANGE(_First, _Last);
  9404. ; 1303 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  9405. ; 1304 :
  9406. ; 1305 : size_type _Count = 0;
  9407. ; 1306 : _Distance(_First, _Last, _Count);
  9408. ; 1307 :
  9409. ; 1308 : if (_Count == 0)
  9410. ; 1309 : ;
  9411. ; 1310 : else if (_Unused_capacity() < _Count)
  9412. ; 1311 : { // not enough room, reallocate
  9413. ; 1312 : if (max_size() - size() < _Count)
  9414. ; 1313 : _Xlen(); // result too long
  9415. ; 1314 :
  9416. ; 1315 : size_type _Capacity = _Grow_to(size() + _Count);
  9417. ; 1316 : pointer _Newvec = this->_Getal().allocate(_Capacity);
  9418. ; 1317 : pointer _Ptr = _Newvec;
  9419. ; 1318 :
  9420. ; 1319 : _TRY_BEGIN
  9421. ; 1320 : _Ptr = _Umove(this->_Myfirst, _VIPTR(_Where),
  9422. ; 1321 : _Newvec); // copy prefix
  9423. ; 1322 : _Ptr = _Ucopy(_First, _Last, _Ptr); // add new stuff
  9424. ; 1323 : _Umove(_VIPTR(_Where), this->_Mylast,
  9425. ; 1324 : _Ptr); // copy suffix
  9426. ; 1325 : _CATCH_ALL
  9427. ; 1326 : _Destroy(_Newvec, _Ptr);
  9428. ; 1327 : this->_Getal().deallocate(_Newvec, _Capacity);
  9429. ; 1328 : _RERAISE;
  9430. ; 1329 : _CATCH_END
  9431. ; 1330 :
  9432. ; 1331 : _Count += size();
  9433. ; 1332 : if (this->_Myfirst != pointer())
  9434. ; 1333 : { // destroy and deallocate old array
  9435. ; 1334 : _Destroy(this->_Myfirst, this->_Mylast);
  9436. ; 1335 : this->_Getal().deallocate(this->_Myfirst,
  9437. ; 1336 : this->_Myend - this->_Myfirst);
  9438. ; 1337 : }
  9439. ; 1338 :
  9440. ; 1339 : this->_Orphan_all();
  9441. ; 1340 : this->_Myend = _Newvec + _Capacity;
  9442. ; 1341 : this->_Mylast = _Newvec + _Count;
  9443. ; 1342 : this->_Myfirst = _Newvec;
  9444. ; 1343 : }
  9445. ; 1344 : else
  9446. ; 1345 : { // new stuff fits, append and rotate into place
  9447. ; 1346 : _Ucopy(_First, _Last, this->_Mylast);
  9448. ; 1347 : _STD rotate(_VIPTR(_Where), this->_Mylast,
  9449. ; 1348 : this->_Mylast + _Count);
  9450. ; 1349 : this->_Mylast += _Count;
  9451. ; 1350 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
  9452. ; 1351 : }
  9453. ; 1352 : }
  9454. ; 1353 :
  9455. ; 1354 : #if _ITERATOR_DEBUG_LEVEL == 2
  9456. ; 1355 : iterator erase(const_iterator _Where)
  9457. ; 1356 : { // erase element at where
  9458. ; 1357 : if (_VICONT(_Where) != this
  9459. ; 1358 : || _VIPTR(_Where) < this->_Myfirst
  9460. ; 1359 : || this->_Mylast <= _VIPTR(_Where))
  9461. ; 1360 : _DEBUG_ERROR("vector erase iterator outside range");
  9462. ; 1361 : _Move(_VIPTR(_Where) + 1, this->_Mylast, _VIPTR(_Where));
  9463. ; 1362 : _Destroy(this->_Mylast - 1, this->_Mylast);
  9464. ; 1363 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
  9465. ; 1364 : --this->_Mylast;
  9466. ; 1365 : return (_Make_iter(_Where));
  9467. ; 1366 : }
  9468. ; 1367 :
  9469. ; 1368 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
  9470. ; 1369 : iterator erase(const_iterator _Where)
  9471. ; 1370 : { // erase element at where
  9472. ; 1371 : _Move(_VIPTR(_Where) + 1, this->_Mylast,
  9473. ; 1372 : _VIPTR(_Where));
  9474. ; 1373 : _Destroy(this->_Mylast - 1, this->_Mylast);
  9475. ; 1374 : --this->_Mylast;
  9476. ; 1375 : return (_Make_iter(_Where));
  9477. ; 1376 : }
  9478. ; 1377 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  9479. ; 1378 :
  9480. ; 1379 : iterator erase(const_iterator _First_arg,
  9481. ; 1380 : const_iterator _Last_arg)
  9482. ; 1381 : { // erase [_First, _Last)
  9483. ; 1382 : if (_First_arg == begin() && _Last_arg == end())
  9484. ; 1383 : clear();
  9485. ; 1384 : else if (_First_arg != _Last_arg)
  9486. ; 1385 : { // clear partial
  9487. ; 1386 : iterator _First = _Make_iter(_First_arg);
  9488. ; 1387 : iterator _Last = _Make_iter(_Last_arg);
  9489. ; 1388 :
  9490. ; 1389 : if (_First != _Last)
  9491. ; 1390 : { // worth doing, copy down over hole
  9492. ; 1391 : #if _ITERATOR_DEBUG_LEVEL == 2
  9493. ; 1392 : if (_Last < _First || _VICONT(_First) != this
  9494. ; 1393 : || _VIPTR(_First) < this->_Myfirst
  9495. ; 1394 : || this->_Mylast < _VIPTR(_Last))
  9496. ; 1395 : _DEBUG_ERROR("vector erase iterator outside range");
  9497. ; 1396 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
  9498. ; 1397 : _VIPTR(_First));
  9499. ; 1398 : _Orphan_range(_VIPTR(_First), this->_Mylast);
  9500. ; 1399 :
  9501. ; 1400 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
  9502. ; 1401 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
  9503. ; 1402 : _VIPTR(_First));
  9504. ; 1403 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  9505. ; 1404 :
  9506. ; 1405 : _Destroy(_Ptr, this->_Mylast);
  9507. ; 1406 : this->_Mylast = _Ptr;
  9508. ; 1407 : }
  9509. ; 1408 : }
  9510. ; 1409 : return (_Make_iter(_First_arg));
  9511. ; 1410 : }
  9512. ; 1411 :
  9513. ; 1412 : void clear() _NOEXCEPT
  9514. ; 1413 : { // erase all
  9515. ; 1414 : this->_Orphan_all();
  9516. ; 1415 : _Destroy(this->_Myfirst, this->_Mylast);
  9517. ; 1416 : this->_Mylast = this->_Myfirst;
  9518. ; 1417 : }
  9519. ; 1418 :
  9520. ; 1419 : void swap(_Myt& _Right)
  9521. ; 1420 : { // exchange contents with _Right
  9522. ; 1421 : if (this == &_Right)
  9523. ; 1422 : ; // same object, do nothing
  9524. ; 1423 : else if (this->_Getal() == _Right._Getal())
  9525. ; 1424 : { // same allocator, swap control information
  9526. ; 1425 : this->_Swap_all(_Right);
  9527. ; 1426 : _Swap_adl(this->_Myfirst, _Right._Myfirst);
  9528. ; 1427 : _Swap_adl(this->_Mylast, _Right._Mylast);
  9529. ; 1428 : _Swap_adl(this->_Myend, _Right._Myend);
  9530. ; 1429 : }
  9531. ; 1430 :
  9532. ; 1431 : #if _HAS_CPP0X
  9533. ; 1432 : else if (_Alty::propagate_on_container_swap::value)
  9534. ; 1433 : { // swap allocators and control information
  9535. ; 1434 : this->_Swap_alloc(_Right);
  9536. ; 1435 : _Swap_adl(this->_Myfirst, _Right._Myfirst);
  9537. ; 1436 : _Swap_adl(this->_Mylast, _Right._Mylast);
  9538. ; 1437 : _Swap_adl(this->_Myend, _Right._Myend);
  9539. ; 1438 : }
  9540. ; 1439 : #endif /* _HAS_CPP0X */
  9541. ; 1440 :
  9542. ; 1441 : else
  9543. ; 1442 : { // different allocator, do multiple moves
  9544. ; 1443 : _Myt _Ts = _Move(*this);
  9545. ; 1444 :
  9546. ; 1445 : *this = _Move(_Right);
  9547. ; 1446 : _Right = _Move(_Ts);
  9548. ; 1447 : }
  9549. ; 1448 : }
  9550. ; 1449 :
  9551. ; 1450 : protected:
  9552. ; 1451 : void _Assign_n(size_type _Count, const value_type& _Val)
  9553. ; 1452 : { // assign _Count * _Val
  9554. ; 1453 : value_type _Tmp = _Val; // in case _Val is in sequence
  9555. ; 1454 : erase(begin(), end());
  9556. ; 1455 : insert(begin(), _Count, _Tmp);
  9557. ; 1456 : }
  9558. ; 1457 :
  9559. ; 1458 : bool _Buy(size_type _Capacity)
  9560. ; 1459 : { // allocate array with _Capacity elements
  9561. ; 1460 : this->_Myfirst = pointer();
  9562. ; 1461 : this->_Mylast = pointer();
  9563. ; 1462 : this->_Myend = pointer();
  9564. ; 1463 :
  9565. ; 1464 : if (_Capacity == 0)
  9566. ; 1465 : return (false);
  9567. ; 1466 : else if (max_size() < _Capacity)
  9568. ; 1467 : _Xlen(); // result too long
  9569. ; 1468 : else
  9570. ; 1469 : { // nonempty array, allocate storage
  9571. ; 1470 : this->_Myfirst = this->_Getal().allocate(_Capacity);
  9572. ; 1471 : this->_Mylast = this->_Myfirst;
  9573. ; 1472 : this->_Myend = this->_Myfirst + _Capacity;
  9574. ; 1473 : }
  9575. ; 1474 : return (true);
  9576. ; 1475 : }
  9577. ; 1476 :
  9578. ; 1477 : void _Destroy(pointer _First, pointer _Last)
  9579. ; 1478 : { // destroy [_First, _Last) using allocator
  9580. ; 1479 : _Alty _Alval(this->_Getal());
  9581. ; 1480 : _Destroy_range(_First, _Last, _Alval);
  9582. ; 1481 : }
  9583. ; 1482 :
  9584. ; 1483 : size_type _Grow_to(size_type _Count) const
  9585. ; 1484 : { // grow by 50% or at least to _Count
  9586. ; 1485 : size_type _Capacity = capacity();
  9587. ; 1486 :
  9588. ; 1487 : _Capacity = max_size() - _Capacity / 2 < _Capacity
  9589. ; 1488 : ? 0 : _Capacity + _Capacity / 2; // try to grow by 50%
  9590. ; 1489 : if (_Capacity < _Count)
  9591. ; 1490 : _Capacity = _Count;
  9592. ; 1491 : return (_Capacity);
  9593. ; 1492 : }
  9594. ; 1493 :
  9595. ; 1494 : bool _Inside(const value_type *_Ptr) const
  9596. ; 1495 : { // test if _Ptr points inside vector
  9597. ; 1496 : return (_Ptr < this->_Mylast && this->_Myfirst <= _Ptr);
  9598. ; 1497 : }
  9599. ; 1498 :
  9600. ; 1499 : void _Reallocate(size_type _Count)
  9601. ; 1500 : { // move to array of exactly _Count elements
  9602. ; 1501 : pointer _Ptr = this->_Getal().allocate(_Count);
  9603. ; 1502 :
  9604. ; 1503 : _TRY_BEGIN
  9605. ; 1504 : _Umove(this->_Myfirst, this->_Mylast, _Ptr);
  9606. ; 1505 : _CATCH_ALL
  9607. ; 1506 : this->_Getal().deallocate(_Ptr, _Count);
  9608. ; 1507 : _RERAISE;
  9609. ; 1508 : _CATCH_END
  9610. ; 1509 :
  9611. ; 1510 : size_type _Size = size();
  9612. ; 1511 : if (this->_Myfirst != pointer())
  9613. ; 1512 : { // destroy and deallocate old array
  9614. ; 1513 : _Destroy(this->_Myfirst, this->_Mylast);
  9615. ; 1514 : this->_Getal().deallocate(this->_Myfirst,
  9616. ; 1515 : this->_Myend - this->_Myfirst);
  9617. ; 1516 : }
  9618. ; 1517 :
  9619. ; 1518 : this->_Orphan_all();
  9620. ; 1519 : this->_Myend = _Ptr + _Count;
  9621. ; 1520 : this->_Mylast = _Ptr + _Size;
  9622. ; 1521 : this->_Myfirst = _Ptr;
  9623. ; 1522 : }
  9624. ; 1523 :
  9625. ; 1524 : void _Reserve(size_type _Count)
  9626. ; 1525 : { // ensure room for _Count new elements, grow exponentially
  9627. ; 1526 : if (_Unused_capacity() < _Count)
  9628. ; 1527 : { // need more room, try to get it
  9629. ; 1528 : if (max_size() - size() < _Count)
  9630. ; 1529 : _Xlen();
  9631. ; 1530 : _Reallocate(_Grow_to(size() + _Count));
  9632. ; 1531 : }
  9633. ; 1532 : }
  9634. ; 1533 :
  9635. ; 1534 : void _Tidy()
  9636. ; 1535 : { // free all storage
  9637. ; 1536 : if (this->_Myfirst != pointer())
  9638.  
  9639. mov eax, DWORD PTR [esi]
  9640. test eax, eax
  9641. je SHORT $LN3@vector
  9642. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  9643.  
  9644. ; 586 : ::operator delete(_Ptr);
  9645.  
  9646. push eax
  9647. call DWORD PTR __imp_??3@YAXPAX@Z
  9648. add esp, 4
  9649. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  9650.  
  9651. ; 1542 : this->_Myfirst = pointer();
  9652.  
  9653. mov DWORD PTR [esi], 0
  9654.  
  9655. ; 1543 : this->_Mylast = pointer();
  9656.  
  9657. mov DWORD PTR [esi+4], 0
  9658.  
  9659. ; 1544 : this->_Myend = pointer();
  9660.  
  9661. mov DWORD PTR [esi+8], 0
  9662. $LN3@vector:
  9663. pop esi
  9664.  
  9665. ; 900 : _Tidy();
  9666. ; 901 : }
  9667.  
  9668. ret 0
  9669. ??1?$vector@NV?$allocator@N@std@@@std@@QAE@XZ ENDP ; std::vector<double,std::allocator<double> >::~vector<double,std::allocator<double> >
  9670. _TEXT ENDS
  9671. ; Function compile flags: /Ogtp
  9672. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  9673. ; COMDAT ??A?$vector@NV?$allocator@N@std@@@std@@QAEAANI@Z
  9674. _TEXT SEGMENT
  9675. __Pos$ = 8 ; size = 4
  9676. ??A?$vector@NV?$allocator@N@std@@@std@@QAEAANI@Z PROC ; std::vector<double,std::allocator<double> >::operator[], COMDAT
  9677. ; _this$ = ecx
  9678.  
  9679. ; 1136 : { // subscript mutable sequence
  9680.  
  9681. push ebp
  9682. mov ebp, esp
  9683.  
  9684. ; 1137 : #if _ITERATOR_DEBUG_LEVEL == 2
  9685. ; 1138 : if (size() <= _Pos)
  9686. ; 1139 : { // report error
  9687. ; 1140 : _DEBUG_ERROR("vector subscript out of range");
  9688. ; 1141 : _SCL_SECURE_OUT_OF_RANGE;
  9689. ; 1142 : }
  9690. ; 1143 :
  9691. ; 1144 : #elif _ITERATOR_DEBUG_LEVEL == 1
  9692. ; 1145 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
  9693. ; 1146 : #endif /* _ITERATOR_DEBUG_LEVEL */
  9694. ; 1147 :
  9695. ; 1148 : return (*(this->_Myfirst + _Pos));
  9696.  
  9697. mov ecx, DWORD PTR [ecx]
  9698. mov eax, DWORD PTR __Pos$[ebp]
  9699. lea eax, DWORD PTR [ecx+eax*8]
  9700.  
  9701. ; 1149 : }
  9702.  
  9703. pop ebp
  9704. ret 4
  9705. ??A?$vector@NV?$allocator@N@std@@@std@@QAEAANI@Z ENDP ; std::vector<double,std::allocator<double> >::operator[]
  9706. _TEXT ENDS
  9707. ; Function compile flags: /Ogtp
  9708. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9709. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  9710. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9711. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  9712. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9713. ; COMDAT ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z
  9714. _TEXT SEGMENT
  9715. __Ptr$ = 8 ; size = 4
  9716. ?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
  9717. ; _this$ = ecx
  9718.  
  9719. ; 1142 : { // assign [_Ptr, <null>)
  9720.  
  9721. push ebp
  9722. mov ebp, esp
  9723. push esi
  9724. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  9725.  
  9726. ; 523 : : _CSTD strlen(_First));
  9727.  
  9728. mov esi, DWORD PTR __Ptr$[ebp]
  9729. cmp BYTE PTR [esi], 0
  9730. jne SHORT $LN5@assign
  9731. xor edx, edx
  9732. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9733.  
  9734. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  9735.  
  9736. push edx
  9737. push esi
  9738. 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
  9739. pop esi
  9740.  
  9741. ; 1145 : }
  9742.  
  9743. pop ebp
  9744. ret 4
  9745. $LN5@assign:
  9746. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  9747.  
  9748. ; 523 : : _CSTD strlen(_First));
  9749.  
  9750. mov edx, esi
  9751. push edi
  9752. lea edi, DWORD PTR [edx+1]
  9753. $LL7@assign:
  9754. mov al, BYTE PTR [edx]
  9755. inc edx
  9756. test al, al
  9757. jne SHORT $LL7@assign
  9758. sub edx, edi
  9759. pop edi
  9760. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9761.  
  9762. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  9763.  
  9764. push edx
  9765. push esi
  9766. 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
  9767. pop esi
  9768.  
  9769. ; 1145 : }
  9770.  
  9771. pop ebp
  9772. ret 4
  9773. ?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
  9774. _TEXT ENDS
  9775. ; Function compile flags: /Ogtp
  9776. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9777. ; COMDAT ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ
  9778. _TEXT SEGMENT
  9779. ?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
  9780. ; _this$ = ecx
  9781.  
  9782. ; 1733 : return (this->_Mysize);
  9783.  
  9784. mov eax, DWORD PTR [ecx+16]
  9785.  
  9786. ; 1734 : }
  9787.  
  9788. ret 0
  9789. ?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
  9790. _TEXT ENDS
  9791. ; Function compile flags: /Ogtp
  9792. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9793. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  9794. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  9795. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9796. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  9797. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9798. ; COMDAT ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEX_NI@Z
  9799. _TEXT SEGMENT
  9800. __Built$ = 8 ; size = 1
  9801. __Newsize$ = 12 ; size = 4
  9802. ?_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
  9803. ; _this$ = ecx
  9804.  
  9805. ; 2253 : { // initialize buffer, deallocating any storage
  9806.  
  9807. push ebp
  9808. mov ebp, esp
  9809.  
  9810. ; 2254 : if (!_Built)
  9811.  
  9812. cmp BYTE PTR __Built$[ebp], 0
  9813. push esi
  9814. push edi
  9815. mov edi, DWORD PTR __Newsize$[ebp]
  9816. mov esi, ecx
  9817. je SHORT $LN19@Tidy
  9818.  
  9819. ; 2255 : ;
  9820. ; 2256 : else if (this->_BUF_SIZE <= this->_Myres)
  9821.  
  9822. cmp DWORD PTR [esi+20], 16 ; 00000010H
  9823. jb SHORT $LN19@Tidy
  9824.  
  9825. ; 2257 : { // copy any leftovers to small buffer and deallocate
  9826. ; 2258 : pointer _Ptr = this->_Bx._Ptr;
  9827.  
  9828. push ebx
  9829. mov ebx, DWORD PTR [esi]
  9830.  
  9831. ; 2259 : this->_Getal().destroy(&this->_Bx._Ptr);
  9832. ; 2260 : if (0 < _Newsize)
  9833.  
  9834. test edi, edi
  9835. je SHORT $LN14@Tidy
  9836. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  9837.  
  9838. ; 530 : : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
  9839.  
  9840. push edi
  9841. push ebx
  9842. push esi
  9843. call _memcpy
  9844. add esp, 12 ; 0000000cH
  9845. $LN14@Tidy:
  9846. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  9847.  
  9848. ; 586 : ::operator delete(_Ptr);
  9849.  
  9850. push ebx
  9851. call DWORD PTR __imp_??3@YAXPAX@Z
  9852. add esp, 4
  9853. pop ebx
  9854. $LN19@Tidy:
  9855. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9856.  
  9857. ; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
  9858.  
  9859. mov DWORD PTR [esi+16], edi
  9860.  
  9861. ; 2261 : _Traits::copy(this->_Bx._Buf,
  9862. ; 2262 : _STD addressof(*_Ptr), _Newsize);
  9863. ; 2263 : this->_Getal().deallocate(_Ptr, this->_Myres + 1);
  9864. ; 2264 : }
  9865. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  9866.  
  9867. mov DWORD PTR [esi+20], 15 ; 0000000fH
  9868. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  9869.  
  9870. ; 564 : _Left = _Right;
  9871.  
  9872. mov BYTE PTR [edi+esi], 0
  9873. pop edi
  9874. pop esi
  9875. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9876.  
  9877. ; 2267 : }
  9878.  
  9879. pop ebp
  9880. ret 8
  9881. ?_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
  9882. _TEXT ENDS
  9883. ; Function compile flags: /Ogtp
  9884. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  9885. ; COMDAT ??0?$allocator@D@std@@QAE@XZ
  9886. _TEXT SEGMENT
  9887. ??0?$allocator@D@std@@QAE@XZ PROC ; std::allocator<char>::allocator<char>, COMDAT
  9888. ; _this$ = ecx
  9889.  
  9890. ; 566 : { // construct default allocator (do nothing)
  9891. ; 567 : }
  9892.  
  9893. mov eax, ecx
  9894. ret 0
  9895. ??0?$allocator@D@std@@QAE@XZ ENDP ; std::allocator<char>::allocator<char>
  9896. _TEXT ENDS
  9897. ; Function compile flags: /Ogtp
  9898. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9899. ; COMDAT ??0?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QAE@ABV?$allocator@D@1@@Z
  9900. _TEXT SEGMENT
  9901. ___formal$dead$ = 8 ; size = 4
  9902. ??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
  9903. ; _this$ = ecx
  9904.  
  9905. ; 498 : _Mysize = 0;
  9906.  
  9907. mov DWORD PTR [ecx+16], 0
  9908.  
  9909. ; 499 : _Myres = 0;
  9910.  
  9911. mov DWORD PTR [ecx+20], 0
  9912.  
  9913. ; 636 : { // construct allocator from _Al
  9914. ; 637 : }
  9915.  
  9916. mov eax, ecx
  9917. ret 4
  9918. ??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> > >
  9919. _TEXT ENDS
  9920. ; Function compile flags: /Ogtp
  9921. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9922. ; 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
  9923. _TEXT SEGMENT
  9924. ___$ReturnUdt$ = 8 ; size = 4
  9925. ?_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
  9926. ; _this$dead$ = ecx
  9927.  
  9928. ; 688 : { // get reference to allocator
  9929.  
  9930. push ebp
  9931. mov ebp, esp
  9932.  
  9933. ; 689 : return (_Alty());
  9934.  
  9935. mov eax, DWORD PTR ___$ReturnUdt$[ebp]
  9936.  
  9937. ; 690 : }
  9938.  
  9939. pop ebp
  9940. ret 4
  9941. ?_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
  9942. _TEXT ENDS
  9943. ; Function compile flags: /Ogtp
  9944. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  9945. ; COMDAT ?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QBEPBDXZ
  9946. _TEXT SEGMENT
  9947. ?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QBEPBDXZ PROC ; std::_String_val<std::_Simple_types<char> >::_Myptr, COMDAT
  9948. ; _this$ = ecx
  9949.  
  9950. ; 522 : return (this->_BUF_SIZE <= this->_Myres
  9951. ; 523 : ? _STD addressof(*this->_Bx._Ptr)
  9952. ; 524 : : this->_Bx._Buf);
  9953.  
  9954. cmp DWORD PTR [ecx+20], 16 ; 00000010H
  9955. jb SHORT $LN3@Myptr
  9956. mov eax, DWORD PTR [ecx]
  9957.  
  9958. ; 525 : }
  9959.  
  9960. ret 0
  9961. $LN3@Myptr:
  9962.  
  9963. ; 522 : return (this->_BUF_SIZE <= this->_Myres
  9964. ; 523 : ? _STD addressof(*this->_Bx._Ptr)
  9965. ; 524 : : this->_Bx._Buf);
  9966.  
  9967. mov eax, ecx
  9968.  
  9969. ; 525 : }
  9970.  
  9971. ret 0
  9972. ?_Myptr@?$_String_val@U?$_Simple_types@D@std@@@std@@QBEPBDXZ ENDP ; std::_String_val<std::_Simple_types<char> >::_Myptr
  9973. _TEXT ENDS
  9974. ; Function compile flags: /Ogtp
  9975. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  9976. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  9977. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  9978. ; COMDAT ?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ
  9979. _TEXT SEGMENT
  9980. ?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ PROC ; std::vector<int,std::allocator<int> >::_Tidy, COMDAT
  9981. ; _this$ = ecx
  9982.  
  9983. ; 1535 : { // free all storage
  9984.  
  9985. push esi
  9986. mov esi, ecx
  9987.  
  9988. ; 1536 : if (this->_Myfirst != pointer())
  9989.  
  9990. mov eax, DWORD PTR [esi]
  9991. test eax, eax
  9992. je SHORT $LN1@Tidy
  9993. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  9994.  
  9995. ; 586 : ::operator delete(_Ptr);
  9996.  
  9997. push eax
  9998. call DWORD PTR __imp_??3@YAXPAX@Z
  9999. add esp, 4
  10000. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10001.  
  10002. ; 1542 : this->_Myfirst = pointer();
  10003.  
  10004. mov DWORD PTR [esi], 0
  10005.  
  10006. ; 1543 : this->_Mylast = pointer();
  10007.  
  10008. mov DWORD PTR [esi+4], 0
  10009.  
  10010. ; 1544 : this->_Myend = pointer();
  10011.  
  10012. mov DWORD PTR [esi+8], 0
  10013. $LN1@Tidy:
  10014. pop esi
  10015.  
  10016. ; 1545 : }
  10017. ; 1546 : }
  10018.  
  10019. ret 0
  10020. ?_Tidy@?$vector@HV?$allocator@H@std@@@std@@IAEXXZ ENDP ; std::vector<int,std::allocator<int> >::_Tidy
  10021. _TEXT ENDS
  10022. ; Function compile flags: /Ogtp
  10023. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  10024. ; COMDAT ??0?$allocator@H@std@@QAE@XZ
  10025. _TEXT SEGMENT
  10026. ??0?$allocator@H@std@@QAE@XZ PROC ; std::allocator<int>::allocator<int>, COMDAT
  10027. ; _this$ = ecx
  10028.  
  10029. ; 566 : { // construct default allocator (do nothing)
  10030. ; 567 : }
  10031.  
  10032. mov eax, ecx
  10033. ret 0
  10034. ??0?$allocator@H@std@@QAE@XZ ENDP ; std::allocator<int>::allocator<int>
  10035. _TEXT ENDS
  10036. ; Function compile flags: /Ogtp
  10037. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10038. ; COMDAT ??0?$_Vector_alloc@$0A@U?$_Vec_base_types@HV?$allocator@H@std@@@std@@@std@@QAE@ABV?$allocator@H@1@@Z
  10039. _TEXT SEGMENT
  10040. ___formal$dead$ = 8 ; size = 4
  10041. ??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
  10042. ; _this$ = ecx
  10043.  
  10044. ; 486 : _Myfirst = pointer();
  10045.  
  10046. mov DWORD PTR [ecx], 0
  10047.  
  10048. ; 487 : _Mylast = pointer();
  10049.  
  10050. mov DWORD PTR [ecx+4], 0
  10051.  
  10052. ; 488 : _Myend = pointer();
  10053.  
  10054. mov DWORD PTR [ecx+8], 0
  10055.  
  10056. ; 594 : { // construct allocator from _Al
  10057. ; 595 : }
  10058.  
  10059. mov eax, ecx
  10060. ret 4
  10061. ??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> > >
  10062. _TEXT ENDS
  10063. ; Function compile flags: /Ogtp
  10064. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10065. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
  10066. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10067. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
  10068. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10069. ; COMDAT ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z
  10070. _TEXT SEGMENT
  10071. __Newsize$ = 8 ; size = 4
  10072. ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z PROC ; std::vector<double,std::allocator<double> >::resize, COMDAT
  10073. ; _this$ = ecx
  10074.  
  10075. ; 1059 : { // determine new length, padding as needed
  10076.  
  10077. push ebp
  10078. mov ebp, esp
  10079. push ebx
  10080. mov ebx, ecx
  10081. push esi
  10082.  
  10083. ; 1087 : return (this->_Mylast - this->_Myfirst);
  10084.  
  10085. mov eax, DWORD PTR [ebx+4]
  10086. mov edx, DWORD PTR [ebx]
  10087.  
  10088. ; 1060 : if (_Newsize < size())
  10089.  
  10090. mov esi, DWORD PTR __Newsize$[ebp]
  10091.  
  10092. ; 1087 : return (this->_Mylast - this->_Myfirst);
  10093.  
  10094. mov ecx, eax
  10095. sub ecx, edx
  10096. sar ecx, 3
  10097. push edi
  10098.  
  10099. ; 1060 : if (_Newsize < size())
  10100.  
  10101. cmp ecx, esi
  10102. jbe SHORT $LN135@resize
  10103.  
  10104. ; 170 : _Ptr += _Off;
  10105.  
  10106. lea esi, DWORD PTR [edx+esi*8]
  10107.  
  10108. ; 171 : return (*this);
  10109. ; 172 : }
  10110. ; 173 :
  10111. ; 174 : _Myiter operator+(difference_type _Off) const
  10112. ; 175 : { // return this + integer
  10113. ; 176 : _Myiter _Tmp = *this;
  10114. ; 177 : return (_Tmp += _Off);
  10115. ; 178 : }
  10116. ; 179 :
  10117. ; 180 : _Myiter& operator-=(difference_type _Off)
  10118. ; 181 : { // decrement by integer
  10119. ; 182 : return (*this += -_Off);
  10120. ; 183 : }
  10121. ; 184 :
  10122. ; 185 : _Myiter operator-(difference_type _Off) const
  10123. ; 186 : { // return this - integer
  10124. ; 187 : _Myiter _Tmp = *this;
  10125. ; 188 : return (_Tmp -= _Off);
  10126. ; 189 : }
  10127. ; 190 :
  10128. ; 191 : difference_type operator-(const _Myiter& _Right) const
  10129. ; 192 : { // return difference of iterators
  10130. ; 193 : _Compat(_Right);
  10131. ; 194 : return (this->_Ptr - _Right._Ptr);
  10132. ; 195 : }
  10133. ; 196 :
  10134. ; 197 : reference operator[](difference_type _Off) const
  10135. ; 198 : { // subscript
  10136. ; 199 : return (*(*this + _Off));
  10137. ; 200 : }
  10138. ; 201 :
  10139. ; 202 : bool operator==(const _Myiter& _Right) const
  10140. ; 203 : { // test for iterator equality
  10141. ; 204 : _Compat(_Right);
  10142. ; 205 : return (this->_Ptr == _Right._Ptr);
  10143.  
  10144. cmp esi, edx
  10145.  
  10146. ; 1088 : }
  10147. ; 1089 :
  10148. ; 1090 : size_type max_size() const _NOEXCEPT
  10149. ; 1091 : { // return maximum possible length of sequence
  10150. ; 1092 : return (this->_Getal().max_size());
  10151. ; 1093 : }
  10152. ; 1094 :
  10153. ; 1095 : bool empty() const _NOEXCEPT
  10154. ; 1096 : { // test if sequence is empty
  10155. ; 1097 : return (this->_Myfirst == this->_Mylast);
  10156. ; 1098 : }
  10157. ; 1099 :
  10158. ; 1100 : _Alloc get_allocator() const _NOEXCEPT
  10159. ; 1101 : { // return allocator object for values
  10160. ; 1102 : return (this->_Getal());
  10161. ; 1103 : }
  10162. ; 1104 :
  10163. ; 1105 : const_reference at(size_type _Pos) const
  10164. ; 1106 : { // subscript nonmutable sequence with checking
  10165. ; 1107 : if (size() <= _Pos)
  10166. ; 1108 : _Xran();
  10167. ; 1109 : return (*(this->_Myfirst + _Pos));
  10168. ; 1110 : }
  10169. ; 1111 :
  10170. ; 1112 : reference at(size_type _Pos)
  10171. ; 1113 : { // subscript mutable sequence with checking
  10172. ; 1114 : if (size() <= _Pos)
  10173. ; 1115 : _Xran();
  10174. ; 1116 : return (*(this->_Myfirst + _Pos));
  10175. ; 1117 : }
  10176. ; 1118 :
  10177. ; 1119 : const_reference operator[](size_type _Pos) const
  10178. ; 1120 : { // subscript nonmutable sequence
  10179. ; 1121 : #if _ITERATOR_DEBUG_LEVEL == 2
  10180. ; 1122 : if (size() <= _Pos)
  10181. ; 1123 : { // report error
  10182. ; 1124 : _DEBUG_ERROR("vector subscript out of range");
  10183. ; 1125 : _SCL_SECURE_OUT_OF_RANGE;
  10184. ; 1126 : }
  10185. ; 1127 :
  10186. ; 1128 : #elif _ITERATOR_DEBUG_LEVEL == 1
  10187. ; 1129 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
  10188. ; 1130 : #endif /* _ITERATOR_DEBUG_LEVEL */
  10189. ; 1131 :
  10190. ; 1132 : return (*(this->_Myfirst + _Pos));
  10191. ; 1133 : }
  10192. ; 1134 :
  10193. ; 1135 : reference operator[](size_type _Pos)
  10194. ; 1136 : { // subscript mutable sequence
  10195. ; 1137 : #if _ITERATOR_DEBUG_LEVEL == 2
  10196. ; 1138 : if (size() <= _Pos)
  10197. ; 1139 : { // report error
  10198. ; 1140 : _DEBUG_ERROR("vector subscript out of range");
  10199. ; 1141 : _SCL_SECURE_OUT_OF_RANGE;
  10200. ; 1142 : }
  10201. ; 1143 :
  10202. ; 1144 : #elif _ITERATOR_DEBUG_LEVEL == 1
  10203. ; 1145 : _SCL_SECURE_VALIDATE_RANGE(_Pos < size());
  10204. ; 1146 : #endif /* _ITERATOR_DEBUG_LEVEL */
  10205. ; 1147 :
  10206. ; 1148 : return (*(this->_Myfirst + _Pos));
  10207. ; 1149 : }
  10208. ; 1150 :
  10209. ; 1151 : #if _HAS_CPP0X
  10210. ; 1152 : pointer data() _NOEXCEPT
  10211. ; 1153 : { // return address of first element
  10212. ; 1154 : return (this->_Myfirst);
  10213. ; 1155 : }
  10214. ; 1156 :
  10215. ; 1157 : const_pointer data() const _NOEXCEPT
  10216. ; 1158 : { // return address of first element
  10217. ; 1159 : return (this->_Myfirst);
  10218. ; 1160 : }
  10219. ; 1161 : #endif /* _HAS_CPP0X */
  10220. ; 1162 :
  10221. ; 1163 : reference front()
  10222. ; 1164 : { // return first element of mutable sequence
  10223. ; 1165 : return (*begin());
  10224. ; 1166 : }
  10225. ; 1167 :
  10226. ; 1168 : const_reference front() const
  10227. ; 1169 : { // return first element of nonmutable sequence
  10228. ; 1170 : return (*begin());
  10229. ; 1171 : }
  10230. ; 1172 :
  10231. ; 1173 : reference back()
  10232. ; 1174 : { // return last element of mutable sequence
  10233. ; 1175 : return (*(end() - 1));
  10234. ; 1176 : }
  10235. ; 1177 :
  10236. ; 1178 : const_reference back() const
  10237. ; 1179 : { // return last element of nonmutable sequence
  10238. ; 1180 : return (*(end() - 1));
  10239. ; 1181 : }
  10240. ; 1182 :
  10241. ; 1183 : void push_back(const value_type& _Val)
  10242. ; 1184 : { // insert element at end
  10243. ; 1185 : if (_Inside(_STD addressof(_Val)))
  10244. ; 1186 : { // push back an element
  10245. ; 1187 : size_type _Idx = _STD addressof(_Val) - this->_Myfirst;
  10246. ; 1188 : if (this->_Mylast == this->_Myend)
  10247. ; 1189 : _Reserve(1);
  10248. ; 1190 : _Orphan_range(this->_Mylast, this->_Mylast);
  10249. ; 1191 : this->_Getal().construct(this->_Mylast,
  10250. ; 1192 : this->_Myfirst[_Idx]);
  10251. ; 1193 : ++this->_Mylast;
  10252. ; 1194 : }
  10253. ; 1195 : else
  10254. ; 1196 : { // push back a non-element
  10255. ; 1197 : if (this->_Mylast == this->_Myend)
  10256. ; 1198 : _Reserve(1);
  10257. ; 1199 : _Orphan_range(this->_Mylast, this->_Mylast);
  10258. ; 1200 : this->_Getal().construct(this->_Mylast,
  10259. ; 1201 : _Val);
  10260. ; 1202 : ++this->_Mylast;
  10261. ; 1203 : }
  10262. ; 1204 : }
  10263. ; 1205 :
  10264. ; 1206 : #if _ITERATOR_DEBUG_LEVEL == 2
  10265. ; 1207 : void pop_back()
  10266. ; 1208 : { // erase element at end
  10267. ; 1209 : if (empty())
  10268. ; 1210 : _DEBUG_ERROR("vector empty before pop");
  10269. ; 1211 : else
  10270. ; 1212 : { // erase last element
  10271. ; 1213 : _Orphan_range(this->_Mylast - 1, this->_Mylast);
  10272. ; 1214 : this->_Getal().destroy(this->_Mylast - 1);
  10273. ; 1215 : --this->_Mylast;
  10274. ; 1216 : }
  10275. ; 1217 : }
  10276. ; 1218 :
  10277. ; 1219 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
  10278. ; 1220 : void pop_back()
  10279. ; 1221 : { // erase element at end
  10280. ; 1222 : if (!empty())
  10281. ; 1223 : { // erase last element
  10282. ; 1224 : this->_Getal().destroy(this->_Mylast - 1);
  10283. ; 1225 : --this->_Mylast;
  10284. ; 1226 : }
  10285. ; 1227 : }
  10286. ; 1228 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  10287. ; 1229 :
  10288. ; 1230 : template<class _Iter>
  10289. ; 1231 : typename enable_if<_Is_iterator<_Iter>::value,
  10290. ; 1232 : void>::type
  10291. ; 1233 : assign(_Iter _First, _Iter _Last)
  10292. ; 1234 : { // assign [_First, _Last), input iterators
  10293. ; 1235 : erase(begin(), end());
  10294. ; 1236 : insert(begin(), _First, _Last);
  10295. ; 1237 : }
  10296. ; 1238 :
  10297. ; 1239 : void assign(size_type _Count, const value_type& _Val)
  10298. ; 1240 : { // assign _Count * _Val
  10299. ; 1241 : _Assign_n(_Count, _Val);
  10300. ; 1242 : }
  10301. ; 1243 :
  10302. ; 1244 : iterator insert(const_iterator _Where, const _Ty& _Val)
  10303. ; 1245 : { // insert _Val at _Where
  10304. ; 1246 : return (_Insert_n(_Where, (size_type)1, _Val));
  10305. ; 1247 : }
  10306. ; 1248 :
  10307. ; 1249 : iterator insert(const_iterator _Where, size_type _Count,
  10308. ; 1250 : const _Ty& _Val)
  10309. ; 1251 : { // insert _Count * _Val at _Where
  10310. ; 1252 : return (_Insert_n(_Where, _Count, _Val));
  10311. ; 1253 : }
  10312. ; 1254 :
  10313. ; 1255 : template<class _Iter>
  10314. ; 1256 : typename enable_if<_Is_iterator<_Iter>::value,
  10315. ; 1257 : iterator>::type
  10316. ; 1258 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  10317. ; 1259 : { // insert [_First, _Last) at _Where
  10318. ; 1260 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
  10319. ; 1261 : _Insert(_Where, _First, _Last, _Iter_cat(_First));
  10320. ; 1262 : return (begin() + _Off);
  10321. ; 1263 : }
  10322. ; 1264 :
  10323. ; 1265 : template<class _Iter>
  10324. ; 1266 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
  10325. ; 1267 : input_iterator_tag)
  10326. ; 1268 : { // insert [_First, _Last) at _Where, input iterators
  10327. ; 1269 : size_type _Off = _VIPTR(_Where) - this->_Myfirst;
  10328. ; 1270 :
  10329. ; 1271 : #if _ITERATOR_DEBUG_LEVEL == 2
  10330. ; 1272 : if (size() < _Off)
  10331. ; 1273 : _DEBUG_ERROR("vector insert iterator outside range");
  10332. ; 1274 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  10333. ; 1275 :
  10334. ; 1276 : if (_First != _Last)
  10335. ; 1277 : { // worth doing, gather at end and rotate into place
  10336. ; 1278 : size_type _Oldsize = size();
  10337. ; 1279 :
  10338. ; 1280 : _TRY_BEGIN
  10339. ; 1281 : for (; _First != _Last; ++_First)
  10340. ; 1282 : push_back(*_First); // append
  10341. ; 1283 :
  10342. ; 1284 : _CATCH_ALL
  10343. ; 1285 : erase(begin() + _Oldsize, end());
  10344. ; 1286 : _RERAISE;
  10345. ; 1287 : _CATCH_END
  10346. ; 1288 :
  10347. ; 1289 : _STD rotate(begin() + _Off, begin() + _Oldsize, end());
  10348. ; 1290 : }
  10349. ; 1291 : }
  10350. ; 1292 :
  10351. ; 1293 : template<class _Iter>
  10352. ; 1294 : void _Insert(const_iterator _Where, _Iter _First, _Iter _Last,
  10353. ; 1295 : forward_iterator_tag)
  10354. ; 1296 : { // insert [_First, _Last) at _Where, forward iterators
  10355. ; 1297 : #if _ITERATOR_DEBUG_LEVEL == 2
  10356. ; 1298 : if (_VICONT(_Where) != this
  10357. ; 1299 : || _VIPTR(_Where) < this->_Myfirst
  10358. ; 1300 : || this->_Mylast < _VIPTR(_Where))
  10359. ; 1301 : _DEBUG_ERROR("vector insert iterator outside range");
  10360. ; 1302 : _DEBUG_RANGE(_First, _Last);
  10361. ; 1303 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  10362. ; 1304 :
  10363. ; 1305 : size_type _Count = 0;
  10364. ; 1306 : _Distance(_First, _Last, _Count);
  10365. ; 1307 :
  10366. ; 1308 : if (_Count == 0)
  10367. ; 1309 : ;
  10368. ; 1310 : else if (_Unused_capacity() < _Count)
  10369. ; 1311 : { // not enough room, reallocate
  10370. ; 1312 : if (max_size() - size() < _Count)
  10371. ; 1313 : _Xlen(); // result too long
  10372. ; 1314 :
  10373. ; 1315 : size_type _Capacity = _Grow_to(size() + _Count);
  10374. ; 1316 : pointer _Newvec = this->_Getal().allocate(_Capacity);
  10375. ; 1317 : pointer _Ptr = _Newvec;
  10376. ; 1318 :
  10377. ; 1319 : _TRY_BEGIN
  10378. ; 1320 : _Ptr = _Umove(this->_Myfirst, _VIPTR(_Where),
  10379. ; 1321 : _Newvec); // copy prefix
  10380. ; 1322 : _Ptr = _Ucopy(_First, _Last, _Ptr); // add new stuff
  10381. ; 1323 : _Umove(_VIPTR(_Where), this->_Mylast,
  10382. ; 1324 : _Ptr); // copy suffix
  10383. ; 1325 : _CATCH_ALL
  10384. ; 1326 : _Destroy(_Newvec, _Ptr);
  10385. ; 1327 : this->_Getal().deallocate(_Newvec, _Capacity);
  10386. ; 1328 : _RERAISE;
  10387. ; 1329 : _CATCH_END
  10388. ; 1330 :
  10389. ; 1331 : _Count += size();
  10390. ; 1332 : if (this->_Myfirst != pointer())
  10391. ; 1333 : { // destroy and deallocate old array
  10392. ; 1334 : _Destroy(this->_Myfirst, this->_Mylast);
  10393. ; 1335 : this->_Getal().deallocate(this->_Myfirst,
  10394. ; 1336 : this->_Myend - this->_Myfirst);
  10395. ; 1337 : }
  10396. ; 1338 :
  10397. ; 1339 : this->_Orphan_all();
  10398. ; 1340 : this->_Myend = _Newvec + _Capacity;
  10399. ; 1341 : this->_Mylast = _Newvec + _Count;
  10400. ; 1342 : this->_Myfirst = _Newvec;
  10401. ; 1343 : }
  10402. ; 1344 : else
  10403. ; 1345 : { // new stuff fits, append and rotate into place
  10404. ; 1346 : _Ucopy(_First, _Last, this->_Mylast);
  10405. ; 1347 : _STD rotate(_VIPTR(_Where), this->_Mylast,
  10406. ; 1348 : this->_Mylast + _Count);
  10407. ; 1349 : this->_Mylast += _Count;
  10408. ; 1350 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
  10409. ; 1351 : }
  10410. ; 1352 : }
  10411. ; 1353 :
  10412. ; 1354 : #if _ITERATOR_DEBUG_LEVEL == 2
  10413. ; 1355 : iterator erase(const_iterator _Where)
  10414. ; 1356 : { // erase element at where
  10415. ; 1357 : if (_VICONT(_Where) != this
  10416. ; 1358 : || _VIPTR(_Where) < this->_Myfirst
  10417. ; 1359 : || this->_Mylast <= _VIPTR(_Where))
  10418. ; 1360 : _DEBUG_ERROR("vector erase iterator outside range");
  10419. ; 1361 : _Move(_VIPTR(_Where) + 1, this->_Mylast, _VIPTR(_Where));
  10420. ; 1362 : _Destroy(this->_Mylast - 1, this->_Mylast);
  10421. ; 1363 : _Orphan_range(_VIPTR(_Where), this->_Mylast);
  10422. ; 1364 : --this->_Mylast;
  10423. ; 1365 : return (_Make_iter(_Where));
  10424. ; 1366 : }
  10425. ; 1367 :
  10426. ; 1368 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
  10427. ; 1369 : iterator erase(const_iterator _Where)
  10428. ; 1370 : { // erase element at where
  10429. ; 1371 : _Move(_VIPTR(_Where) + 1, this->_Mylast,
  10430. ; 1372 : _VIPTR(_Where));
  10431. ; 1373 : _Destroy(this->_Mylast - 1, this->_Mylast);
  10432. ; 1374 : --this->_Mylast;
  10433. ; 1375 : return (_Make_iter(_Where));
  10434. ; 1376 : }
  10435. ; 1377 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  10436. ; 1378 :
  10437. ; 1379 : iterator erase(const_iterator _First_arg,
  10438. ; 1380 : const_iterator _Last_arg)
  10439. ; 1381 : { // erase [_First, _Last)
  10440. ; 1382 : if (_First_arg == begin() && _Last_arg == end())
  10441.  
  10442. jne SHORT $LN38@resize
  10443. pop edi
  10444. pop esi
  10445.  
  10446. ; 1385 : { // clear partial
  10447. ; 1386 : iterator _First = _Make_iter(_First_arg);
  10448. ; 1387 : iterator _Last = _Make_iter(_Last_arg);
  10449. ; 1388 :
  10450. ; 1389 : if (_First != _Last)
  10451. ; 1390 : { // worth doing, copy down over hole
  10452. ; 1391 : #if _ITERATOR_DEBUG_LEVEL == 2
  10453. ; 1392 : if (_Last < _First || _VICONT(_First) != this
  10454. ; 1393 : || _VIPTR(_First) < this->_Myfirst
  10455. ; 1394 : || this->_Mylast < _VIPTR(_Last))
  10456. ; 1395 : _DEBUG_ERROR("vector erase iterator outside range");
  10457. ; 1396 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
  10458. ; 1397 : _VIPTR(_First));
  10459. ; 1398 : _Orphan_range(_VIPTR(_First), this->_Mylast);
  10460. ; 1399 :
  10461. ; 1400 : #else /* _ITERATOR_DEBUG_LEVEL == 2 */
  10462. ; 1401 : pointer _Ptr = _Move(_VIPTR(_Last), this->_Mylast,
  10463. ; 1402 : _VIPTR(_First));
  10464. ; 1403 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  10465. ; 1404 :
  10466. ; 1405 : _Destroy(_Ptr, this->_Mylast);
  10467. ; 1406 : this->_Mylast = _Ptr;
  10468. ; 1407 : }
  10469. ; 1408 : }
  10470. ; 1409 : return (_Make_iter(_First_arg));
  10471. ; 1410 : }
  10472. ; 1411 :
  10473. ; 1412 : void clear() _NOEXCEPT
  10474. ; 1413 : { // erase all
  10475. ; 1414 : this->_Orphan_all();
  10476. ; 1415 : _Destroy(this->_Myfirst, this->_Mylast);
  10477. ; 1416 : this->_Mylast = this->_Myfirst;
  10478.  
  10479. mov DWORD PTR [ebx+4], edx
  10480. pop ebx
  10481.  
  10482. ; 1074 : }
  10483. ; 1075 : }
  10484.  
  10485. pop ebp
  10486. ret 4
  10487. $LN38@resize:
  10488.  
  10489. ; 171 : return (*this);
  10490. ; 172 : }
  10491. ; 173 :
  10492. ; 174 : _Myiter operator+(difference_type _Off) const
  10493. ; 175 : { // return this + integer
  10494. ; 176 : _Myiter _Tmp = *this;
  10495. ; 177 : return (_Tmp += _Off);
  10496. ; 178 : }
  10497. ; 179 :
  10498. ; 180 : _Myiter& operator-=(difference_type _Off)
  10499. ; 181 : { // decrement by integer
  10500. ; 182 : return (*this += -_Off);
  10501. ; 183 : }
  10502. ; 184 :
  10503. ; 185 : _Myiter operator-(difference_type _Off) const
  10504. ; 186 : { // return this - integer
  10505. ; 187 : _Myiter _Tmp = *this;
  10506. ; 188 : return (_Tmp -= _Off);
  10507. ; 189 : }
  10508. ; 190 :
  10509. ; 191 : difference_type operator-(const _Myiter& _Right) const
  10510. ; 192 : { // return difference of iterators
  10511. ; 193 : _Compat(_Right);
  10512. ; 194 : return (this->_Ptr - _Right._Ptr);
  10513. ; 195 : }
  10514. ; 196 :
  10515. ; 197 : reference operator[](difference_type _Off) const
  10516. ; 198 : { // subscript
  10517. ; 199 : return (*(*this + _Off));
  10518. ; 200 : }
  10519. ; 201 :
  10520. ; 202 : bool operator==(const _Myiter& _Right) const
  10521. ; 203 : { // test for iterator equality
  10522. ; 204 : _Compat(_Right);
  10523. ; 205 : return (this->_Ptr == _Right._Ptr);
  10524.  
  10525. cmp esi, eax
  10526.  
  10527. ; 1383 : clear();
  10528. ; 1384 : else if (_First_arg != _Last_arg)
  10529.  
  10530. je SHORT $LN2@resize
  10531. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
  10532.  
  10533. ; 2475 : ptrdiff_t _Count = _Last - _First;
  10534.  
  10535. mov ecx, eax
  10536. sub ecx, eax
  10537. sar ecx, 3
  10538.  
  10539. ; 2476 : _CSTD memmove(&*_Dest, &*_First,
  10540. ; 2477 : _Count * sizeof (*_First));
  10541.  
  10542. lea edi, DWORD PTR [ecx*8]
  10543. push edi
  10544. push eax
  10545. push esi
  10546. call DWORD PTR __imp__memmove
  10547. add esp, 12 ; 0000000cH
  10548.  
  10549. ; 2478 : return (_Dest + _Count);
  10550.  
  10551. lea eax, DWORD PTR [edi+esi]
  10552. pop edi
  10553. pop esi
  10554. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10555.  
  10556. ; 1073 : this->_Mylast += _Newsize - size();
  10557.  
  10558. mov DWORD PTR [ebx+4], eax
  10559. pop ebx
  10560.  
  10561. ; 1074 : }
  10562. ; 1075 : }
  10563.  
  10564. pop ebp
  10565. ret 4
  10566. $LN135@resize:
  10567.  
  10568. ; 1061 : erase(begin() + _Newsize, end());
  10569. ; 1062 : else if (size() < _Newsize)
  10570.  
  10571. jae SHORT $LN2@resize
  10572.  
  10573. ; 1063 : { // pad as needed
  10574. ; 1064 : _Alty _Alval(this->_Getal());
  10575. ; 1065 : _Reserve(_Newsize - size());
  10576.  
  10577. mov eax, esi
  10578. sub eax, ecx
  10579. push eax
  10580. mov ecx, ebx
  10581. call ?_Reserve@?$vector@NV?$allocator@N@std@@@std@@IAEXI@Z ; std::vector<double,std::allocator<double> >::_Reserve
  10582.  
  10583. ; 1087 : return (this->_Mylast - this->_Myfirst);
  10584.  
  10585. mov edi, DWORD PTR [ebx+4]
  10586. mov eax, edi
  10587. sub eax, DWORD PTR [ebx]
  10588.  
  10589. ; 1066 : _TRY_BEGIN
  10590. ; 1067 : _Uninitialized_default_fill_n(this->_Mylast, _Newsize - size(),
  10591. ; 1068 : _Alval);
  10592.  
  10593. mov ecx, esi
  10594.  
  10595. ; 1087 : return (this->_Mylast - this->_Myfirst);
  10596.  
  10597. sar eax, 3
  10598.  
  10599. ; 1066 : _TRY_BEGIN
  10600. ; 1067 : _Uninitialized_default_fill_n(this->_Mylast, _Newsize - size(),
  10601. ; 1068 : _Alval);
  10602.  
  10603. sub ecx, eax
  10604. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xutility
  10605.  
  10606. ; 2678 : for (; 0 < _Count; --_Count, ++_Dest)
  10607.  
  10608. je SHORT $LN127@resize
  10609. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10610.  
  10611. ; 1087 : return (this->_Mylast - this->_Myfirst);
  10612.  
  10613. and ecx, 536870911 ; 1fffffffH
  10614. add ecx, ecx
  10615. xor eax, eax
  10616. rep stosd
  10617. $LN127@resize:
  10618. mov ecx, DWORD PTR [ebx+4]
  10619. mov eax, ecx
  10620. sub eax, DWORD PTR [ebx]
  10621. sar eax, 3
  10622.  
  10623. ; 1073 : this->_Mylast += _Newsize - size();
  10624.  
  10625. sub esi, eax
  10626. lea eax, DWORD PTR [ecx+esi*8]
  10627. mov DWORD PTR [ebx+4], eax
  10628. $LN2@resize:
  10629. pop edi
  10630. pop esi
  10631. pop ebx
  10632.  
  10633. ; 1074 : }
  10634. ; 1075 : }
  10635.  
  10636. pop ebp
  10637. ret 4
  10638. ?resize@?$vector@NV?$allocator@N@std@@@std@@QAEXI@Z ENDP ; std::vector<double,std::allocator<double> >::resize
  10639. _TEXT ENDS
  10640. ; Function compile flags: /Ogtp
  10641. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10642. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  10643. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10644. ; COMDAT ?_Tidy@?$vector@NV?$allocator@N@std@@@std@@IAEXXZ
  10645. _TEXT SEGMENT
  10646. ?_Tidy@?$vector@NV?$allocator@N@std@@@std@@IAEXXZ PROC ; std::vector<double,std::allocator<double> >::_Tidy, COMDAT
  10647. ; _this$ = ecx
  10648.  
  10649. ; 1535 : { // free all storage
  10650.  
  10651. push esi
  10652. mov esi, ecx
  10653.  
  10654. ; 1536 : if (this->_Myfirst != pointer())
  10655.  
  10656. mov eax, DWORD PTR [esi]
  10657. test eax, eax
  10658. je SHORT $LN1@Tidy
  10659. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  10660.  
  10661. ; 586 : ::operator delete(_Ptr);
  10662.  
  10663. push eax
  10664. call DWORD PTR __imp_??3@YAXPAX@Z
  10665. add esp, 4
  10666. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10667.  
  10668. ; 1542 : this->_Myfirst = pointer();
  10669.  
  10670. mov DWORD PTR [esi], 0
  10671.  
  10672. ; 1543 : this->_Mylast = pointer();
  10673.  
  10674. mov DWORD PTR [esi+4], 0
  10675.  
  10676. ; 1544 : this->_Myend = pointer();
  10677.  
  10678. mov DWORD PTR [esi+8], 0
  10679. $LN1@Tidy:
  10680. pop esi
  10681.  
  10682. ; 1545 : }
  10683. ; 1546 : }
  10684.  
  10685. ret 0
  10686. ?_Tidy@?$vector@NV?$allocator@N@std@@@std@@IAEXXZ ENDP ; std::vector<double,std::allocator<double> >::_Tidy
  10687. _TEXT ENDS
  10688. ; Function compile flags: /Ogtp
  10689. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory0
  10690. ; COMDAT ??0?$allocator@N@std@@QAE@XZ
  10691. _TEXT SEGMENT
  10692. ??0?$allocator@N@std@@QAE@XZ PROC ; std::allocator<double>::allocator<double>, COMDAT
  10693. ; _this$ = ecx
  10694.  
  10695. ; 566 : { // construct default allocator (do nothing)
  10696. ; 567 : }
  10697.  
  10698. mov eax, ecx
  10699. ret 0
  10700. ??0?$allocator@N@std@@QAE@XZ ENDP ; std::allocator<double>::allocator<double>
  10701. _TEXT ENDS
  10702. ; Function compile flags: /Ogtp
  10703. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\vector
  10704. ; COMDAT ??0?$_Vector_alloc@$0A@U?$_Vec_base_types@NV?$allocator@N@std@@@std@@@std@@QAE@ABV?$allocator@N@1@@Z
  10705. _TEXT SEGMENT
  10706. ___formal$dead$ = 8 ; size = 4
  10707. ??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
  10708. ; _this$ = ecx
  10709.  
  10710. ; 486 : _Myfirst = pointer();
  10711.  
  10712. mov DWORD PTR [ecx], 0
  10713.  
  10714. ; 487 : _Mylast = pointer();
  10715.  
  10716. mov DWORD PTR [ecx+4], 0
  10717.  
  10718. ; 488 : _Myend = pointer();
  10719.  
  10720. mov DWORD PTR [ecx+8], 0
  10721.  
  10722. ; 594 : { // construct allocator from _Al
  10723. ; 595 : }
  10724.  
  10725. mov eax, ecx
  10726. ret 4
  10727. ??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> > >
  10728. _TEXT ENDS
  10729. ; Function compile flags: /Ogtp
  10730. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10731. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10732. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10733. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10734. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10735. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10736. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10737. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10738. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10739. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10740. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  10741. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10742. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  10743. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10744. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  10745. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10746. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10747. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  10748. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10749. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  10750. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10751. ; COMDAT ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z
  10752. _TEXT SEGMENT
  10753. __Ptr$ = 8 ; size = 4
  10754. __Count$ = 12 ; size = 4
  10755. ?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
  10756. ; _this$ = ecx
  10757.  
  10758. ; 1123 : { // assign [_Ptr, _Ptr + _Count)
  10759.  
  10760. push ebp
  10761. mov ebp, esp
  10762. push ebx
  10763.  
  10764. ; 2234 : }
  10765. ; 2235 :
  10766. ; 2236 : bool _Inside(const _Elem *_Ptr)
  10767. ; 2237 : { // test if _Ptr points inside string
  10768. ; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
  10769. ; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
  10770.  
  10771. mov ebx, DWORD PTR __Ptr$[ebp]
  10772. push esi
  10773.  
  10774. ; 1123 : { // assign [_Ptr, _Ptr + _Count)
  10775.  
  10776. mov esi, ecx
  10777.  
  10778. ; 2234 : }
  10779. ; 2235 :
  10780. ; 2236 : bool _Inside(const _Elem *_Ptr)
  10781. ; 2237 : { // test if _Ptr points inside string
  10782. ; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
  10783. ; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
  10784.  
  10785. test ebx, ebx
  10786. je SHORT $LN2@assign
  10787.  
  10788. ; 517 : : this->_Bx._Buf);
  10789.  
  10790. mov ecx, DWORD PTR [esi+20]
  10791. cmp ecx, 16 ; 00000010H
  10792. jb SHORT $LN12@assign
  10793. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10794.  
  10795. ; 88 : reinterpret_cast<const volatile char&>(_Val)))));
  10796.  
  10797. mov eax, DWORD PTR [esi]
  10798. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10799.  
  10800. ; 517 : : this->_Bx._Buf);
  10801.  
  10802. jmp SHORT $LN13@assign
  10803. $LN12@assign:
  10804. mov eax, esi
  10805. $LN13@assign:
  10806.  
  10807. ; 2234 : }
  10808. ; 2235 :
  10809. ; 2236 : bool _Inside(const _Elem *_Ptr)
  10810. ; 2237 : { // test if _Ptr points inside string
  10811. ; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
  10812. ; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
  10813.  
  10814. cmp ebx, eax
  10815. jb SHORT $LN2@assign
  10816.  
  10817. ; 517 : : this->_Bx._Buf);
  10818.  
  10819. cmp ecx, 16 ; 00000010H
  10820. jb SHORT $LN18@assign
  10821. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10822.  
  10823. ; 88 : reinterpret_cast<const volatile char&>(_Val)))));
  10824.  
  10825. mov edx, DWORD PTR [esi]
  10826. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10827.  
  10828. ; 517 : : this->_Bx._Buf);
  10829.  
  10830. jmp SHORT $LN19@assign
  10831. $LN18@assign:
  10832. mov edx, esi
  10833. $LN19@assign:
  10834.  
  10835. ; 2234 : }
  10836. ; 2235 :
  10837. ; 2236 : bool _Inside(const _Elem *_Ptr)
  10838. ; 2237 : { // test if _Ptr points inside string
  10839. ; 2238 : if (_Ptr == 0 || _Ptr < this->_Myptr()
  10840. ; 2239 : || this->_Myptr() + this->_Mysize <= _Ptr)
  10841.  
  10842. mov eax, DWORD PTR [esi+16]
  10843. add eax, edx
  10844. cmp eax, ebx
  10845. jbe SHORT $LN2@assign
  10846.  
  10847. ; 517 : : this->_Bx._Buf);
  10848.  
  10849. cmp ecx, 16 ; 00000010H
  10850. jb SHORT $LN24@assign
  10851. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10852.  
  10853. ; 88 : reinterpret_cast<const volatile char&>(_Val)))));
  10854.  
  10855. mov eax, DWORD PTR [esi]
  10856. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10857.  
  10858. ; 1131 : _Ptr - this->_Myptr(), _Count)); // substring
  10859.  
  10860. push DWORD PTR __Count$[ebp]
  10861. sub ebx, eax
  10862. push ebx
  10863. push esi
  10864. mov ecx, esi
  10865. 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
  10866. pop esi
  10867. pop ebx
  10868.  
  10869. ; 1139 : }
  10870.  
  10871. pop ebp
  10872. ret 8
  10873. $LN24@assign:
  10874.  
  10875. ; 1131 : _Ptr - this->_Myptr(), _Count)); // substring
  10876.  
  10877. push DWORD PTR __Count$[ebp]
  10878.  
  10879. ; 517 : : this->_Bx._Buf);
  10880.  
  10881. mov eax, esi
  10882.  
  10883. ; 1131 : _Ptr - this->_Myptr(), _Count)); // substring
  10884.  
  10885. sub ebx, eax
  10886. push ebx
  10887. push esi
  10888. mov ecx, esi
  10889. 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
  10890. pop esi
  10891. pop ebx
  10892.  
  10893. ; 1139 : }
  10894.  
  10895. pop ebp
  10896. ret 8
  10897. $LN2@assign:
  10898. push edi
  10899.  
  10900. ; 2219 : }
  10901. ; 2220 :
  10902. ; 2221 : bool _Grow(size_type _Newsize,
  10903. ; 2222 : bool _Trim = false)
  10904. ; 2223 : { // ensure buffer is big enough, trim to size if _Trim is true
  10905. ; 2224 : if (max_size() < _Newsize)
  10906.  
  10907. mov edi, DWORD PTR __Count$[ebp]
  10908. cmp edi, -2 ; fffffffeH
  10909. jbe SHORT $LN33@assign
  10910.  
  10911. ; 2240 : return (false); // don't ask
  10912. ; 2241 : else
  10913. ; 2242 : return (true);
  10914. ; 2243 : }
  10915. ; 2244 :
  10916. ; 2245 : static size_type _Pdif(const_iterator _P2,
  10917. ; 2246 : const_iterator _P1)
  10918. ; 2247 : { // compute safe iterator difference
  10919. ; 2248 : return (_STRING_ITER_BASE(_P2) == 0 ? 0 : _P2 - _P1);
  10920. ; 2249 : }
  10921. ; 2250 :
  10922. ; 2251 : void _Tidy(bool _Built = false,
  10923. ; 2252 : size_type _Newsize = 0)
  10924. ; 2253 : { // initialize buffer, deallocating any storage
  10925. ; 2254 : if (!_Built)
  10926. ; 2255 : ;
  10927. ; 2256 : else if (this->_BUF_SIZE <= this->_Myres)
  10928. ; 2257 : { // copy any leftovers to small buffer and deallocate
  10929. ; 2258 : pointer _Ptr = this->_Bx._Ptr;
  10930. ; 2259 : this->_Getal().destroy(&this->_Bx._Ptr);
  10931. ; 2260 : if (0 < _Newsize)
  10932. ; 2261 : _Traits::copy(this->_Bx._Buf,
  10933. ; 2262 : _STD addressof(*_Ptr), _Newsize);
  10934. ; 2263 : this->_Getal().deallocate(_Ptr, this->_Myres + 1);
  10935. ; 2264 : }
  10936. ; 2265 : this->_Myres = this->_BUF_SIZE - 1;
  10937. ; 2266 : _Eos(_Newsize);
  10938. ; 2267 : }
  10939. ; 2268 :
  10940. ; 2269 : __declspec(noreturn) void _Xlen() const
  10941. ; 2270 : { // report a length_error
  10942. ; 2271 : _Xlength_error("string too long");
  10943.  
  10944. push OFFSET ??_C@_0BA@JFNIOLAK@string?5too?5long?$AA@
  10945. call DWORD PTR __imp_?_Xlength_error@std@@YAXPBD@Z
  10946. $LN119@assign:
  10947. $LN33@assign:
  10948.  
  10949. ; 2225 : _Xlen(); // result too long
  10950. ; 2226 : if (this->_Myres < _Newsize)
  10951.  
  10952. mov eax, DWORD PTR [esi+20]
  10953. cmp eax, edi
  10954. jae SHORT $LN32@assign
  10955.  
  10956. ; 2227 : _Copy(_Newsize, this->_Mysize); // reallocate to grow
  10957.  
  10958. push DWORD PTR [esi+16]
  10959. mov ecx, esi
  10960. push edi
  10961. 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
  10962.  
  10963. ; 2232 : _Eos(0); // new size is zero, just null terminate
  10964. ; 2233 : return (0 < _Newsize); // return true only if more work to do
  10965.  
  10966. test edi, edi
  10967.  
  10968. ; 1132 :
  10969. ; 1133 : if (_Grow(_Count))
  10970.  
  10971. je SHORT $LN112@assign
  10972. $LN117@assign:
  10973.  
  10974. ; 517 : : this->_Bx._Buf);
  10975.  
  10976. cmp DWORD PTR [esi+20], 16 ; 00000010H
  10977. jb SHORT $LN96@assign
  10978. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  10979.  
  10980. ; 88 : reinterpret_cast<const volatile char&>(_Val)))));
  10981.  
  10982. mov eax, DWORD PTR [esi]
  10983. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  10984.  
  10985. ; 517 : : this->_Bx._Buf);
  10986.  
  10987. jmp SHORT $LN97@assign
  10988. $LN32@assign:
  10989.  
  10990. ; 2228 : else if (_Trim && _Newsize < this->_BUF_SIZE)
  10991. ; 2229 : _Tidy(true, // copy and deallocate if trimming to small string
  10992. ; 2230 : _Newsize < this->_Mysize ? _Newsize : this->_Mysize);
  10993. ; 2231 : else if (_Newsize == 0)
  10994.  
  10995. test edi, edi
  10996. jne SHORT $LN117@assign
  10997.  
  10998. ; 1140 :
  10999. ; 1141 : _Myt& assign(const _Elem *_Ptr)
  11000. ; 1142 : { // assign [_Ptr, <null>)
  11001. ; 1143 : _DEBUG_POINTER(_Ptr);
  11002. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  11003. ; 1145 : }
  11004. ; 1146 :
  11005. ; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
  11006. ; 1148 : { // assign _Count * _Ch
  11007. ; 1149 : if (_Count == npos)
  11008. ; 1150 : _Xlen(); // result too long
  11009. ; 1151 :
  11010. ; 1152 : if (_Grow(_Count))
  11011. ; 1153 : { // make room and assign new stuff
  11012. ; 1154 : _Chassign(0, _Count, _Ch);
  11013. ; 1155 : _Eos(_Count);
  11014. ; 1156 : }
  11015. ; 1157 : return (*this);
  11016. ; 1158 : }
  11017. ; 1159 :
  11018. ; 1160 : template<class _Iter>
  11019. ; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
  11020. ; 1162 : _Myt&>::type
  11021. ; 1163 : assign(_Iter _First, _Iter _Last)
  11022. ; 1164 : { // assign [First, _Last), input iterators
  11023. ; 1165 : return (replace(begin(), end(), _First, _Last));
  11024. ; 1166 : }
  11025. ; 1167 :
  11026. ; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
  11027. ; 1169 : { // assign [First, _Last), const pointers
  11028. ; 1170 : return (replace(begin(), end(), _First, _Last));
  11029. ; 1171 : }
  11030. ; 1172 :
  11031. ; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
  11032. ; 1174 : { // assign [First, _Last), const_iterators
  11033. ; 1175 : return (replace(begin(), end(), _First, _Last));
  11034. ; 1176 : }
  11035. ; 1177 :
  11036. ; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
  11037. ; 1179 : { // insert _Right at _Off
  11038. ; 1180 : return (insert(_Off, _Right, 0, npos));
  11039. ; 1181 : }
  11040. ; 1182 :
  11041. ; 1183 : _Myt& insert(size_type _Off,
  11042. ; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
  11043. ; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
  11044. ; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  11045. ; 1187 : _Xran(); // _Off or _Roff off end
  11046. ; 1188 : size_type _Num = _Right.size() - _Roff;
  11047. ; 1189 : if (_Num < _Count)
  11048. ; 1190 : _Count = _Num; // trim _Count to size
  11049. ; 1191 : if (npos - this->_Mysize <= _Count)
  11050. ; 1192 : _Xlen(); // result too long
  11051. ; 1193 :
  11052. ; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  11053. ; 1195 : { // make room and insert new stuff
  11054. ; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
  11055. ; 1197 : this->_Myptr() + _Off,
  11056. ; 1198 : this->_Mysize - _Off); // empty out hole
  11057. ; 1199 : if (this == &_Right)
  11058. ; 1200 : _Traits::move(this->_Myptr() + _Off,
  11059. ; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
  11060. ; 1202 : _Count); // substring
  11061. ; 1203 : else
  11062. ; 1204 : _Traits::copy(this->_Myptr() + _Off,
  11063. ; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
  11064. ; 1206 : _Eos(_Num);
  11065. ; 1207 : }
  11066. ; 1208 : return (*this);
  11067. ; 1209 : }
  11068. ; 1210 :
  11069. ; 1211 : _Myt& insert(size_type _Off,
  11070. ; 1212 : const _Elem *_Ptr, size_type _Count)
  11071. ; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
  11072. ; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
  11073. ; 1215 : if (_Count != 0)
  11074. ; 1216 : _DEBUG_POINTER(_Ptr);
  11075. ; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11076. ; 1218 :
  11077. ; 1219 : if (_Inside(_Ptr))
  11078. ; 1220 : return (insert(_Off, *this,
  11079. ; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
  11080. ; 1222 : if (this->_Mysize < _Off)
  11081. ; 1223 : _Xran(); // _Off off end
  11082. ; 1224 : if (npos - this->_Mysize <= _Count)
  11083. ; 1225 : _Xlen(); // result too long
  11084. ; 1226 : size_type _Num;
  11085. ; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  11086. ; 1228 : { // make room and insert new stuff
  11087. ; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
  11088. ; 1230 : this->_Myptr() + _Off,
  11089. ; 1231 : this->_Mysize - _Off); // empty out hole
  11090. ; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  11091. ; 1233 : _Eos(_Num);
  11092. ; 1234 : }
  11093. ; 1235 : return (*this);
  11094. ; 1236 : }
  11095. ; 1237 :
  11096. ; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
  11097. ; 1239 : { // insert [_Ptr, <null>) at _Off
  11098. ; 1240 : _DEBUG_POINTER(_Ptr);
  11099. ; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
  11100. ; 1242 : }
  11101. ; 1243 :
  11102. ; 1244 : _Myt& insert(size_type _Off,
  11103. ; 1245 : size_type _Count, _Elem _Ch)
  11104. ; 1246 : { // insert _Count * _Ch at _Off
  11105. ; 1247 : if (this->_Mysize < _Off)
  11106. ; 1248 : _Xran(); // _Off off end
  11107. ; 1249 : if (npos - this->_Mysize <= _Count)
  11108. ; 1250 : _Xlen(); // result too long
  11109. ; 1251 : size_type _Num;
  11110. ; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  11111. ; 1253 : { // make room and insert new stuff
  11112. ; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
  11113. ; 1255 : this->_Myptr() + _Off,
  11114. ; 1256 : this->_Mysize - _Off); // empty out hole
  11115. ; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
  11116. ; 1258 : _Eos(_Num);
  11117. ; 1259 : }
  11118. ; 1260 : return (*this);
  11119. ; 1261 : }
  11120. ; 1262 :
  11121. ; 1263 : iterator insert(const_iterator _Where)
  11122. ; 1264 : { // insert <null> at _Where
  11123. ; 1265 : return (insert(_Where, _Elem()));
  11124. ; 1266 : }
  11125. ; 1267 :
  11126. ; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
  11127. ; 1269 : { // insert _Ch at _Where
  11128. ; 1270 : size_type _Off = _Pdif(_Where, begin());
  11129. ; 1271 : insert(_Off, 1, _Ch);
  11130. ; 1272 : return (begin() + _Off);
  11131. ; 1273 : }
  11132. ; 1274 :
  11133. ; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
  11134. ; 1276 : { // insert _Count * _Elem at _Where
  11135. ; 1277 : size_type _Off = _Pdif(_Where, begin());
  11136. ; 1278 : insert(_Off, _Count, _Ch);
  11137. ; 1279 : return (begin() + _Off);
  11138. ; 1280 : }
  11139. ; 1281 :
  11140. ; 1282 : template<class _Iter>
  11141. ; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
  11142. ; 1284 : iterator>::type
  11143. ; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  11144. ; 1286 : { // insert [_First, _Last) at _Where, input iterators
  11145. ; 1287 : size_type _Off = _Pdif(_Where, begin());
  11146. ; 1288 : replace(_Where, _Where, _First, _Last);
  11147. ; 1289 : return (begin() + _Off);
  11148. ; 1290 : }
  11149. ; 1291 :
  11150. ; 1292 : iterator insert(const_iterator _Where,
  11151. ; 1293 : const_pointer _First, const_pointer _Last)
  11152. ; 1294 : { // insert [_First, _Last) at _Where, const pointers
  11153. ; 1295 : size_type _Off = _Pdif(_Where, begin());
  11154. ; 1296 : replace(_Where, _Where, _First, _Last);
  11155. ; 1297 : return (begin() + _Off);
  11156. ; 1298 : }
  11157. ; 1299 :
  11158. ; 1300 : iterator insert(const_iterator _Where,
  11159. ; 1301 : const_iterator _First, const_iterator _Last)
  11160. ; 1302 : { // insert [_First, _Last) at _Where, const_iterators
  11161. ; 1303 : size_type _Off = _Pdif(_Where, begin());
  11162. ; 1304 : replace(_Where, _Where, _First, _Last);
  11163. ; 1305 : return (begin() + _Off);
  11164. ; 1306 : }
  11165. ; 1307 :
  11166. ; 1308 : _Myt& erase(size_type _Off = 0)
  11167. ; 1309 : { // erase elements [_Off, ...)
  11168. ; 1310 : if (this->_Mysize < _Off)
  11169. ; 1311 : _Xran(); // _Off off end
  11170. ; 1312 : _Eos(_Off);
  11171. ; 1313 : return (*this);
  11172. ; 1314 : }
  11173. ; 1315 :
  11174. ; 1316 : _Myt& erase(size_type _Off, size_type _Count)
  11175. ; 1317 : { // erase elements [_Off, _Off + _Count)
  11176. ; 1318 : if (this->_Mysize < _Off)
  11177. ; 1319 : _Xran(); // _Off off end
  11178. ; 1320 : if (this->_Mysize - _Off <= _Count)
  11179. ; 1321 : _Eos(_Off); // erase elements [_Off, ...)
  11180. ; 1322 : else if (0 < _Count)
  11181. ; 1323 : { // move elements down
  11182. ; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
  11183. ; 1325 : size_type _Newsize = this->_Mysize - _Count;
  11184. ; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
  11185. ; 1327 : _Eos(_Newsize);
  11186. ; 1328 : }
  11187. ; 1329 : return (*this);
  11188. ; 1330 : }
  11189. ; 1331 :
  11190. ; 1332 : iterator erase(const_iterator _Where)
  11191. ; 1333 : { // erase element at _Where
  11192. ; 1334 : size_type _Count = _Pdif(_Where, begin());
  11193. ; 1335 : erase(_Count, 1);
  11194. ; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  11195. ; 1337 : }
  11196. ; 1338 :
  11197. ; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
  11198. ; 1340 : { // erase substring [_First, _Last)
  11199. ; 1341 : _DEBUG_RANGE(_First, _Last);
  11200. ; 1342 : size_type _Count = _Pdif(_First, begin());
  11201. ; 1343 : erase(_Count, _Pdif(_Last, _First));
  11202. ; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  11203. ; 1345 : }
  11204. ; 1346 :
  11205. ; 1347 : void clear() _NOEXCEPT
  11206. ; 1348 : { // erase all
  11207. ; 1349 : _Eos(0);
  11208. ; 1350 : }
  11209. ; 1351 :
  11210. ; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
  11211. ; 1353 : { // replace [_Off, _Off + _N0) with _Right
  11212. ; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
  11213. ; 1355 : }
  11214. ; 1356 :
  11215. ; 1357 : _Myt& replace(size_type _Off,
  11216. ; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
  11217. ; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  11218. ; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  11219. ; 1361 : _Xran(); // _Off or _Roff off end
  11220. ; 1362 : if (this->_Mysize - _Off < _N0)
  11221. ; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  11222. ; 1364 : size_type _Num = _Right.size() - _Roff;
  11223. ; 1365 : if (_Num < _Count)
  11224. ; 1366 : _Count = _Num; // trim _Count to size
  11225. ; 1367 : if (npos - _Count <= this->_Mysize - _N0)
  11226. ; 1368 : _Xlen(); // result too long
  11227. ; 1369 :
  11228. ; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
  11229. ; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
  11230. ; 1372 : if (this->_Mysize < _Newsize)
  11231. ; 1373 : _Grow(_Newsize);
  11232. ; 1374 :
  11233. ; 1375 : if (this != &_Right)
  11234. ; 1376 : { // no overlap, just move down and copy in new stuff
  11235. ; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
  11236. ; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
  11237. ; 1379 : _Traits::copy(this->_Myptr() + _Off,
  11238. ; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
  11239. ; 1381 : }
  11240. ; 1382 : else if (_Count <= _N0)
  11241. ; 1383 : { // hole doesn't get larger, just copy in substring
  11242. ; 1384 : _Traits::move(this->_Myptr() + _Off,
  11243. ; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
  11244. ; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
  11245. ; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  11246. ; 1388 : }
  11247. ; 1389 : else if (_Roff <= _Off)
  11248. ; 1390 : { // hole gets larger, substring begins before hole
  11249. ; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
  11250. ; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  11251. ; 1393 : _Traits::move(this->_Myptr() + _Off,
  11252. ; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
  11253. ; 1395 : }
  11254. ; 1396 : else if (_Off + _N0 <= _Roff)
  11255. ; 1397 : { // hole gets larger, substring begins after hole
  11256. ; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
  11257. ; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  11258. ; 1400 : _Traits::move(this->_Myptr() + _Off,
  11259. ; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
  11260. ; 1402 : _Count); // fill hole
  11261. ; 1403 : }
  11262. ; 1404 : else
  11263. ; 1405 : { // hole gets larger, substring begins in hole
  11264. ; 1406 : _Traits::move(this->_Myptr() + _Off,
  11265. ; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
  11266. ; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
  11267. ; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  11268. ; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
  11269. ; 1411 : this->_Myptr() + _Roff + _Count,
  11270. ; 1412 : _Count - _N0); // fill rest of new hole
  11271. ; 1413 : }
  11272. ; 1414 :
  11273. ; 1415 : _Eos(_Newsize);
  11274. ; 1416 : return (*this);
  11275. ; 1417 : }
  11276. ; 1418 :
  11277. ; 1419 : _Myt& replace(size_type _Off,
  11278. ; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
  11279. ; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  11280. ; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
  11281. ; 1423 : if (_Count != 0)
  11282. ; 1424 : _DEBUG_POINTER(_Ptr);
  11283. ; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11284. ; 1426 :
  11285. ; 1427 : if (_Inside(_Ptr))
  11286. ; 1428 : return (replace(_Off, _N0, *this,
  11287. ; 1429 : _Ptr - this->_Myptr(),
  11288. ; 1430 : _Count)); // substring, replace carefully
  11289. ; 1431 : if (this->_Mysize < _Off)
  11290. ; 1432 : _Xran(); // _Off off end
  11291. ; 1433 : if (this->_Mysize - _Off < _N0)
  11292. ; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  11293. ; 1435 : if (npos - _Count <= this->_Mysize - _N0)
  11294. ; 1436 : _Xlen(); // result too long
  11295. ; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
  11296. ; 1438 :
  11297. ; 1439 : if (_Count < _N0)
  11298. ; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
  11299. ; 1441 : this->_Myptr() + _Off + _N0,
  11300. ; 1442 : _Nm); // smaller hole, move tail up
  11301. ; 1443 : size_type _Num;
  11302. ; 1444 : if ((0 < _Count || 0 < _N0)
  11303. ; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  11304. ; 1446 : { // make room and rearrange
  11305. ; 1447 : if (_N0 < _Count)
  11306. ; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
  11307. ; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  11308. ; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  11309. ; 1451 : _Eos(_Num);
  11310. ; 1452 : }
  11311. ; 1453 : return (*this);
  11312. ; 1454 : }
  11313. ; 1455 :
  11314. ; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
  11315. ; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
  11316. ; 1458 : _DEBUG_POINTER(_Ptr);
  11317. ; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  11318. ; 1460 : }
  11319. ; 1461 :
  11320. ; 1462 : _Myt& replace(size_type _Off,
  11321. ; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
  11322. ; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
  11323. ; 1465 : if (this->_Mysize < _Off)
  11324. ; 1466 : _Xran(); // _Off off end
  11325. ; 1467 : if (this->_Mysize - _Off < _N0)
  11326. ; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  11327. ; 1469 : if (npos - _Count <= this->_Mysize - _N0)
  11328. ; 1470 : _Xlen(); // result too long
  11329. ; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
  11330. ; 1472 :
  11331. ; 1473 : if (_Count < _N0)
  11332. ; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
  11333. ; 1475 : this->_Myptr() + _Off + _N0,
  11334. ; 1476 : _Nm); // smaller hole, move tail up
  11335. ; 1477 : size_type _Num;
  11336. ; 1478 : if ((0 < _Count || 0 < _N0)
  11337. ; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  11338. ; 1480 : { // make room and rearrange
  11339. ; 1481 : if (_N0 < _Count)
  11340. ; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
  11341. ; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  11342. ; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
  11343. ; 1485 : _Eos(_Num);
  11344. ; 1486 : }
  11345. ; 1487 : return (*this);
  11346. ; 1488 : }
  11347. ; 1489 :
  11348. ; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
  11349. ; 1491 : const _Myt& _Right)
  11350. ; 1492 : { // replace [_First, _Last) with _Right
  11351. ; 1493 : return (replace(
  11352. ; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
  11353. ; 1495 : }
  11354. ; 1496 :
  11355. ; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
  11356. ; 1498 : const _Elem *_Ptr, size_type _Count)
  11357. ; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
  11358. ; 1500 : return (replace(
  11359. ; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
  11360. ; 1502 : }
  11361. ; 1503 :
  11362. ; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
  11363. ; 1505 : const _Elem *_Ptr)
  11364. ; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
  11365. ; 1507 : return (replace(
  11366. ; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
  11367. ; 1509 : }
  11368. ; 1510 :
  11369. ; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
  11370. ; 1512 : size_type _Count, _Elem _Ch)
  11371. ; 1513 : { // replace [_First, _Last) with _Count * _Ch
  11372. ; 1514 : return (replace(
  11373. ; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
  11374. ; 1516 : }
  11375. ; 1517 :
  11376. ; 1518 : template<class _Iter>
  11377. ; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
  11378. ; 1520 : _Myt&>::type
  11379. ; 1521 : replace(const_iterator _First, const_iterator _Last,
  11380. ; 1522 : _Iter _First2, _Iter _Last2)
  11381. ; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
  11382. ; 1524 : _Myt _Right(_First2, _Last2);
  11383. ; 1525 : replace(_First, _Last, _Right);
  11384. ; 1526 : return (*this);
  11385. ; 1527 : }
  11386. ; 1528 :
  11387. ; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
  11388. ; 1530 : const_pointer _First2, const_pointer _Last2)
  11389. ; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  11390. ; 1532 : if (_First2 == _Last2)
  11391. ; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  11392. ; 1534 : else
  11393. ; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  11394. ; 1536 : &*_First2, _Last2 - _First2);
  11395. ; 1537 : return (*this);
  11396. ; 1538 : }
  11397. ; 1539 :
  11398. ; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
  11399. ; 1541 : pointer _First2, pointer _Last2)
  11400. ; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  11401. ; 1543 : if (_First2 == _Last2)
  11402. ; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  11403. ; 1545 : else
  11404. ; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  11405. ; 1547 : &*_First2, _Last2 - _First2);
  11406. ; 1548 : return (*this);
  11407. ; 1549 : }
  11408. ; 1550 :
  11409. ; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
  11410. ; 1552 : const_iterator _First2, const_iterator _Last2)
  11411. ; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  11412. ; 1554 : if (_First2 == _Last2)
  11413. ; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  11414. ; 1556 : else
  11415. ; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  11416. ; 1558 : &*_First2, _Last2 - _First2);
  11417. ; 1559 : return (*this);
  11418. ; 1560 : }
  11419. ; 1561 :
  11420. ; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
  11421. ; 1563 : iterator _First2, iterator _Last2)
  11422. ; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  11423. ; 1565 : if (_First2 == _Last2)
  11424. ; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  11425. ; 1567 : else
  11426. ; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  11427. ; 1569 : &*_First2, _Last2 - _First2);
  11428. ; 1570 : return (*this);
  11429. ; 1571 : }
  11430. ; 1572 :
  11431. ; 1573 : iterator begin() _NOEXCEPT
  11432. ; 1574 : { // return iterator for beginning of mutable sequence
  11433. ; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
  11434. ; 1576 : }
  11435. ; 1577 :
  11436. ; 1578 : const_iterator begin() const _NOEXCEPT
  11437. ; 1579 : { // return iterator for beginning of nonmutable sequence
  11438. ; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
  11439. ; 1581 : }
  11440. ; 1582 :
  11441. ; 1583 : iterator end() _NOEXCEPT
  11442. ; 1584 : { // return iterator for end of mutable sequence
  11443. ; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
  11444. ; 1586 : }
  11445. ; 1587 :
  11446. ; 1588 : const_iterator end() const _NOEXCEPT
  11447. ; 1589 : { // return iterator for end of nonmutable sequence
  11448. ; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
  11449. ; 1591 : }
  11450. ; 1592 :
  11451. ; 1593 : reverse_iterator rbegin() _NOEXCEPT
  11452. ; 1594 : { // return iterator for beginning of reversed mutable sequence
  11453. ; 1595 : return (reverse_iterator(end()));
  11454. ; 1596 : }
  11455. ; 1597 :
  11456. ; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
  11457. ; 1599 : { // return iterator for beginning of reversed nonmutable sequence
  11458. ; 1600 : return (const_reverse_iterator(end()));
  11459. ; 1601 : }
  11460. ; 1602 :
  11461. ; 1603 : reverse_iterator rend() _NOEXCEPT
  11462. ; 1604 : { // return iterator for end of reversed mutable sequence
  11463. ; 1605 : return (reverse_iterator(begin()));
  11464. ; 1606 : }
  11465. ; 1607 :
  11466. ; 1608 : const_reverse_iterator rend() const _NOEXCEPT
  11467. ; 1609 : { // return iterator for end of reversed nonmutable sequence
  11468. ; 1610 : return (const_reverse_iterator(begin()));
  11469. ; 1611 : }
  11470. ; 1612 :
  11471. ; 1613 : #if _HAS_CPP0X
  11472. ; 1614 : const_iterator cbegin() const _NOEXCEPT
  11473. ; 1615 : { // return iterator for beginning of nonmutable sequence
  11474. ; 1616 : return (((const _Myt *)this)->begin());
  11475. ; 1617 : }
  11476. ; 1618 :
  11477. ; 1619 : const_iterator cend() const _NOEXCEPT
  11478. ; 1620 : { // return iterator for end of nonmutable sequence
  11479. ; 1621 : return (((const _Myt *)this)->end());
  11480. ; 1622 : }
  11481. ; 1623 :
  11482. ; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
  11483. ; 1625 : { // return iterator for beginning of reversed nonmutable sequence
  11484. ; 1626 : return (((const _Myt *)this)->rbegin());
  11485. ; 1627 : }
  11486. ; 1628 :
  11487. ; 1629 : const_reverse_iterator crend() const _NOEXCEPT
  11488. ; 1630 : { // return iterator for end of reversed nonmutable sequence
  11489. ; 1631 : return (((const _Myt *)this)->rend());
  11490. ; 1632 : }
  11491. ; 1633 :
  11492. ; 1634 : void shrink_to_fit()
  11493. ; 1635 : { // reduce capacity
  11494. ; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
  11495. ; 1637 : { // worth shrinking, do it
  11496. ; 1638 : _Myt _Tmp(*this);
  11497. ; 1639 : swap(_Tmp);
  11498. ; 1640 : }
  11499. ; 1641 : }
  11500. ; 1642 : #endif /* _HAS_CPP0X */
  11501. ; 1643 :
  11502. ; 1644 : reference at(size_type _Off)
  11503. ; 1645 : { // subscript mutable sequence with checking
  11504. ; 1646 : if (this->_Mysize <= _Off)
  11505. ; 1647 : _Xran(); // _Off off end
  11506. ; 1648 : return (this->_Myptr()[_Off]);
  11507. ; 1649 : }
  11508. ; 1650 :
  11509. ; 1651 : const_reference at(size_type _Off) const
  11510. ; 1652 : { // subscript nonmutable sequence with checking
  11511. ; 1653 : if (this->_Mysize <= _Off)
  11512. ; 1654 : _Xran(); // _Off off end
  11513. ; 1655 : return (this->_Myptr()[_Off]);
  11514. ; 1656 : }
  11515. ; 1657 :
  11516. ; 1658 : reference operator[](size_type _Off)
  11517. ; 1659 : { // subscript mutable sequence
  11518. ; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
  11519. ; 1661 : if (this->_Mysize < _Off) // sic
  11520. ; 1662 : _DEBUG_ERROR("string subscript out of range");
  11521. ; 1663 :
  11522. ; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
  11523. ; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  11524. ; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11525. ; 1667 :
  11526. ; 1668 : return (this->_Myptr()[_Off]);
  11527. ; 1669 : }
  11528. ; 1670 :
  11529. ; 1671 : const_reference operator[](size_type _Off) const
  11530. ; 1672 : { // subscript nonmutable sequence
  11531. ; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
  11532. ; 1674 : if (this->_Mysize < _Off) // sic
  11533. ; 1675 : _DEBUG_ERROR("string subscript out of range");
  11534. ; 1676 :
  11535. ; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
  11536. ; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  11537. ; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11538. ; 1680 :
  11539. ; 1681 : return (this->_Myptr()[_Off]);
  11540. ; 1682 : }
  11541. ; 1683 :
  11542. ; 1684 : void push_back(_Elem _Ch)
  11543. ; 1685 : { // insert element at end
  11544. ; 1686 : insert(end(), _Ch);
  11545. ; 1687 : }
  11546. ; 1688 :
  11547. ; 1689 : #if _HAS_CPP0X
  11548. ; 1690 : void pop_back()
  11549. ; 1691 : { // erase element at end
  11550. ; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
  11551. ; 1693 : }
  11552. ; 1694 :
  11553. ; 1695 : reference front()
  11554. ; 1696 : { // return first element of mutable sequence
  11555. ; 1697 : return (*begin());
  11556. ; 1698 : }
  11557. ; 1699 :
  11558. ; 1700 : const_reference front() const
  11559. ; 1701 : { // return first element of nonmutable sequence
  11560. ; 1702 : return (*begin());
  11561. ; 1703 : }
  11562. ; 1704 :
  11563. ; 1705 : reference back()
  11564. ; 1706 : { // return last element of mutable sequence
  11565. ; 1707 : return (*(end() - 1));
  11566. ; 1708 : }
  11567. ; 1709 :
  11568. ; 1710 : const_reference back() const
  11569. ; 1711 : { // return last element of nonmutable sequence
  11570. ; 1712 : return (*(end() - 1));
  11571. ; 1713 : }
  11572. ; 1714 : #endif /* _HAS_CPP0X */
  11573. ; 1715 :
  11574. ; 1716 : const _Elem *c_str() const _NOEXCEPT
  11575. ; 1717 : { // return pointer to null-terminated nonmutable array
  11576. ; 1718 : return (this->_Myptr());
  11577. ; 1719 : }
  11578. ; 1720 :
  11579. ; 1721 : const _Elem *data() const _NOEXCEPT
  11580. ; 1722 : { // return pointer to nonmutable array
  11581. ; 1723 : return (c_str());
  11582. ; 1724 : }
  11583. ; 1725 :
  11584. ; 1726 : size_type length() const _NOEXCEPT
  11585. ; 1727 : { // return length of sequence
  11586. ; 1728 : return (this->_Mysize);
  11587. ; 1729 : }
  11588. ; 1730 :
  11589. ; 1731 : size_type size() const _NOEXCEPT
  11590. ; 1732 : { // return length of sequence
  11591. ; 1733 : return (this->_Mysize);
  11592. ; 1734 : }
  11593. ; 1735 :
  11594. ; 1736 : size_type max_size() const _NOEXCEPT
  11595. ; 1737 : { // return maximum possible length of sequence
  11596. ; 1738 : size_type _Num = this->_Getal().max_size();
  11597. ; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
  11598. ; 1740 : }
  11599. ; 1741 :
  11600. ; 1742 : void resize(size_type _Newsize)
  11601. ; 1743 : { // determine new length, padding with null elements as needed
  11602. ; 1744 : resize(_Newsize, _Elem());
  11603. ; 1745 : }
  11604. ; 1746 :
  11605. ; 1747 : void resize(size_type _Newsize, _Elem _Ch)
  11606. ; 1748 : { // determine new length, padding with _Ch elements as needed
  11607. ; 1749 : if (_Newsize <= this->_Mysize)
  11608. ; 1750 : _Eos(_Newsize);
  11609. ; 1751 : else
  11610. ; 1752 : append(_Newsize - this->_Mysize, _Ch);
  11611. ; 1753 : }
  11612. ; 1754 :
  11613. ; 1755 : size_type capacity() const _NOEXCEPT
  11614. ; 1756 : { // return current length of allocated storage
  11615. ; 1757 : return (this->_Myres);
  11616. ; 1758 : }
  11617. ; 1759 :
  11618. ; 1760 : void reserve(size_type _Newcap = 0)
  11619. ; 1761 : { // determine new minimum length of allocated storage
  11620. ; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
  11621. ; 1763 : { // change reservation
  11622. ; 1764 : size_type _Size = this->_Mysize;
  11623. ; 1765 : if (_Grow(_Newcap, true))
  11624. ; 1766 : _Eos(_Size);
  11625. ; 1767 : }
  11626. ; 1768 : }
  11627. ; 1769 :
  11628. ; 1770 : bool empty() const _NOEXCEPT
  11629. ; 1771 : { // test if sequence is empty
  11630. ; 1772 : return (this->_Mysize == 0);
  11631. ; 1773 : }
  11632. ; 1774 :
  11633. ; 1775 : _SCL_INSECURE_DEPRECATE
  11634. ; 1776 :
  11635. ; 1777 : size_type copy(_Elem *_Ptr,
  11636. ; 1778 : size_type _Count, size_type _Off = 0) const
  11637. ; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
  11638. ; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
  11639. ; 1781 : if (_Count != 0)
  11640. ; 1782 : _DEBUG_POINTER(_Ptr);
  11641. ; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11642. ; 1784 :
  11643. ; 1785 : if (this->_Mysize < _Off)
  11644. ; 1786 : _Xran(); // _Off off end
  11645. ; 1787 : if (this->_Mysize - _Off < _Count)
  11646. ; 1788 : _Count = this->_Mysize - _Off;
  11647. ; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
  11648. ; 1790 : return (_Count);
  11649. ; 1791 : }
  11650. ; 1792 :
  11651. ; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
  11652. ; 1794 : size_type _Count, size_type _Off = 0) const
  11653. ; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
  11654. ; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
  11655. ; 1797 : if (_Count != 0)
  11656. ; 1798 : _DEBUG_POINTER(_Dest);
  11657. ; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11658. ; 1800 :
  11659. ; 1801 : if (this->_Mysize < _Off)
  11660. ; 1802 : _Xran(); // _Off off end
  11661. ; 1803 : if (this->_Mysize - _Off < _Count)
  11662. ; 1804 : _Count = this->_Mysize - _Off;
  11663. ; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
  11664. ; 1806 : return (_Count);
  11665. ; 1807 : }
  11666. ; 1808 :
  11667. ; 1809 : void _Swap_bx(_Myt& _Right)
  11668. ; 1810 : { // exchange _Bx with _Right._Bx
  11669. ; 1811 : if (this->_BUF_SIZE <= this->_Myres)
  11670. ; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
  11671. ; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
  11672. ; 1814 : else
  11673. ; 1815 : { // swap large with small
  11674. ; 1816 : pointer _Ptr = this->_Bx._Ptr;
  11675. ; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
  11676. ; 1818 : _Traits::copy(this->_Bx._Buf,
  11677. ; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
  11678. ; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
  11679. ; 1821 : }
  11680. ; 1822 : else
  11681. ; 1823 : if (_Right._Myres < this->_BUF_SIZE)
  11682. ; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
  11683. ; 1825 : else
  11684. ; 1826 : { // swap small with large
  11685. ; 1827 : pointer _Ptr = _Right._Bx._Ptr;
  11686. ; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
  11687. ; 1829 : _Traits::copy(_Right._Bx._Buf,
  11688. ; 1830 : this->_Bx._Buf, this->_Mysize + 1);
  11689. ; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  11690. ; 1832 : }
  11691. ; 1833 : }
  11692. ; 1834 :
  11693. ; 1835 : void swap(_Myt& _Right)
  11694. ; 1836 : { // exchange contents with _Right
  11695. ; 1837 : if (this == &_Right)
  11696. ; 1838 : ; // same object, do nothing
  11697. ; 1839 : else if (this->_Getal() == _Right._Getal())
  11698. ; 1840 : { // same allocator, swap control information
  11699. ; 1841 : this->_Swap_all(_Right);
  11700. ; 1842 : _Swap_bx(_Right);
  11701. ; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
  11702. ; 1844 : _STD swap(this->_Myres, _Right._Myres);
  11703. ; 1845 : }
  11704. ; 1846 :
  11705. ; 1847 : #if _HAS_CPP0X
  11706. ; 1848 : else if (_Alty::propagate_on_container_swap::value)
  11707. ; 1849 : { // swap allocators and control information
  11708. ; 1850 : this->_Swap_alloc(_Right);
  11709. ; 1851 : _Swap_bx(_Right);
  11710. ; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
  11711. ; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
  11712. ; 1854 : _STD swap(this->_Myres, _Right._Myres);
  11713. ; 1855 : }
  11714. ; 1856 : #endif /* _HAS_CPP0X */
  11715. ; 1857 :
  11716. ; 1858 : else
  11717. ; 1859 : { // different allocator, do multiple assigns
  11718. ; 1860 : _Myt _Tmp = *this;
  11719. ; 1861 :
  11720. ; 1862 : *this = _Right;
  11721. ; 1863 : _Right = _Tmp;
  11722. ; 1864 : }
  11723. ; 1865 : }
  11724. ; 1866 :
  11725. ; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
  11726. ; 1868 : { // look for _Right beginning at or after _Off
  11727. ; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
  11728. ; 1870 : }
  11729. ; 1871 :
  11730. ; 1872 : size_type find(const _Elem *_Ptr,
  11731. ; 1873 : size_type _Off, size_type _Count) const
  11732. ; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
  11733. ; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
  11734. ; 1876 : if (_Count != 0)
  11735. ; 1877 : _DEBUG_POINTER(_Ptr);
  11736. ; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11737. ; 1879 :
  11738. ; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
  11739. ; 1881 : return (_Off); // null string always matches (if inside string)
  11740. ; 1882 :
  11741. ; 1883 : size_type _Nm;
  11742. ; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
  11743. ; 1885 : { // room for match, look for it
  11744. ; 1886 : const _Elem *_Uptr, *_Vptr;
  11745. ; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
  11746. ; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
  11747. ; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
  11748. ; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
  11749. ; 1891 : return (_Uptr - this->_Myptr()); // found a match
  11750. ; 1892 : }
  11751. ; 1893 :
  11752. ; 1894 : return (npos); // no match
  11753. ; 1895 : }
  11754. ; 1896 :
  11755. ; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
  11756. ; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
  11757. ; 1899 : _DEBUG_POINTER(_Ptr);
  11758. ; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
  11759. ; 1901 : }
  11760. ; 1902 :
  11761. ; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
  11762. ; 1904 : { // look for _Ch at or after _Off
  11763. ; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
  11764. ; 1906 : }
  11765. ; 1907 :
  11766. ; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
  11767. ; 1909 : { // look for _Right beginning before _Off
  11768. ; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
  11769. ; 1911 : }
  11770. ; 1912 :
  11771. ; 1913 : size_type rfind(const _Elem *_Ptr,
  11772. ; 1914 : size_type _Off, size_type _Count) const
  11773. ; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
  11774. ; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
  11775. ; 1917 : if (_Count != 0)
  11776. ; 1918 : _DEBUG_POINTER(_Ptr);
  11777. ; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11778. ; 1920 :
  11779. ; 1921 : if (_Count == 0)
  11780. ; 1922 : return (_Off < this->_Mysize ? _Off
  11781. ; 1923 : : this->_Mysize); // null always matches
  11782. ; 1924 : if (_Count <= this->_Mysize)
  11783. ; 1925 : { // room for match, look for it
  11784. ; 1926 : const _Elem *_Uptr = this->_Myptr() +
  11785. ; 1927 : (_Off < this->_Mysize - _Count ? _Off
  11786. ; 1928 : : this->_Mysize - _Count);
  11787. ; 1929 : for (; ; --_Uptr)
  11788. ; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
  11789. ; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
  11790. ; 1932 : return (_Uptr - this->_Myptr()); // found a match
  11791. ; 1933 : else if (_Uptr == this->_Myptr())
  11792. ; 1934 : break; // at beginning, no more chance for match
  11793. ; 1935 : }
  11794. ; 1936 :
  11795. ; 1937 : return (npos); // no match
  11796. ; 1938 : }
  11797. ; 1939 :
  11798. ; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
  11799. ; 1941 : { // look for [_Ptr, <null>) beginning before _Off
  11800. ; 1942 : _DEBUG_POINTER(_Ptr);
  11801. ; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
  11802. ; 1944 : }
  11803. ; 1945 :
  11804. ; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
  11805. ; 1947 : { // look for _Ch before _Off
  11806. ; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  11807. ; 1949 : }
  11808. ; 1950 :
  11809. ; 1951 : size_type find_first_of(const _Myt& _Right,
  11810. ; 1952 : size_type _Off = 0) const _NOEXCEPT
  11811. ; 1953 : { // look for one of _Right at or after _Off
  11812. ; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
  11813. ; 1955 : }
  11814. ; 1956 :
  11815. ; 1957 : size_type find_first_of(const _Elem *_Ptr,
  11816. ; 1958 : size_type _Off, size_type _Count) const
  11817. ; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
  11818. ; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
  11819. ; 1961 : if (_Count != 0)
  11820. ; 1962 : _DEBUG_POINTER(_Ptr);
  11821. ; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11822. ; 1964 :
  11823. ; 1965 : if (0 < _Count && _Off < this->_Mysize)
  11824. ; 1966 : { // room for match, look for it
  11825. ; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  11826. ; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  11827. ; 1969 : _Uptr < _Vptr; ++_Uptr)
  11828. ; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  11829. ; 1971 : return (_Uptr - this->_Myptr()); // found a match
  11830. ; 1972 : }
  11831. ; 1973 :
  11832. ; 1974 : return (npos); // no match
  11833. ; 1975 : }
  11834. ; 1976 :
  11835. ; 1977 : size_type find_first_of(const _Elem *_Ptr,
  11836. ; 1978 : size_type _Off = 0) const
  11837. ; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
  11838. ; 1980 : _DEBUG_POINTER(_Ptr);
  11839. ; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
  11840. ; 1982 : }
  11841. ; 1983 :
  11842. ; 1984 : size_type find_first_of(_Elem _Ch,
  11843. ; 1985 : size_type _Off = 0) const
  11844. ; 1986 : { // look for _Ch at or after _Off
  11845. ; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
  11846. ; 1988 : }
  11847. ; 1989 :
  11848. ; 1990 : size_type find_last_of(const _Myt& _Right,
  11849. ; 1991 : size_type _Off = npos) const _NOEXCEPT
  11850. ; 1992 : { // look for one of _Right before _Off
  11851. ; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
  11852. ; 1994 : }
  11853. ; 1995 :
  11854. ; 1996 : size_type find_last_of(const _Elem *_Ptr,
  11855. ; 1997 : size_type _Off, size_type _Count) const
  11856. ; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
  11857. ; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
  11858. ; 2000 : if (_Count != 0)
  11859. ; 2001 : _DEBUG_POINTER(_Ptr);
  11860. ; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11861. ; 2003 :
  11862. ; 2004 : if (0 < _Count && 0 < this->_Mysize)
  11863. ; 2005 : { // worth searching, do it
  11864. ; 2006 : const _Elem *_Uptr = this->_Myptr()
  11865. ; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  11866. ; 2008 : for (; ; --_Uptr)
  11867. ; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  11868. ; 2010 : return (_Uptr - this->_Myptr()); // found a match
  11869. ; 2011 : else if (_Uptr == this->_Myptr())
  11870. ; 2012 : break; // at beginning, no more chance for match
  11871. ; 2013 : }
  11872. ; 2014 :
  11873. ; 2015 : return (npos); // no match
  11874. ; 2016 : }
  11875. ; 2017 :
  11876. ; 2018 : size_type find_last_of(const _Elem *_Ptr,
  11877. ; 2019 : size_type _Off = npos) const
  11878. ; 2020 : { // look for one of [_Ptr, <null>) before _Off
  11879. ; 2021 : _DEBUG_POINTER(_Ptr);
  11880. ; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
  11881. ; 2023 : }
  11882. ; 2024 :
  11883. ; 2025 : size_type find_last_of(_Elem _Ch,
  11884. ; 2026 : size_type _Off = npos) const
  11885. ; 2027 : { // look for _Ch before _Off
  11886. ; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  11887. ; 2029 : }
  11888. ; 2030 :
  11889. ; 2031 : size_type find_first_not_of(const _Myt& _Right,
  11890. ; 2032 : size_type _Off = 0) const _NOEXCEPT
  11891. ; 2033 : { // look for none of _Right at or after _Off
  11892. ; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
  11893. ; 2035 : _Right.size()));
  11894. ; 2036 : }
  11895. ; 2037 :
  11896. ; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
  11897. ; 2039 : size_type _Off, size_type _Count) const
  11898. ; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
  11899. ; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
  11900. ; 2042 : if (_Count != 0)
  11901. ; 2043 : _DEBUG_POINTER(_Ptr);
  11902. ; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11903. ; 2045 :
  11904. ; 2046 : if (_Off < this->_Mysize)
  11905. ; 2047 : { // room for match, look for it
  11906. ; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  11907. ; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  11908. ; 2050 : _Uptr < _Vptr; ++_Uptr)
  11909. ; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  11910. ; 2052 : return (_Uptr - this->_Myptr());
  11911. ; 2053 : }
  11912. ; 2054 : return (npos);
  11913. ; 2055 : }
  11914. ; 2056 :
  11915. ; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
  11916. ; 2058 : size_type _Off = 0) const
  11917. ; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
  11918. ; 2060 : _DEBUG_POINTER(_Ptr);
  11919. ; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  11920. ; 2062 : }
  11921. ; 2063 :
  11922. ; 2064 : size_type find_first_not_of(_Elem _Ch,
  11923. ; 2065 : size_type _Off = 0) const
  11924. ; 2066 : { // look for non _Ch at or after _Off
  11925. ; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
  11926. ; 2068 : }
  11927. ; 2069 :
  11928. ; 2070 : size_type find_last_not_of(const _Myt& _Right,
  11929. ; 2071 : size_type _Off = npos) const _NOEXCEPT
  11930. ; 2072 : { // look for none of _Right before _Off
  11931. ; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
  11932. ; 2074 : }
  11933. ; 2075 :
  11934. ; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
  11935. ; 2077 : size_type _Off, size_type _Count) const
  11936. ; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
  11937. ; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
  11938. ; 2080 : if (_Count != 0)
  11939. ; 2081 : _DEBUG_POINTER(_Ptr);
  11940. ; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  11941. ; 2083 :
  11942. ; 2084 : if (0 < this->_Mysize)
  11943. ; 2085 : { // worth searching, do it
  11944. ; 2086 : const _Elem *_Uptr = this->_Myptr()
  11945. ; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  11946. ; 2088 : for (; ; --_Uptr)
  11947. ; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  11948. ; 2090 : return (_Uptr - this->_Myptr());
  11949. ; 2091 : else if (_Uptr == this->_Myptr())
  11950. ; 2092 : break;
  11951. ; 2093 : }
  11952. ; 2094 : return (npos);
  11953. ; 2095 : }
  11954. ; 2096 :
  11955. ; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
  11956. ; 2098 : size_type _Off = npos) const
  11957. ; 2099 : { // look for none of [_Ptr, <null>) before _Off
  11958. ; 2100 : _DEBUG_POINTER(_Ptr);
  11959. ; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  11960. ; 2102 : }
  11961. ; 2103 :
  11962. ; 2104 : size_type find_last_not_of(_Elem _Ch,
  11963. ; 2105 : size_type _Off = npos) const
  11964. ; 2106 : { // look for non _Ch before _Off
  11965. ; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
  11966. ; 2108 : }
  11967. ; 2109 :
  11968. ; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
  11969. ; 2111 : { // return [_Off, _Off + _Count) as new string
  11970. ; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
  11971. ; 2113 : }
  11972. ; 2114 :
  11973. ; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
  11974. ; 2116 : { // compare [0, _Mysize) with _Right
  11975. ; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
  11976. ; 2118 : }
  11977. ; 2119 :
  11978. ; 2120 : int compare(size_type _Off, size_type _N0,
  11979. ; 2121 : const _Myt& _Right) const
  11980. ; 2122 : { // compare [_Off, _Off + _N0) with _Right
  11981. ; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
  11982. ; 2124 : }
  11983. ; 2125 :
  11984. ; 2126 : int compare(size_type _Off,
  11985. ; 2127 : size_type _N0, const _Myt& _Right,
  11986. ; 2128 : size_type _Roff, size_type _Count) const
  11987. ; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  11988. ; 2130 : if (_Right.size() < _Roff)
  11989. ; 2131 : _Xran(); // _Off off end
  11990. ; 2132 : if (_Right._Mysize - _Roff < _Count)
  11991. ; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
  11992. ; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
  11993. ; 2135 : }
  11994. ; 2136 :
  11995. ; 2137 : int compare(const _Elem *_Ptr) const
  11996. ; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
  11997. ; 2139 : _DEBUG_POINTER(_Ptr);
  11998. ; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
  11999. ; 2141 : }
  12000. ; 2142 :
  12001. ; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
  12002. ; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
  12003. ; 2145 : _DEBUG_POINTER(_Ptr);
  12004. ; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  12005. ; 2147 : }
  12006. ; 2148 :
  12007. ; 2149 : int compare(size_type _Off,
  12008. ; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
  12009. ; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  12010. ; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
  12011. ; 2153 : if (_Count != 0)
  12012. ; 2154 : _DEBUG_POINTER(_Ptr);
  12013. ; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12014. ; 2156 :
  12015. ; 2157 : if (this->_Mysize < _Off)
  12016. ; 2158 : _Xran(); // _Off off end
  12017. ; 2159 : if (this->_Mysize - _Off < _N0)
  12018. ; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  12019. ; 2161 :
  12020. ; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
  12021. ; 2163 : _N0 < _Count ? _N0 : _Count);
  12022. ; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
  12023. ; 2165 : : _N0 == _Count ? 0 : +1);
  12024. ; 2166 : }
  12025. ; 2167 :
  12026. ; 2168 : allocator_type get_allocator() const _NOEXCEPT
  12027. ; 2169 : { // return allocator object for values
  12028. ; 2170 : return (this->_Getal());
  12029. ; 2171 : }
  12030. ; 2172 :
  12031. ; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
  12032. ; 2174 : { // assign _Count copies of _Ch beginning at _Off
  12033. ; 2175 : if (_Count == 1)
  12034. ; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
  12035. ; 2177 : else
  12036. ; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
  12037. ; 2179 : }
  12038. ; 2180 :
  12039. ; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
  12040. ; 2182 : { // copy _Oldlen elements to newly allocated buffer
  12041. ; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
  12042. ; 2184 : if (max_size() < _Newres)
  12043. ; 2185 : _Newres = _Newsize; // undo roundup if too big
  12044. ; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
  12045. ; 2187 : ;
  12046. ; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
  12047. ; 2189 : _Newres = this->_Myres
  12048. ; 2190 : + this->_Myres / 2; // grow exponentially if possible
  12049. ; 2191 : else
  12050. ; 2192 : _Newres = max_size(); // settle for max_size()
  12051. ; 2193 :
  12052. ; 2194 : _Elem *_Ptr;
  12053. ; 2195 : _TRY_BEGIN
  12054. ; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
  12055. ; 2197 : _CATCH_ALL
  12056. ; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
  12057. ; 2199 : _TRY_BEGIN
  12058. ; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
  12059. ; 2201 : _CATCH_ALL
  12060. ; 2202 : _Tidy(true); // failed again, discard storage and reraise
  12061. ; 2203 : _RERAISE;
  12062. ; 2204 : _CATCH_END
  12063. ; 2205 : _CATCH_END
  12064. ; 2206 :
  12065. ; 2207 : if (0 < _Oldlen)
  12066. ; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
  12067. ; 2209 : _Oldlen); // copy existing elements
  12068. ; 2210 : _Tidy(true);
  12069. ; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  12070. ; 2212 : this->_Myres = _Newres;
  12071. ; 2213 : _Eos(_Oldlen);
  12072. ; 2214 : }
  12073. ; 2215 :
  12074. ; 2216 : void _Eos(size_type _Newsize)
  12075. ; 2217 : { // set new length and null terminator
  12076. ; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());
  12077.  
  12078. mov DWORD PTR [esi+16], edi
  12079.  
  12080. ; 517 : : this->_Bx._Buf);
  12081.  
  12082. cmp eax, 16 ; 00000010H
  12083. jb SHORT $LN87@assign
  12084. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstddef
  12085.  
  12086. ; 88 : reinterpret_cast<const volatile char&>(_Val)))));
  12087.  
  12088. mov eax, DWORD PTR [esi]
  12089. pop edi
  12090. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  12091.  
  12092. ; 564 : _Left = _Right;
  12093.  
  12094. mov BYTE PTR [eax], 0
  12095. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  12096.  
  12097. ; 1138 : return (*this);
  12098.  
  12099. mov eax, esi
  12100. pop esi
  12101. pop ebx
  12102.  
  12103. ; 1139 : }
  12104.  
  12105. pop ebp
  12106. ret 8
  12107. $LN87@assign:
  12108. pop edi
  12109.  
  12110. ; 517 : : this->_Bx._Buf);
  12111.  
  12112. mov eax, esi
  12113. pop esi
  12114. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  12115.  
  12116. ; 564 : _Left = _Right;
  12117.  
  12118. mov BYTE PTR [eax], 0
  12119. pop ebx
  12120. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  12121.  
  12122. ; 1139 : }
  12123.  
  12124. pop ebp
  12125. ret 8
  12126. $LN96@assign:
  12127.  
  12128. ; 517 : : this->_Bx._Buf);
  12129.  
  12130. mov eax, esi
  12131. $LN97@assign:
  12132. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\iosfwd
  12133.  
  12134. ; 530 : : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
  12135.  
  12136. test edi, edi
  12137. je SHORT $LN103@assign
  12138. push edi
  12139. push ebx
  12140. push eax
  12141. call _memcpy
  12142. add esp, 12 ; 0000000cH
  12143. $LN103@assign:
  12144. ; File c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring
  12145.  
  12146. ; 517 : : this->_Bx._Buf);
  12147.  
  12148. cmp DWORD PTR [esi+20], 16 ; 00000010H
  12149.  
  12150. ; 1140 :
  12151. ; 1141 : _Myt& assign(const _Elem *_Ptr)
  12152. ; 1142 : { // assign [_Ptr, <null>)
  12153. ; 1143 : _DEBUG_POINTER(_Ptr);
  12154. ; 1144 : return (assign(_Ptr, _Traits::length(_Ptr)));
  12155. ; 1145 : }
  12156. ; 1146 :
  12157. ; 1147 : _Myt& assign(size_type _Count, _Elem _Ch)
  12158. ; 1148 : { // assign _Count * _Ch
  12159. ; 1149 : if (_Count == npos)
  12160. ; 1150 : _Xlen(); // result too long
  12161. ; 1151 :
  12162. ; 1152 : if (_Grow(_Count))
  12163. ; 1153 : { // make room and assign new stuff
  12164. ; 1154 : _Chassign(0, _Count, _Ch);
  12165. ; 1155 : _Eos(_Count);
  12166. ; 1156 : }
  12167. ; 1157 : return (*this);
  12168. ; 1158 : }
  12169. ; 1159 :
  12170. ; 1160 : template<class _Iter>
  12171. ; 1161 : typename enable_if<_Is_iterator<_Iter>::value,
  12172. ; 1162 : _Myt&>::type
  12173. ; 1163 : assign(_Iter _First, _Iter _Last)
  12174. ; 1164 : { // assign [First, _Last), input iterators
  12175. ; 1165 : return (replace(begin(), end(), _First, _Last));
  12176. ; 1166 : }
  12177. ; 1167 :
  12178. ; 1168 : _Myt& assign(const_pointer _First, const_pointer _Last)
  12179. ; 1169 : { // assign [First, _Last), const pointers
  12180. ; 1170 : return (replace(begin(), end(), _First, _Last));
  12181. ; 1171 : }
  12182. ; 1172 :
  12183. ; 1173 : _Myt& assign(const_iterator _First, const_iterator _Last)
  12184. ; 1174 : { // assign [First, _Last), const_iterators
  12185. ; 1175 : return (replace(begin(), end(), _First, _Last));
  12186. ; 1176 : }
  12187. ; 1177 :
  12188. ; 1178 : _Myt& insert(size_type _Off, const _Myt& _Right)
  12189. ; 1179 : { // insert _Right at _Off
  12190. ; 1180 : return (insert(_Off, _Right, 0, npos));
  12191. ; 1181 : }
  12192. ; 1182 :
  12193. ; 1183 : _Myt& insert(size_type _Off,
  12194. ; 1184 : const _Myt& _Right, size_type _Roff, size_type _Count)
  12195. ; 1185 : { // insert _Right [_Roff, _Roff + _Count) at _Off
  12196. ; 1186 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  12197. ; 1187 : _Xran(); // _Off or _Roff off end
  12198. ; 1188 : size_type _Num = _Right.size() - _Roff;
  12199. ; 1189 : if (_Num < _Count)
  12200. ; 1190 : _Count = _Num; // trim _Count to size
  12201. ; 1191 : if (npos - this->_Mysize <= _Count)
  12202. ; 1192 : _Xlen(); // result too long
  12203. ; 1193 :
  12204. ; 1194 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  12205. ; 1195 : { // make room and insert new stuff
  12206. ; 1196 : _Traits::move(this->_Myptr() + _Off + _Count,
  12207. ; 1197 : this->_Myptr() + _Off,
  12208. ; 1198 : this->_Mysize - _Off); // empty out hole
  12209. ; 1199 : if (this == &_Right)
  12210. ; 1200 : _Traits::move(this->_Myptr() + _Off,
  12211. ; 1201 : this->_Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff),
  12212. ; 1202 : _Count); // substring
  12213. ; 1203 : else
  12214. ; 1204 : _Traits::copy(this->_Myptr() + _Off,
  12215. ; 1205 : _Right._Myptr() + _Roff, _Count); // fill hole
  12216. ; 1206 : _Eos(_Num);
  12217. ; 1207 : }
  12218. ; 1208 : return (*this);
  12219. ; 1209 : }
  12220. ; 1210 :
  12221. ; 1211 : _Myt& insert(size_type _Off,
  12222. ; 1212 : const _Elem *_Ptr, size_type _Count)
  12223. ; 1213 : { // insert [_Ptr, _Ptr + _Count) at _Off
  12224. ; 1214 : #if _ITERATOR_DEBUG_LEVEL == 2
  12225. ; 1215 : if (_Count != 0)
  12226. ; 1216 : _DEBUG_POINTER(_Ptr);
  12227. ; 1217 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12228. ; 1218 :
  12229. ; 1219 : if (_Inside(_Ptr))
  12230. ; 1220 : return (insert(_Off, *this,
  12231. ; 1221 : _Ptr - this->_Myptr(), _Count)); // substring
  12232. ; 1222 : if (this->_Mysize < _Off)
  12233. ; 1223 : _Xran(); // _Off off end
  12234. ; 1224 : if (npos - this->_Mysize <= _Count)
  12235. ; 1225 : _Xlen(); // result too long
  12236. ; 1226 : size_type _Num;
  12237. ; 1227 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  12238. ; 1228 : { // make room and insert new stuff
  12239. ; 1229 : _Traits::move(this->_Myptr() + _Off + _Count,
  12240. ; 1230 : this->_Myptr() + _Off,
  12241. ; 1231 : this->_Mysize - _Off); // empty out hole
  12242. ; 1232 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  12243. ; 1233 : _Eos(_Num);
  12244. ; 1234 : }
  12245. ; 1235 : return (*this);
  12246. ; 1236 : }
  12247. ; 1237 :
  12248. ; 1238 : _Myt& insert(size_type _Off, const _Elem *_Ptr)
  12249. ; 1239 : { // insert [_Ptr, <null>) at _Off
  12250. ; 1240 : _DEBUG_POINTER(_Ptr);
  12251. ; 1241 : return (insert(_Off, _Ptr, _Traits::length(_Ptr)));
  12252. ; 1242 : }
  12253. ; 1243 :
  12254. ; 1244 : _Myt& insert(size_type _Off,
  12255. ; 1245 : size_type _Count, _Elem _Ch)
  12256. ; 1246 : { // insert _Count * _Ch at _Off
  12257. ; 1247 : if (this->_Mysize < _Off)
  12258. ; 1248 : _Xran(); // _Off off end
  12259. ; 1249 : if (npos - this->_Mysize <= _Count)
  12260. ; 1250 : _Xlen(); // result too long
  12261. ; 1251 : size_type _Num;
  12262. ; 1252 : if (0 < _Count && _Grow(_Num = this->_Mysize + _Count))
  12263. ; 1253 : { // make room and insert new stuff
  12264. ; 1254 : _Traits::move(this->_Myptr() + _Off + _Count,
  12265. ; 1255 : this->_Myptr() + _Off,
  12266. ; 1256 : this->_Mysize - _Off); // empty out hole
  12267. ; 1257 : _Chassign(_Off, _Count, _Ch); // fill hole
  12268. ; 1258 : _Eos(_Num);
  12269. ; 1259 : }
  12270. ; 1260 : return (*this);
  12271. ; 1261 : }
  12272. ; 1262 :
  12273. ; 1263 : iterator insert(const_iterator _Where)
  12274. ; 1264 : { // insert <null> at _Where
  12275. ; 1265 : return (insert(_Where, _Elem()));
  12276. ; 1266 : }
  12277. ; 1267 :
  12278. ; 1268 : iterator insert(const_iterator _Where, _Elem _Ch)
  12279. ; 1269 : { // insert _Ch at _Where
  12280. ; 1270 : size_type _Off = _Pdif(_Where, begin());
  12281. ; 1271 : insert(_Off, 1, _Ch);
  12282. ; 1272 : return (begin() + _Off);
  12283. ; 1273 : }
  12284. ; 1274 :
  12285. ; 1275 : iterator insert(const_iterator _Where, size_type _Count, _Elem _Ch)
  12286. ; 1276 : { // insert _Count * _Elem at _Where
  12287. ; 1277 : size_type _Off = _Pdif(_Where, begin());
  12288. ; 1278 : insert(_Off, _Count, _Ch);
  12289. ; 1279 : return (begin() + _Off);
  12290. ; 1280 : }
  12291. ; 1281 :
  12292. ; 1282 : template<class _Iter>
  12293. ; 1283 : typename enable_if<_Is_iterator<_Iter>::value,
  12294. ; 1284 : iterator>::type
  12295. ; 1285 : insert(const_iterator _Where, _Iter _First, _Iter _Last)
  12296. ; 1286 : { // insert [_First, _Last) at _Where, input iterators
  12297. ; 1287 : size_type _Off = _Pdif(_Where, begin());
  12298. ; 1288 : replace(_Where, _Where, _First, _Last);
  12299. ; 1289 : return (begin() + _Off);
  12300. ; 1290 : }
  12301. ; 1291 :
  12302. ; 1292 : iterator insert(const_iterator _Where,
  12303. ; 1293 : const_pointer _First, const_pointer _Last)
  12304. ; 1294 : { // insert [_First, _Last) at _Where, const pointers
  12305. ; 1295 : size_type _Off = _Pdif(_Where, begin());
  12306. ; 1296 : replace(_Where, _Where, _First, _Last);
  12307. ; 1297 : return (begin() + _Off);
  12308. ; 1298 : }
  12309. ; 1299 :
  12310. ; 1300 : iterator insert(const_iterator _Where,
  12311. ; 1301 : const_iterator _First, const_iterator _Last)
  12312. ; 1302 : { // insert [_First, _Last) at _Where, const_iterators
  12313. ; 1303 : size_type _Off = _Pdif(_Where, begin());
  12314. ; 1304 : replace(_Where, _Where, _First, _Last);
  12315. ; 1305 : return (begin() + _Off);
  12316. ; 1306 : }
  12317. ; 1307 :
  12318. ; 1308 : _Myt& erase(size_type _Off = 0)
  12319. ; 1309 : { // erase elements [_Off, ...)
  12320. ; 1310 : if (this->_Mysize < _Off)
  12321. ; 1311 : _Xran(); // _Off off end
  12322. ; 1312 : _Eos(_Off);
  12323. ; 1313 : return (*this);
  12324. ; 1314 : }
  12325. ; 1315 :
  12326. ; 1316 : _Myt& erase(size_type _Off, size_type _Count)
  12327. ; 1317 : { // erase elements [_Off, _Off + _Count)
  12328. ; 1318 : if (this->_Mysize < _Off)
  12329. ; 1319 : _Xran(); // _Off off end
  12330. ; 1320 : if (this->_Mysize - _Off <= _Count)
  12331. ; 1321 : _Eos(_Off); // erase elements [_Off, ...)
  12332. ; 1322 : else if (0 < _Count)
  12333. ; 1323 : { // move elements down
  12334. ; 1324 : value_type *_Ptr = this->_Myptr() + _Off;
  12335. ; 1325 : size_type _Newsize = this->_Mysize - _Count;
  12336. ; 1326 : _Traits::move(_Ptr, _Ptr + _Count, _Newsize - _Off);
  12337. ; 1327 : _Eos(_Newsize);
  12338. ; 1328 : }
  12339. ; 1329 : return (*this);
  12340. ; 1330 : }
  12341. ; 1331 :
  12342. ; 1332 : iterator erase(const_iterator _Where)
  12343. ; 1333 : { // erase element at _Where
  12344. ; 1334 : size_type _Count = _Pdif(_Where, begin());
  12345. ; 1335 : erase(_Count, 1);
  12346. ; 1336 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  12347. ; 1337 : }
  12348. ; 1338 :
  12349. ; 1339 : iterator erase(const_iterator _First, const_iterator _Last)
  12350. ; 1340 : { // erase substring [_First, _Last)
  12351. ; 1341 : _DEBUG_RANGE(_First, _Last);
  12352. ; 1342 : size_type _Count = _Pdif(_First, begin());
  12353. ; 1343 : erase(_Count, _Pdif(_Last, _First));
  12354. ; 1344 : return (_STRING_ITERATOR(this->_Myptr() + _Count));
  12355. ; 1345 : }
  12356. ; 1346 :
  12357. ; 1347 : void clear() _NOEXCEPT
  12358. ; 1348 : { // erase all
  12359. ; 1349 : _Eos(0);
  12360. ; 1350 : }
  12361. ; 1351 :
  12362. ; 1352 : _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right)
  12363. ; 1353 : { // replace [_Off, _Off + _N0) with _Right
  12364. ; 1354 : return (replace(_Off, _N0, _Right, 0, npos));
  12365. ; 1355 : }
  12366. ; 1356 :
  12367. ; 1357 : _Myt& replace(size_type _Off,
  12368. ; 1358 : size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count)
  12369. ; 1359 : { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  12370. ; 1360 : if (this->_Mysize < _Off || _Right.size() < _Roff)
  12371. ; 1361 : _Xran(); // _Off or _Roff off end
  12372. ; 1362 : if (this->_Mysize - _Off < _N0)
  12373. ; 1363 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  12374. ; 1364 : size_type _Num = _Right.size() - _Roff;
  12375. ; 1365 : if (_Num < _Count)
  12376. ; 1366 : _Count = _Num; // trim _Count to size
  12377. ; 1367 : if (npos - _Count <= this->_Mysize - _N0)
  12378. ; 1368 : _Xlen(); // result too long
  12379. ; 1369 :
  12380. ; 1370 : size_type _Nm = this->_Mysize - _N0 - _Off; // length of kept tail
  12381. ; 1371 : size_type _Newsize = this->_Mysize + _Count - _N0;
  12382. ; 1372 : if (this->_Mysize < _Newsize)
  12383. ; 1373 : _Grow(_Newsize);
  12384. ; 1374 :
  12385. ; 1375 : if (this != &_Right)
  12386. ; 1376 : { // no overlap, just move down and copy in new stuff
  12387. ; 1377 : _Traits::move(this->_Myptr() + _Off + _Count,
  12388. ; 1378 : this->_Myptr() + _Off + _N0, _Nm); // empty hole
  12389. ; 1379 : _Traits::copy(this->_Myptr() + _Off,
  12390. ; 1380 : _Right._Myptr() + _Roff, _Count); // fill hole
  12391. ; 1381 : }
  12392. ; 1382 : else if (_Count <= _N0)
  12393. ; 1383 : { // hole doesn't get larger, just copy in substring
  12394. ; 1384 : _Traits::move(this->_Myptr() + _Off,
  12395. ; 1385 : this->_Myptr() + _Roff, _Count); // fill hole
  12396. ; 1386 : _Traits::move(this->_Myptr() + _Off + _Count,
  12397. ; 1387 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  12398. ; 1388 : }
  12399. ; 1389 : else if (_Roff <= _Off)
  12400. ; 1390 : { // hole gets larger, substring begins before hole
  12401. ; 1391 : _Traits::move(this->_Myptr() + _Off + _Count,
  12402. ; 1392 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  12403. ; 1393 : _Traits::move(this->_Myptr() + _Off,
  12404. ; 1394 : this->_Myptr() + _Roff, _Count); // fill hole
  12405. ; 1395 : }
  12406. ; 1396 : else if (_Off + _N0 <= _Roff)
  12407. ; 1397 : { // hole gets larger, substring begins after hole
  12408. ; 1398 : _Traits::move(this->_Myptr() + _Off + _Count,
  12409. ; 1399 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  12410. ; 1400 : _Traits::move(this->_Myptr() + _Off,
  12411. ; 1401 : this->_Myptr() + (_Roff + _Count - _N0),
  12412. ; 1402 : _Count); // fill hole
  12413. ; 1403 : }
  12414. ; 1404 : else
  12415. ; 1405 : { // hole gets larger, substring begins in hole
  12416. ; 1406 : _Traits::move(this->_Myptr() + _Off,
  12417. ; 1407 : this->_Myptr() + _Roff, _N0); // fill old hole
  12418. ; 1408 : _Traits::move(this->_Myptr() + _Off + _Count,
  12419. ; 1409 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  12420. ; 1410 : _Traits::move(this->_Myptr() + _Off + _N0,
  12421. ; 1411 : this->_Myptr() + _Roff + _Count,
  12422. ; 1412 : _Count - _N0); // fill rest of new hole
  12423. ; 1413 : }
  12424. ; 1414 :
  12425. ; 1415 : _Eos(_Newsize);
  12426. ; 1416 : return (*this);
  12427. ; 1417 : }
  12428. ; 1418 :
  12429. ; 1419 : _Myt& replace(size_type _Off,
  12430. ; 1420 : size_type _N0, const _Elem *_Ptr, size_type _Count)
  12431. ; 1421 : { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  12432. ; 1422 : #if _ITERATOR_DEBUG_LEVEL == 2
  12433. ; 1423 : if (_Count != 0)
  12434. ; 1424 : _DEBUG_POINTER(_Ptr);
  12435. ; 1425 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12436. ; 1426 :
  12437. ; 1427 : if (_Inside(_Ptr))
  12438. ; 1428 : return (replace(_Off, _N0, *this,
  12439. ; 1429 : _Ptr - this->_Myptr(),
  12440. ; 1430 : _Count)); // substring, replace carefully
  12441. ; 1431 : if (this->_Mysize < _Off)
  12442. ; 1432 : _Xran(); // _Off off end
  12443. ; 1433 : if (this->_Mysize - _Off < _N0)
  12444. ; 1434 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  12445. ; 1435 : if (npos - _Count <= this->_Mysize - _N0)
  12446. ; 1436 : _Xlen(); // result too long
  12447. ; 1437 : size_type _Nm = this->_Mysize - _N0 - _Off;
  12448. ; 1438 :
  12449. ; 1439 : if (_Count < _N0)
  12450. ; 1440 : _Traits::move(this->_Myptr() + _Off + _Count,
  12451. ; 1441 : this->_Myptr() + _Off + _N0,
  12452. ; 1442 : _Nm); // smaller hole, move tail up
  12453. ; 1443 : size_type _Num;
  12454. ; 1444 : if ((0 < _Count || 0 < _N0)
  12455. ; 1445 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  12456. ; 1446 : { // make room and rearrange
  12457. ; 1447 : if (_N0 < _Count)
  12458. ; 1448 : _Traits::move(this->_Myptr() + _Off + _Count,
  12459. ; 1449 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  12460. ; 1450 : _Traits::copy(this->_Myptr() + _Off, _Ptr, _Count); // fill hole
  12461. ; 1451 : _Eos(_Num);
  12462. ; 1452 : }
  12463. ; 1453 : return (*this);
  12464. ; 1454 : }
  12465. ; 1455 :
  12466. ; 1456 : _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr)
  12467. ; 1457 : { // replace [_Off, _Off + _N0) with [_Ptr, <null>)
  12468. ; 1458 : _DEBUG_POINTER(_Ptr);
  12469. ; 1459 : return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  12470. ; 1460 : }
  12471. ; 1461 :
  12472. ; 1462 : _Myt& replace(size_type _Off,
  12473. ; 1463 : size_type _N0, size_type _Count, _Elem _Ch)
  12474. ; 1464 : { // replace [_Off, _Off + _N0) with _Count * _Ch
  12475. ; 1465 : if (this->_Mysize < _Off)
  12476. ; 1466 : _Xran(); // _Off off end
  12477. ; 1467 : if (this->_Mysize - _Off < _N0)
  12478. ; 1468 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  12479. ; 1469 : if (npos - _Count <= this->_Mysize - _N0)
  12480. ; 1470 : _Xlen(); // result too long
  12481. ; 1471 : size_type _Nm = this->_Mysize - _N0 - _Off;
  12482. ; 1472 :
  12483. ; 1473 : if (_Count < _N0)
  12484. ; 1474 : _Traits::move(this->_Myptr() + _Off + _Count,
  12485. ; 1475 : this->_Myptr() + _Off + _N0,
  12486. ; 1476 : _Nm); // smaller hole, move tail up
  12487. ; 1477 : size_type _Num;
  12488. ; 1478 : if ((0 < _Count || 0 < _N0)
  12489. ; 1479 : && _Grow(_Num = this->_Mysize + _Count - _N0))
  12490. ; 1480 : { // make room and rearrange
  12491. ; 1481 : if (_N0 < _Count)
  12492. ; 1482 : _Traits::move(this->_Myptr() + _Off + _Count,
  12493. ; 1483 : this->_Myptr() + _Off + _N0, _Nm); // move tail down
  12494. ; 1484 : _Chassign(_Off, _Count, _Ch); // fill hole
  12495. ; 1485 : _Eos(_Num);
  12496. ; 1486 : }
  12497. ; 1487 : return (*this);
  12498. ; 1488 : }
  12499. ; 1489 :
  12500. ; 1490 : _Myt& replace(const_iterator _First, const_iterator _Last,
  12501. ; 1491 : const _Myt& _Right)
  12502. ; 1492 : { // replace [_First, _Last) with _Right
  12503. ; 1493 : return (replace(
  12504. ; 1494 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Right));
  12505. ; 1495 : }
  12506. ; 1496 :
  12507. ; 1497 : _Myt& replace(const_iterator _First, const_iterator _Last,
  12508. ; 1498 : const _Elem *_Ptr, size_type _Count)
  12509. ; 1499 : { // replace [_First, _Last) with [_Ptr, _Ptr + _Count)
  12510. ; 1500 : return (replace(
  12511. ; 1501 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count));
  12512. ; 1502 : }
  12513. ; 1503 :
  12514. ; 1504 : _Myt& replace(const_iterator _First, const_iterator _Last,
  12515. ; 1505 : const _Elem *_Ptr)
  12516. ; 1506 : { // replace [_First, _Last) with [_Ptr, <null>)
  12517. ; 1507 : return (replace(
  12518. ; 1508 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr));
  12519. ; 1509 : }
  12520. ; 1510 :
  12521. ; 1511 : _Myt& replace(const_iterator _First, const_iterator _Last,
  12522. ; 1512 : size_type _Count, _Elem _Ch)
  12523. ; 1513 : { // replace [_First, _Last) with _Count * _Ch
  12524. ; 1514 : return (replace(
  12525. ; 1515 : _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch));
  12526. ; 1516 : }
  12527. ; 1517 :
  12528. ; 1518 : template<class _Iter>
  12529. ; 1519 : typename enable_if<_Is_iterator<_Iter>::value,
  12530. ; 1520 : _Myt&>::type
  12531. ; 1521 : replace(const_iterator _First, const_iterator _Last,
  12532. ; 1522 : _Iter _First2, _Iter _Last2)
  12533. ; 1523 : { // replace [_First, _Last) with [_First2, _Last2), input iterators
  12534. ; 1524 : _Myt _Right(_First2, _Last2);
  12535. ; 1525 : replace(_First, _Last, _Right);
  12536. ; 1526 : return (*this);
  12537. ; 1527 : }
  12538. ; 1528 :
  12539. ; 1529 : _Myt& replace(const_iterator _First, const_iterator _Last,
  12540. ; 1530 : const_pointer _First2, const_pointer _Last2)
  12541. ; 1531 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  12542. ; 1532 : if (_First2 == _Last2)
  12543. ; 1533 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  12544. ; 1534 : else
  12545. ; 1535 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  12546. ; 1536 : &*_First2, _Last2 - _First2);
  12547. ; 1537 : return (*this);
  12548. ; 1538 : }
  12549. ; 1539 :
  12550. ; 1540 : _Myt& replace(const_iterator _First, const_iterator _Last,
  12551. ; 1541 : pointer _First2, pointer _Last2)
  12552. ; 1542 : { // replace [_First, _Last) with [_First2, _Last2), const pointers
  12553. ; 1543 : if (_First2 == _Last2)
  12554. ; 1544 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  12555. ; 1545 : else
  12556. ; 1546 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  12557. ; 1547 : &*_First2, _Last2 - _First2);
  12558. ; 1548 : return (*this);
  12559. ; 1549 : }
  12560. ; 1550 :
  12561. ; 1551 : _Myt& replace(const_iterator _First, const_iterator _Last,
  12562. ; 1552 : const_iterator _First2, const_iterator _Last2)
  12563. ; 1553 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  12564. ; 1554 : if (_First2 == _Last2)
  12565. ; 1555 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  12566. ; 1556 : else
  12567. ; 1557 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  12568. ; 1558 : &*_First2, _Last2 - _First2);
  12569. ; 1559 : return (*this);
  12570. ; 1560 : }
  12571. ; 1561 :
  12572. ; 1562 : _Myt& replace(const_iterator _First, const_iterator _Last,
  12573. ; 1563 : iterator _First2, iterator _Last2)
  12574. ; 1564 : { // replace [_First, _Last) with [_First2, _Last2), const_iterators
  12575. ; 1565 : if (_First2 == _Last2)
  12576. ; 1566 : erase(_Pdif(_First, begin()), _Pdif(_Last, _First));
  12577. ; 1567 : else
  12578. ; 1568 : replace(_Pdif(_First, begin()), _Pdif(_Last, _First),
  12579. ; 1569 : &*_First2, _Last2 - _First2);
  12580. ; 1570 : return (*this);
  12581. ; 1571 : }
  12582. ; 1572 :
  12583. ; 1573 : iterator begin() _NOEXCEPT
  12584. ; 1574 : { // return iterator for beginning of mutable sequence
  12585. ; 1575 : return (_STRING_ITERATOR(this->_Myptr()));
  12586. ; 1576 : }
  12587. ; 1577 :
  12588. ; 1578 : const_iterator begin() const _NOEXCEPT
  12589. ; 1579 : { // return iterator for beginning of nonmutable sequence
  12590. ; 1580 : return (_STRING_CONST_ITERATOR(this->_Myptr()));
  12591. ; 1581 : }
  12592. ; 1582 :
  12593. ; 1583 : iterator end() _NOEXCEPT
  12594. ; 1584 : { // return iterator for end of mutable sequence
  12595. ; 1585 : return (_STRING_ITERATOR(this->_Myptr() + this->_Mysize));
  12596. ; 1586 : }
  12597. ; 1587 :
  12598. ; 1588 : const_iterator end() const _NOEXCEPT
  12599. ; 1589 : { // return iterator for end of nonmutable sequence
  12600. ; 1590 : return (_STRING_CONST_ITERATOR(this->_Myptr() + this->_Mysize));
  12601. ; 1591 : }
  12602. ; 1592 :
  12603. ; 1593 : reverse_iterator rbegin() _NOEXCEPT
  12604. ; 1594 : { // return iterator for beginning of reversed mutable sequence
  12605. ; 1595 : return (reverse_iterator(end()));
  12606. ; 1596 : }
  12607. ; 1597 :
  12608. ; 1598 : const_reverse_iterator rbegin() const _NOEXCEPT
  12609. ; 1599 : { // return iterator for beginning of reversed nonmutable sequence
  12610. ; 1600 : return (const_reverse_iterator(end()));
  12611. ; 1601 : }
  12612. ; 1602 :
  12613. ; 1603 : reverse_iterator rend() _NOEXCEPT
  12614. ; 1604 : { // return iterator for end of reversed mutable sequence
  12615. ; 1605 : return (reverse_iterator(begin()));
  12616. ; 1606 : }
  12617. ; 1607 :
  12618. ; 1608 : const_reverse_iterator rend() const _NOEXCEPT
  12619. ; 1609 : { // return iterator for end of reversed nonmutable sequence
  12620. ; 1610 : return (const_reverse_iterator(begin()));
  12621. ; 1611 : }
  12622. ; 1612 :
  12623. ; 1613 : #if _HAS_CPP0X
  12624. ; 1614 : const_iterator cbegin() const _NOEXCEPT
  12625. ; 1615 : { // return iterator for beginning of nonmutable sequence
  12626. ; 1616 : return (((const _Myt *)this)->begin());
  12627. ; 1617 : }
  12628. ; 1618 :
  12629. ; 1619 : const_iterator cend() const _NOEXCEPT
  12630. ; 1620 : { // return iterator for end of nonmutable sequence
  12631. ; 1621 : return (((const _Myt *)this)->end());
  12632. ; 1622 : }
  12633. ; 1623 :
  12634. ; 1624 : const_reverse_iterator crbegin() const _NOEXCEPT
  12635. ; 1625 : { // return iterator for beginning of reversed nonmutable sequence
  12636. ; 1626 : return (((const _Myt *)this)->rbegin());
  12637. ; 1627 : }
  12638. ; 1628 :
  12639. ; 1629 : const_reverse_iterator crend() const _NOEXCEPT
  12640. ; 1630 : { // return iterator for end of reversed nonmutable sequence
  12641. ; 1631 : return (((const _Myt *)this)->rend());
  12642. ; 1632 : }
  12643. ; 1633 :
  12644. ; 1634 : void shrink_to_fit()
  12645. ; 1635 : { // reduce capacity
  12646. ; 1636 : if ((size() | this->_ALLOC_MASK) < capacity())
  12647. ; 1637 : { // worth shrinking, do it
  12648. ; 1638 : _Myt _Tmp(*this);
  12649. ; 1639 : swap(_Tmp);
  12650. ; 1640 : }
  12651. ; 1641 : }
  12652. ; 1642 : #endif /* _HAS_CPP0X */
  12653. ; 1643 :
  12654. ; 1644 : reference at(size_type _Off)
  12655. ; 1645 : { // subscript mutable sequence with checking
  12656. ; 1646 : if (this->_Mysize <= _Off)
  12657. ; 1647 : _Xran(); // _Off off end
  12658. ; 1648 : return (this->_Myptr()[_Off]);
  12659. ; 1649 : }
  12660. ; 1650 :
  12661. ; 1651 : const_reference at(size_type _Off) const
  12662. ; 1652 : { // subscript nonmutable sequence with checking
  12663. ; 1653 : if (this->_Mysize <= _Off)
  12664. ; 1654 : _Xran(); // _Off off end
  12665. ; 1655 : return (this->_Myptr()[_Off]);
  12666. ; 1656 : }
  12667. ; 1657 :
  12668. ; 1658 : reference operator[](size_type _Off)
  12669. ; 1659 : { // subscript mutable sequence
  12670. ; 1660 : #if _ITERATOR_DEBUG_LEVEL == 2
  12671. ; 1661 : if (this->_Mysize < _Off) // sic
  12672. ; 1662 : _DEBUG_ERROR("string subscript out of range");
  12673. ; 1663 :
  12674. ; 1664 : #elif _ITERATOR_DEBUG_LEVEL == 1
  12675. ; 1665 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  12676. ; 1666 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12677. ; 1667 :
  12678. ; 1668 : return (this->_Myptr()[_Off]);
  12679. ; 1669 : }
  12680. ; 1670 :
  12681. ; 1671 : const_reference operator[](size_type _Off) const
  12682. ; 1672 : { // subscript nonmutable sequence
  12683. ; 1673 : #if _ITERATOR_DEBUG_LEVEL == 2
  12684. ; 1674 : if (this->_Mysize < _Off) // sic
  12685. ; 1675 : _DEBUG_ERROR("string subscript out of range");
  12686. ; 1676 :
  12687. ; 1677 : #elif _ITERATOR_DEBUG_LEVEL == 1
  12688. ; 1678 : _SCL_SECURE_VALIDATE_RANGE(_Off <= this->_Mysize); // sic
  12689. ; 1679 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12690. ; 1680 :
  12691. ; 1681 : return (this->_Myptr()[_Off]);
  12692. ; 1682 : }
  12693. ; 1683 :
  12694. ; 1684 : void push_back(_Elem _Ch)
  12695. ; 1685 : { // insert element at end
  12696. ; 1686 : insert(end(), _Ch);
  12697. ; 1687 : }
  12698. ; 1688 :
  12699. ; 1689 : #if _HAS_CPP0X
  12700. ; 1690 : void pop_back()
  12701. ; 1691 : { // erase element at end
  12702. ; 1692 : erase(this->_Mysize - 1); // throws if _Mysize == 0
  12703. ; 1693 : }
  12704. ; 1694 :
  12705. ; 1695 : reference front()
  12706. ; 1696 : { // return first element of mutable sequence
  12707. ; 1697 : return (*begin());
  12708. ; 1698 : }
  12709. ; 1699 :
  12710. ; 1700 : const_reference front() const
  12711. ; 1701 : { // return first element of nonmutable sequence
  12712. ; 1702 : return (*begin());
  12713. ; 1703 : }
  12714. ; 1704 :
  12715. ; 1705 : reference back()
  12716. ; 1706 : { // return last element of mutable sequence
  12717. ; 1707 : return (*(end() - 1));
  12718. ; 1708 : }
  12719. ; 1709 :
  12720. ; 1710 : const_reference back() const
  12721. ; 1711 : { // return last element of nonmutable sequence
  12722. ; 1712 : return (*(end() - 1));
  12723. ; 1713 : }
  12724. ; 1714 : #endif /* _HAS_CPP0X */
  12725. ; 1715 :
  12726. ; 1716 : const _Elem *c_str() const _NOEXCEPT
  12727. ; 1717 : { // return pointer to null-terminated nonmutable array
  12728. ; 1718 : return (this->_Myptr());
  12729. ; 1719 : }
  12730. ; 1720 :
  12731. ; 1721 : const _Elem *data() const _NOEXCEPT
  12732. ; 1722 : { // return pointer to nonmutable array
  12733. ; 1723 : return (c_str());
  12734. ; 1724 : }
  12735. ; 1725 :
  12736. ; 1726 : size_type length() const _NOEXCEPT
  12737. ; 1727 : { // return length of sequence
  12738. ; 1728 : return (this->_Mysize);
  12739. ; 1729 : }
  12740. ; 1730 :
  12741. ; 1731 : size_type size() const _NOEXCEPT
  12742. ; 1732 : { // return length of sequence
  12743. ; 1733 : return (this->_Mysize);
  12744. ; 1734 : }
  12745. ; 1735 :
  12746. ; 1736 : size_type max_size() const _NOEXCEPT
  12747. ; 1737 : { // return maximum possible length of sequence
  12748. ; 1738 : size_type _Num = this->_Getal().max_size();
  12749. ; 1739 : return (_Num <= 1 ? 1 : _Num - 1);
  12750. ; 1740 : }
  12751. ; 1741 :
  12752. ; 1742 : void resize(size_type _Newsize)
  12753. ; 1743 : { // determine new length, padding with null elements as needed
  12754. ; 1744 : resize(_Newsize, _Elem());
  12755. ; 1745 : }
  12756. ; 1746 :
  12757. ; 1747 : void resize(size_type _Newsize, _Elem _Ch)
  12758. ; 1748 : { // determine new length, padding with _Ch elements as needed
  12759. ; 1749 : if (_Newsize <= this->_Mysize)
  12760. ; 1750 : _Eos(_Newsize);
  12761. ; 1751 : else
  12762. ; 1752 : append(_Newsize - this->_Mysize, _Ch);
  12763. ; 1753 : }
  12764. ; 1754 :
  12765. ; 1755 : size_type capacity() const _NOEXCEPT
  12766. ; 1756 : { // return current length of allocated storage
  12767. ; 1757 : return (this->_Myres);
  12768. ; 1758 : }
  12769. ; 1759 :
  12770. ; 1760 : void reserve(size_type _Newcap = 0)
  12771. ; 1761 : { // determine new minimum length of allocated storage
  12772. ; 1762 : if (this->_Mysize <= _Newcap && this->_Myres != _Newcap)
  12773. ; 1763 : { // change reservation
  12774. ; 1764 : size_type _Size = this->_Mysize;
  12775. ; 1765 : if (_Grow(_Newcap, true))
  12776. ; 1766 : _Eos(_Size);
  12777. ; 1767 : }
  12778. ; 1768 : }
  12779. ; 1769 :
  12780. ; 1770 : bool empty() const _NOEXCEPT
  12781. ; 1771 : { // test if sequence is empty
  12782. ; 1772 : return (this->_Mysize == 0);
  12783. ; 1773 : }
  12784. ; 1774 :
  12785. ; 1775 : _SCL_INSECURE_DEPRECATE
  12786. ; 1776 :
  12787. ; 1777 : size_type copy(_Elem *_Ptr,
  12788. ; 1778 : size_type _Count, size_type _Off = 0) const
  12789. ; 1779 : { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count)
  12790. ; 1780 : #if _ITERATOR_DEBUG_LEVEL == 2
  12791. ; 1781 : if (_Count != 0)
  12792. ; 1782 : _DEBUG_POINTER(_Ptr);
  12793. ; 1783 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12794. ; 1784 :
  12795. ; 1785 : if (this->_Mysize < _Off)
  12796. ; 1786 : _Xran(); // _Off off end
  12797. ; 1787 : if (this->_Mysize - _Off < _Count)
  12798. ; 1788 : _Count = this->_Mysize - _Off;
  12799. ; 1789 : _Traits::copy(_Ptr, this->_Myptr() + _Off, _Count);
  12800. ; 1790 : return (_Count);
  12801. ; 1791 : }
  12802. ; 1792 :
  12803. ; 1793 : size_type _Copy_s(_Elem *_Dest, size_type _Dest_size,
  12804. ; 1794 : size_type _Count, size_type _Off = 0) const
  12805. ; 1795 : { // copy [_Off, _Off + _Count) to [_Dest, _Dest + _Count)
  12806. ; 1796 : #if _ITERATOR_DEBUG_LEVEL == 2
  12807. ; 1797 : if (_Count != 0)
  12808. ; 1798 : _DEBUG_POINTER(_Dest);
  12809. ; 1799 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12810. ; 1800 :
  12811. ; 1801 : if (this->_Mysize < _Off)
  12812. ; 1802 : _Xran(); // _Off off end
  12813. ; 1803 : if (this->_Mysize - _Off < _Count)
  12814. ; 1804 : _Count = this->_Mysize - _Off;
  12815. ; 1805 : _Traits::_Copy_s(_Dest, _Dest_size, this->_Myptr() + _Off, _Count);
  12816. ; 1806 : return (_Count);
  12817. ; 1807 : }
  12818. ; 1808 :
  12819. ; 1809 : void _Swap_bx(_Myt& _Right)
  12820. ; 1810 : { // exchange _Bx with _Right._Bx
  12821. ; 1811 : if (this->_BUF_SIZE <= this->_Myres)
  12822. ; 1812 : if (this->_BUF_SIZE <= _Right._Myres)
  12823. ; 1813 : _Swap_adl(this->_Bx._Ptr, _Right._Bx._Ptr);
  12824. ; 1814 : else
  12825. ; 1815 : { // swap large with small
  12826. ; 1816 : pointer _Ptr = this->_Bx._Ptr;
  12827. ; 1817 : this->_Getal().destroy(&this->_Bx._Ptr);
  12828. ; 1818 : _Traits::copy(this->_Bx._Buf,
  12829. ; 1819 : _Right._Bx._Buf, _Right._Mysize + 1);
  12830. ; 1820 : this->_Getal().construct(&_Right._Bx._Ptr, _Ptr);
  12831. ; 1821 : }
  12832. ; 1822 : else
  12833. ; 1823 : if (_Right._Myres < this->_BUF_SIZE)
  12834. ; 1824 : _STD swap(this->_Bx._Buf, _Right._Bx._Buf);
  12835. ; 1825 : else
  12836. ; 1826 : { // swap small with large
  12837. ; 1827 : pointer _Ptr = _Right._Bx._Ptr;
  12838. ; 1828 : this->_Getal().destroy(&_Right._Bx._Ptr);
  12839. ; 1829 : _Traits::copy(_Right._Bx._Buf,
  12840. ; 1830 : this->_Bx._Buf, this->_Mysize + 1);
  12841. ; 1831 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  12842. ; 1832 : }
  12843. ; 1833 : }
  12844. ; 1834 :
  12845. ; 1835 : void swap(_Myt& _Right)
  12846. ; 1836 : { // exchange contents with _Right
  12847. ; 1837 : if (this == &_Right)
  12848. ; 1838 : ; // same object, do nothing
  12849. ; 1839 : else if (this->_Getal() == _Right._Getal())
  12850. ; 1840 : { // same allocator, swap control information
  12851. ; 1841 : this->_Swap_all(_Right);
  12852. ; 1842 : _Swap_bx(_Right);
  12853. ; 1843 : _STD swap(this->_Mysize, _Right._Mysize);
  12854. ; 1844 : _STD swap(this->_Myres, _Right._Myres);
  12855. ; 1845 : }
  12856. ; 1846 :
  12857. ; 1847 : #if _HAS_CPP0X
  12858. ; 1848 : else if (_Alty::propagate_on_container_swap::value)
  12859. ; 1849 : { // swap allocators and control information
  12860. ; 1850 : this->_Swap_alloc(_Right);
  12861. ; 1851 : _Swap_bx(_Right);
  12862. ; 1852 : _STD swap(this->_Bx, _Right._Bx); // pointer bitwise copyable?
  12863. ; 1853 : _STD swap(this->_Mysize, _Right._Mysize);
  12864. ; 1854 : _STD swap(this->_Myres, _Right._Myres);
  12865. ; 1855 : }
  12866. ; 1856 : #endif /* _HAS_CPP0X */
  12867. ; 1857 :
  12868. ; 1858 : else
  12869. ; 1859 : { // different allocator, do multiple assigns
  12870. ; 1860 : _Myt _Tmp = *this;
  12871. ; 1861 :
  12872. ; 1862 : *this = _Right;
  12873. ; 1863 : _Right = _Tmp;
  12874. ; 1864 : }
  12875. ; 1865 : }
  12876. ; 1866 :
  12877. ; 1867 : size_type find(const _Myt& _Right, size_type _Off = 0) const _NOEXCEPT
  12878. ; 1868 : { // look for _Right beginning at or after _Off
  12879. ; 1869 : return (find(_Right._Myptr(), _Off, _Right.size()));
  12880. ; 1870 : }
  12881. ; 1871 :
  12882. ; 1872 : size_type find(const _Elem *_Ptr,
  12883. ; 1873 : size_type _Off, size_type _Count) const
  12884. ; 1874 : { // look for [_Ptr, _Ptr + _Count) beginning at or after _Off
  12885. ; 1875 : #if _ITERATOR_DEBUG_LEVEL == 2
  12886. ; 1876 : if (_Count != 0)
  12887. ; 1877 : _DEBUG_POINTER(_Ptr);
  12888. ; 1878 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12889. ; 1879 :
  12890. ; 1880 : if (_Count == 0 && _Off <= this->_Mysize)
  12891. ; 1881 : return (_Off); // null string always matches (if inside string)
  12892. ; 1882 :
  12893. ; 1883 : size_type _Nm;
  12894. ; 1884 : if (_Off < this->_Mysize && _Count <= (_Nm = this->_Mysize - _Off))
  12895. ; 1885 : { // room for match, look for it
  12896. ; 1886 : const _Elem *_Uptr, *_Vptr;
  12897. ; 1887 : for (_Nm -= _Count - 1, _Vptr = this->_Myptr() + _Off;
  12898. ; 1888 : (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0;
  12899. ; 1889 : _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1)
  12900. ; 1890 : if (_Traits::compare(_Uptr, _Ptr, _Count) == 0)
  12901. ; 1891 : return (_Uptr - this->_Myptr()); // found a match
  12902. ; 1892 : }
  12903. ; 1893 :
  12904. ; 1894 : return (npos); // no match
  12905. ; 1895 : }
  12906. ; 1896 :
  12907. ; 1897 : size_type find(const _Elem *_Ptr, size_type _Off = 0) const
  12908. ; 1898 : { // look for [_Ptr, <null>) beginning at or after _Off
  12909. ; 1899 : _DEBUG_POINTER(_Ptr);
  12910. ; 1900 : return (find(_Ptr, _Off, _Traits::length(_Ptr)));
  12911. ; 1901 : }
  12912. ; 1902 :
  12913. ; 1903 : size_type find(_Elem _Ch, size_type _Off = 0) const
  12914. ; 1904 : { // look for _Ch at or after _Off
  12915. ; 1905 : return (find((const _Elem *)&_Ch, _Off, 1));
  12916. ; 1906 : }
  12917. ; 1907 :
  12918. ; 1908 : size_type rfind(const _Myt& _Right, size_type _Off = npos) const _NOEXCEPT
  12919. ; 1909 : { // look for _Right beginning before _Off
  12920. ; 1910 : return (rfind(_Right._Myptr(), _Off, _Right.size()));
  12921. ; 1911 : }
  12922. ; 1912 :
  12923. ; 1913 : size_type rfind(const _Elem *_Ptr,
  12924. ; 1914 : size_type _Off, size_type _Count) const
  12925. ; 1915 : { // look for [_Ptr, _Ptr + _Count) beginning before _Off
  12926. ; 1916 : #if _ITERATOR_DEBUG_LEVEL == 2
  12927. ; 1917 : if (_Count != 0)
  12928. ; 1918 : _DEBUG_POINTER(_Ptr);
  12929. ; 1919 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12930. ; 1920 :
  12931. ; 1921 : if (_Count == 0)
  12932. ; 1922 : return (_Off < this->_Mysize ? _Off
  12933. ; 1923 : : this->_Mysize); // null always matches
  12934. ; 1924 : if (_Count <= this->_Mysize)
  12935. ; 1925 : { // room for match, look for it
  12936. ; 1926 : const _Elem *_Uptr = this->_Myptr() +
  12937. ; 1927 : (_Off < this->_Mysize - _Count ? _Off
  12938. ; 1928 : : this->_Mysize - _Count);
  12939. ; 1929 : for (; ; --_Uptr)
  12940. ; 1930 : if (_Traits::eq(*_Uptr, *_Ptr)
  12941. ; 1931 : && _Traits::compare(_Uptr, _Ptr, _Count) == 0)
  12942. ; 1932 : return (_Uptr - this->_Myptr()); // found a match
  12943. ; 1933 : else if (_Uptr == this->_Myptr())
  12944. ; 1934 : break; // at beginning, no more chance for match
  12945. ; 1935 : }
  12946. ; 1936 :
  12947. ; 1937 : return (npos); // no match
  12948. ; 1938 : }
  12949. ; 1939 :
  12950. ; 1940 : size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const
  12951. ; 1941 : { // look for [_Ptr, <null>) beginning before _Off
  12952. ; 1942 : _DEBUG_POINTER(_Ptr);
  12953. ; 1943 : return (rfind(_Ptr, _Off, _Traits::length(_Ptr)));
  12954. ; 1944 : }
  12955. ; 1945 :
  12956. ; 1946 : size_type rfind(_Elem _Ch, size_type _Off = npos) const
  12957. ; 1947 : { // look for _Ch before _Off
  12958. ; 1948 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  12959. ; 1949 : }
  12960. ; 1950 :
  12961. ; 1951 : size_type find_first_of(const _Myt& _Right,
  12962. ; 1952 : size_type _Off = 0) const _NOEXCEPT
  12963. ; 1953 : { // look for one of _Right at or after _Off
  12964. ; 1954 : return (find_first_of(_Right._Myptr(), _Off, _Right.size()));
  12965. ; 1955 : }
  12966. ; 1956 :
  12967. ; 1957 : size_type find_first_of(const _Elem *_Ptr,
  12968. ; 1958 : size_type _Off, size_type _Count) const
  12969. ; 1959 : { // look for one of [_Ptr, _Ptr + _Count) at or after _Off
  12970. ; 1960 : #if _ITERATOR_DEBUG_LEVEL == 2
  12971. ; 1961 : if (_Count != 0)
  12972. ; 1962 : _DEBUG_POINTER(_Ptr);
  12973. ; 1963 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  12974. ; 1964 :
  12975. ; 1965 : if (0 < _Count && _Off < this->_Mysize)
  12976. ; 1966 : { // room for match, look for it
  12977. ; 1967 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  12978. ; 1968 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  12979. ; 1969 : _Uptr < _Vptr; ++_Uptr)
  12980. ; 1970 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  12981. ; 1971 : return (_Uptr - this->_Myptr()); // found a match
  12982. ; 1972 : }
  12983. ; 1973 :
  12984. ; 1974 : return (npos); // no match
  12985. ; 1975 : }
  12986. ; 1976 :
  12987. ; 1977 : size_type find_first_of(const _Elem *_Ptr,
  12988. ; 1978 : size_type _Off = 0) const
  12989. ; 1979 : { // look for one of [_Ptr, <null>) at or after _Off
  12990. ; 1980 : _DEBUG_POINTER(_Ptr);
  12991. ; 1981 : return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr)));
  12992. ; 1982 : }
  12993. ; 1983 :
  12994. ; 1984 : size_type find_first_of(_Elem _Ch,
  12995. ; 1985 : size_type _Off = 0) const
  12996. ; 1986 : { // look for _Ch at or after _Off
  12997. ; 1987 : return (find((const _Elem *)&_Ch, _Off, 1));
  12998. ; 1988 : }
  12999. ; 1989 :
  13000. ; 1990 : size_type find_last_of(const _Myt& _Right,
  13001. ; 1991 : size_type _Off = npos) const _NOEXCEPT
  13002. ; 1992 : { // look for one of _Right before _Off
  13003. ; 1993 : return (find_last_of(_Right._Myptr(), _Off, _Right.size()));
  13004. ; 1994 : }
  13005. ; 1995 :
  13006. ; 1996 : size_type find_last_of(const _Elem *_Ptr,
  13007. ; 1997 : size_type _Off, size_type _Count) const
  13008. ; 1998 : { // look for one of [_Ptr, _Ptr + _Count) before _Off
  13009. ; 1999 : #if _ITERATOR_DEBUG_LEVEL == 2
  13010. ; 2000 : if (_Count != 0)
  13011. ; 2001 : _DEBUG_POINTER(_Ptr);
  13012. ; 2002 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  13013. ; 2003 :
  13014. ; 2004 : if (0 < _Count && 0 < this->_Mysize)
  13015. ; 2005 : { // worth searching, do it
  13016. ; 2006 : const _Elem *_Uptr = this->_Myptr()
  13017. ; 2007 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  13018. ; 2008 : for (; ; --_Uptr)
  13019. ; 2009 : if (_Traits::find(_Ptr, _Count, *_Uptr) != 0)
  13020. ; 2010 : return (_Uptr - this->_Myptr()); // found a match
  13021. ; 2011 : else if (_Uptr == this->_Myptr())
  13022. ; 2012 : break; // at beginning, no more chance for match
  13023. ; 2013 : }
  13024. ; 2014 :
  13025. ; 2015 : return (npos); // no match
  13026. ; 2016 : }
  13027. ; 2017 :
  13028. ; 2018 : size_type find_last_of(const _Elem *_Ptr,
  13029. ; 2019 : size_type _Off = npos) const
  13030. ; 2020 : { // look for one of [_Ptr, <null>) before _Off
  13031. ; 2021 : _DEBUG_POINTER(_Ptr);
  13032. ; 2022 : return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr)));
  13033. ; 2023 : }
  13034. ; 2024 :
  13035. ; 2025 : size_type find_last_of(_Elem _Ch,
  13036. ; 2026 : size_type _Off = npos) const
  13037. ; 2027 : { // look for _Ch before _Off
  13038. ; 2028 : return (rfind((const _Elem *)&_Ch, _Off, 1));
  13039. ; 2029 : }
  13040. ; 2030 :
  13041. ; 2031 : size_type find_first_not_of(const _Myt& _Right,
  13042. ; 2032 : size_type _Off = 0) const _NOEXCEPT
  13043. ; 2033 : { // look for none of _Right at or after _Off
  13044. ; 2034 : return (find_first_not_of(_Right._Myptr(), _Off,
  13045. ; 2035 : _Right.size()));
  13046. ; 2036 : }
  13047. ; 2037 :
  13048. ; 2038 : size_type find_first_not_of(const _Elem *_Ptr,
  13049. ; 2039 : size_type _Off, size_type _Count) const
  13050. ; 2040 : { // look for none of [_Ptr, _Ptr + _Count) at or after _Off
  13051. ; 2041 : #if _ITERATOR_DEBUG_LEVEL == 2
  13052. ; 2042 : if (_Count != 0)
  13053. ; 2043 : _DEBUG_POINTER(_Ptr);
  13054. ; 2044 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  13055. ; 2045 :
  13056. ; 2046 : if (_Off < this->_Mysize)
  13057. ; 2047 : { // room for match, look for it
  13058. ; 2048 : const _Elem *const _Vptr = this->_Myptr() + this->_Mysize;
  13059. ; 2049 : for (const _Elem *_Uptr = this->_Myptr() + _Off;
  13060. ; 2050 : _Uptr < _Vptr; ++_Uptr)
  13061. ; 2051 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  13062. ; 2052 : return (_Uptr - this->_Myptr());
  13063. ; 2053 : }
  13064. ; 2054 : return (npos);
  13065. ; 2055 : }
  13066. ; 2056 :
  13067. ; 2057 : size_type find_first_not_of(const _Elem *_Ptr,
  13068. ; 2058 : size_type _Off = 0) const
  13069. ; 2059 : { // look for one of [_Ptr, <null>) at or after _Off
  13070. ; 2060 : _DEBUG_POINTER(_Ptr);
  13071. ; 2061 : return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  13072. ; 2062 : }
  13073. ; 2063 :
  13074. ; 2064 : size_type find_first_not_of(_Elem _Ch,
  13075. ; 2065 : size_type _Off = 0) const
  13076. ; 2066 : { // look for non _Ch at or after _Off
  13077. ; 2067 : return (find_first_not_of((const _Elem *)&_Ch, _Off, 1));
  13078. ; 2068 : }
  13079. ; 2069 :
  13080. ; 2070 : size_type find_last_not_of(const _Myt& _Right,
  13081. ; 2071 : size_type _Off = npos) const _NOEXCEPT
  13082. ; 2072 : { // look for none of _Right before _Off
  13083. ; 2073 : return (find_last_not_of(_Right._Myptr(), _Off, _Right.size()));
  13084. ; 2074 : }
  13085. ; 2075 :
  13086. ; 2076 : size_type find_last_not_of(const _Elem *_Ptr,
  13087. ; 2077 : size_type _Off, size_type _Count) const
  13088. ; 2078 : { // look for none of [_Ptr, _Ptr + _Count) before _Off
  13089. ; 2079 : #if _ITERATOR_DEBUG_LEVEL == 2
  13090. ; 2080 : if (_Count != 0)
  13091. ; 2081 : _DEBUG_POINTER(_Ptr);
  13092. ; 2082 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  13093. ; 2083 :
  13094. ; 2084 : if (0 < this->_Mysize)
  13095. ; 2085 : { // worth searching, do it
  13096. ; 2086 : const _Elem *_Uptr = this->_Myptr()
  13097. ; 2087 : + (_Off < this->_Mysize ? _Off : this->_Mysize - 1);
  13098. ; 2088 : for (; ; --_Uptr)
  13099. ; 2089 : if (_Traits::find(_Ptr, _Count, *_Uptr) == 0)
  13100. ; 2090 : return (_Uptr - this->_Myptr());
  13101. ; 2091 : else if (_Uptr == this->_Myptr())
  13102. ; 2092 : break;
  13103. ; 2093 : }
  13104. ; 2094 : return (npos);
  13105. ; 2095 : }
  13106. ; 2096 :
  13107. ; 2097 : size_type find_last_not_of(const _Elem *_Ptr,
  13108. ; 2098 : size_type _Off = npos) const
  13109. ; 2099 : { // look for none of [_Ptr, <null>) before _Off
  13110. ; 2100 : _DEBUG_POINTER(_Ptr);
  13111. ; 2101 : return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr)));
  13112. ; 2102 : }
  13113. ; 2103 :
  13114. ; 2104 : size_type find_last_not_of(_Elem _Ch,
  13115. ; 2105 : size_type _Off = npos) const
  13116. ; 2106 : { // look for non _Ch before _Off
  13117. ; 2107 : return (find_last_not_of((const _Elem *)&_Ch, _Off, 1));
  13118. ; 2108 : }
  13119. ; 2109 :
  13120. ; 2110 : _Myt substr(size_type _Off = 0, size_type _Count = npos) const
  13121. ; 2111 : { // return [_Off, _Off + _Count) as new string
  13122. ; 2112 : return (_Myt(*this, _Off, _Count, get_allocator()));
  13123. ; 2113 : }
  13124. ; 2114 :
  13125. ; 2115 : int compare(const _Myt& _Right) const _NOEXCEPT
  13126. ; 2116 : { // compare [0, _Mysize) with _Right
  13127. ; 2117 : return (compare(0, this->_Mysize, _Right._Myptr(), _Right.size()));
  13128. ; 2118 : }
  13129. ; 2119 :
  13130. ; 2120 : int compare(size_type _Off, size_type _N0,
  13131. ; 2121 : const _Myt& _Right) const
  13132. ; 2122 : { // compare [_Off, _Off + _N0) with _Right
  13133. ; 2123 : return (compare(_Off, _N0, _Right, 0, npos));
  13134. ; 2124 : }
  13135. ; 2125 :
  13136. ; 2126 : int compare(size_type _Off,
  13137. ; 2127 : size_type _N0, const _Myt& _Right,
  13138. ; 2128 : size_type _Roff, size_type _Count) const
  13139. ; 2129 : { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count)
  13140. ; 2130 : if (_Right.size() < _Roff)
  13141. ; 2131 : _Xran(); // _Off off end
  13142. ; 2132 : if (_Right._Mysize - _Roff < _Count)
  13143. ; 2133 : _Count = _Right._Mysize - _Roff; // trim _Count to size
  13144. ; 2134 : return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count));
  13145. ; 2135 : }
  13146. ; 2136 :
  13147. ; 2137 : int compare(const _Elem *_Ptr) const
  13148. ; 2138 : { // compare [0, _Mysize) with [_Ptr, <null>)
  13149. ; 2139 : _DEBUG_POINTER(_Ptr);
  13150. ; 2140 : return (compare(0, this->_Mysize, _Ptr, _Traits::length(_Ptr)));
  13151. ; 2141 : }
  13152. ; 2142 :
  13153. ; 2143 : int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const
  13154. ; 2144 : { // compare [_Off, _Off + _N0) with [_Ptr, <null>)
  13155. ; 2145 : _DEBUG_POINTER(_Ptr);
  13156. ; 2146 : return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr)));
  13157. ; 2147 : }
  13158. ; 2148 :
  13159. ; 2149 : int compare(size_type _Off,
  13160. ; 2150 : size_type _N0, const _Elem *_Ptr, size_type _Count) const
  13161. ; 2151 : { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count)
  13162. ; 2152 : #if _ITERATOR_DEBUG_LEVEL == 2
  13163. ; 2153 : if (_Count != 0)
  13164. ; 2154 : _DEBUG_POINTER(_Ptr);
  13165. ; 2155 : #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
  13166. ; 2156 :
  13167. ; 2157 : if (this->_Mysize < _Off)
  13168. ; 2158 : _Xran(); // _Off off end
  13169. ; 2159 : if (this->_Mysize - _Off < _N0)
  13170. ; 2160 : _N0 = this->_Mysize - _Off; // trim _N0 to size
  13171. ; 2161 :
  13172. ; 2162 : size_type _Ans = _Traits::compare(this->_Myptr() + _Off, _Ptr,
  13173. ; 2163 : _N0 < _Count ? _N0 : _Count);
  13174. ; 2164 : return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1
  13175. ; 2165 : : _N0 == _Count ? 0 : +1);
  13176. ; 2166 : }
  13177. ; 2167 :
  13178. ; 2168 : allocator_type get_allocator() const _NOEXCEPT
  13179. ; 2169 : { // return allocator object for values
  13180. ; 2170 : return (this->_Getal());
  13181. ; 2171 : }
  13182. ; 2172 :
  13183. ; 2173 : void _Chassign(size_type _Off, size_type _Count, _Elem _Ch)
  13184. ; 2174 : { // assign _Count copies of _Ch beginning at _Off
  13185. ; 2175 : if (_Count == 1)
  13186. ; 2176 : _Traits::assign(*(this->_Myptr() + _Off), _Ch);
  13187. ; 2177 : else
  13188. ; 2178 : _Traits::assign(this->_Myptr() + _Off, _Count, _Ch);
  13189. ; 2179 : }
  13190. ; 2180 :
  13191. ; 2181 : void _Copy(size_type _Newsize, size_type _Oldlen)
  13192. ; 2182 : { // copy _Oldlen elements to newly allocated buffer
  13193. ; 2183 : size_type _Newres = _Newsize | this->_ALLOC_MASK;
  13194. ; 2184 : if (max_size() < _Newres)
  13195. ; 2185 : _Newres = _Newsize; // undo roundup if too big
  13196. ; 2186 : else if (this->_Myres / 2 <= _Newres / 3)
  13197. ; 2187 : ;
  13198. ; 2188 : else if (this->_Myres <= max_size() - this->_Myres / 2)
  13199. ; 2189 : _Newres = this->_Myres
  13200. ; 2190 : + this->_Myres / 2; // grow exponentially if possible
  13201. ; 2191 : else
  13202. ; 2192 : _Newres = max_size(); // settle for max_size()
  13203. ; 2193 :
  13204. ; 2194 : _Elem *_Ptr;
  13205. ; 2195 : _TRY_BEGIN
  13206. ; 2196 : _Ptr = this->_Getal().allocate(_Newres + 1);
  13207. ; 2197 : _CATCH_ALL
  13208. ; 2198 : _Newres = _Newsize; // allocation failed, undo roundup and retry
  13209. ; 2199 : _TRY_BEGIN
  13210. ; 2200 : _Ptr = this->_Getal().allocate(_Newres + 1);
  13211. ; 2201 : _CATCH_ALL
  13212. ; 2202 : _Tidy(true); // failed again, discard storage and reraise
  13213. ; 2203 : _RERAISE;
  13214. ; 2204 : _CATCH_END
  13215. ; 2205 : _CATCH_END
  13216. ; 2206 :
  13217. ; 2207 : if (0 < _Oldlen)
  13218. ; 2208 : _Traits::copy(_Ptr, this->_Myptr(),
  13219. ; 2209 : _Oldlen); // copy existing elements
  13220. ; 2210 : _Tidy(true);
  13221. ; 2211 : this->_Getal().construct(&this->_Bx._Ptr, _Ptr);
  13222. ; 2212 : this->_Myres = _Newres;
  13223. ; 2213 : _Eos(_Oldlen);
  13224. ; 2214 : }
  13225. ; 2215 :
  13226. ; 2216 : void _Eos(size_type _Newsize)
  13227. ; 2217 : { // set new length and null terminator
  13228. ; 2218 : _Traits::assign(this->_Myptr()[this->_Mysize = _Newsize], _Elem());