MantisBT - Open CASCADE
View Issue Details
0026549Open CASCADE[OCCT] OCCT:Foundation Classespublic2015-08-11 22:592016-04-20 15:51
abv 
abv 
normalintegration request 
closedfixed 
 
[OCCT] 7.0.0[OCCT] 7.0.0 
0026549: Provide move constructors and operators for basic classes
C++11 introduces notion of rvalue references which can be used to avoid unnecessary copying of temporary objects, see http://www.artima.com/cppsource/rvalue.html [^]

Rvalue references are supported by VC++ 10 and above, and by GCC 4.3 and above, thus they can be used in modern OCCT (since 0024023).

The first candidates for this improvement are Handles and collections.
No tags attached.
related to 0024023closed abv Open CASCADE Revamp the OCCT Handle 
related to 0027111closed abv Community Add generalized copy constructor in handle class for old compilers 
Issue History
2015-08-11 22:59abvNew Issue
2015-08-11 22:59abvAssigned To => abv
2015-08-11 22:59abvRelationship addedrelated to 0024023
2015-08-12 07:22gitNote Added: 0044006
2015-08-12 07:28abvNote Added: 0044007
2016-01-22 19:32abvNote Added: 0050080
2016-01-23 14:12abvNote Edited: 0050080bug_revision_view_page.php?bugnote_id=50080#r12814
2016-02-16 11:39kgvNote Added: 0050798
2016-02-16 11:39kgvAssigned Toabv => bugmaster
2016-02-16 11:39kgvStatusnew => resolved
2016-02-16 11:39kgvStatusresolved => reviewed
2016-02-16 11:41kgvRelationship addedrelated to 0027111
2016-02-19 10:34bugmasterStatusreviewed => tested
2016-02-19 10:38bugmasterNote Added: 0050990
2016-02-21 08:52abvChangeset attached => occt master 5d351a08
2016-02-21 08:52abvAssigned Tobugmaster => abv
2016-02-21 08:52abvStatustested => verified
2016-02-21 08:52abvResolutionopen => fixed
2016-04-17 15:07gitNote Added: 0053254
2016-04-20 15:42aivFixed in Version => 7.0.0
2016-04-20 15:51aivStatusverified => closed

Notes
(0044006)
git   
2015-08-12 07:22   
Branch CR26549 has been created by abv.

SHA-1: f04f725c49f684a3b7abd65d21b280b7b7c6e883


Detailed log of new commits:

Author: abv
Date: Tue Aug 11 23:01:05 2015 +0300

    0026549: Provide move constructors and operators for basic classes
    
    Move constructor and operator added for opencascade::handle<>
(0044007)
abv   
2015-08-12 07:28   
First version is pushed to CR26549. It provides move semantics for Handles. Though it does not give noticeable change in performance in tests, it reduces number of calls to Standard_Transient::IncrementRefCounter() methods of Handle, and thus is potentially useful (especially in multithreaded programs, as each call sets a lock).

The measured numbers of calls are:

| Operation | master | CR26549 |
|----------------------------------|
| DRAW start | 4075 | 4075 |
| pload ALL | 137767 | 128967 |
| bottle.tcl | 30749697 | 30440160 |
(0050080)
abv   
2016-01-22 19:32   
(edited on: 2016-01-23 14:12)
Other classes for which move semantics would be useful are vector and matrix classes from math package.

(0050798)
kgv   
2016-02-16 11:39   
Related modification within CR27111_6 has been reviewed without remarks.
Should be tested in scope of 0027111.
(0050990)
bugmaster   
2016-02-19 10:38   
Tested in framework of branch CR27111_6
(0053254)
git   
2016-04-17 15:07   
Branch CR26549 has been deleted by kgv.

SHA-1: f04f725c49f684a3b7abd65d21b280b7b7c6e883