• Both algorithms move all elements of the source range [sourceBeg,sourceEnd) into the destina- tion range starting with destBeg or ending with destEnd, respectively. • Call for each element: *destElem=std::move(*sourceElem) Thus, if the element type provides move semantics, the value of the source elements becomes undefined, so the source element should no longer be used except to reinitialize or assign a new value to it. Otherwise, the elements are copied as with copy() or copy_backward() (see Section 11.6.1, page 557). • They return the position after the last copied element in the destination range (the first element that is not overwritten). • For move(), destBeg should not be part of [sourceBeg,sourceEnd). For move_backward(), destEnd should not be part of (sourceBeg,sourceEnd
- ทั้งขั้นตอนวิธีการย้ายองค์ประกอบทั้งหมดของแหล่งที่มาช่วง [ sourcebeg sourceend ) , ๆ , ในช่วงเริ่มต้น ด้วย destbeg หรือลงท้ายด้วย destend ตามลำดับ เรียกบริการสำหรับแต่ละองค์ประกอบ : * destelem = std : : ย้าย ( * sourceelem ) ดังนั้น หากมีการย้ายความหมายประเภทองค์ประกอบและคุณค่าของแหล่งธาตุกลายเป็นที่ไหนจึงเน็ดดังนั้น แหล่งธาตุ ไม่ควรใช้ยกเว้น reinitialize หรือกําหนดค่าใหม่ให้มัน มิฉะนั้น องค์ประกอบจะถูกคัดลอกด้วย copy() หรือ copy_backward() ( ดูมาตรา 11.6.1 หน้า 557 ) - พวกเขาคืนตำแหน่งหลังจากคัดลอกองค์ประกอบสุดท้ายในช่วงปลายทาง ( จึงตัดสินใจเดินทางองค์ประกอบที่ไม่ได้เขียนทับ ) - สำหรับ move() destbeg , ไม่ควรเป็นส่วนหนึ่งของ [ sourcebeg sourceend , )สำหรับ move_backward() destend , ไม่ควรเป็นส่วนหนึ่งของ ( sourcebeg sourceend ,
การแปล กรุณารอสักครู่..