View Issue Details

IDProjectCategoryView StatusLast Update
0029230Open CASCADEOCCT:Foundation Classespublic2020-10-08 11:45
Reporterkgv Assigned Tokgv  
PrioritynormalSeverityfeature 
Status closedResolutionwon't fix 
Summary0029230: Foundation Classes - provide move constructors for basic collections
DescriptionMove constructors can be used for code optimization, and should be provided for basic collections.
Steps To ReproduceN/A
TagsNo tags attached.
Test case number

Relationships

related to 0028470 closedbugmaster Foundation Classes, NCollection_Array1 - add Resize() method for re-allocating array with new limits 
parent of 0029258 closedbugmaster Foundation Classes - provide move constructors for string classes 

Activities

git

2017-10-15 16:08

administrator   ~0071500

Branch CR29230 has been created by kgv.

SHA-1: 5d7d2585f3e6615987bbe6f5762a75258cedc351


Detailed log of new commits:

Author: kgv
Date: Sun Oct 15 16:08:01 2017 +0300

    0029230: Foundation Classes - provide move constructors for basic collections
    
    Standard_NO_RVALUE_REFERENCE - added new macros disabling
    move constructors on obsolete compilers.
    
    NCollection_Array1 - added method Exchange().
    
    NCollection_Array2 - added methods Resize(), Move(), Exchange()
    and move constructor + operator.
    
    NCollection_Map, NCollection_DataMap, NCollection_DoubleMap,
    NCollection_IndexedDataMap, NCollection_IndexedMap - added
    method Move() and move constructor + operator.
    
    NCollection_Sequence, NCollection_Vector, NCollection_List,
    TCollection_AsciiString, TCollection_ExtendedString,
    NCollection_UtfString - added methods
    Move(), Exchange() and move constructor + operator.
    
    NCollection_SparseArray - added method Move().

git

2017-10-15 16:27

administrator   ~0071501

Branch CR29230 has been updated forcibly by kgv.

SHA-1: fa1b95b7cad53341e585ccf2fbdf9125fd34ac06

git

2017-10-15 18:30

administrator   ~0071502

Branch CR29230 has been updated forcibly by kgv.

SHA-1: 77022217799c2af4e5117239ec64782fbaa918a9

git

2017-10-15 18:32

administrator   ~0071503

Branch CR29230 has been updated forcibly by kgv.

SHA-1: 4853d53bbc684d869544ebc843492af4d76a150b

git

2017-10-15 19:33

administrator   ~0071504

Branch CR29230 has been updated forcibly by kgv.

SHA-1: f54463a5aefb21ba28bf22cbe58ff984a9a601fb

kgv

2017-10-15 21:54

developer   ~0071506

Patch is ready for review.

abv

2017-10-25 09:20

manager   ~0071765

In my opinion, we need some proof that these methods are useful, and code that tests them, before they can be integrated.

Within OCCT, move constructors and assignments are called only for TCollection and NCollection strings (checked by compilation with VS 2017 while declaring all these methods deprecated), in around 1000 places. Thus, these seem to make sense.

For other classes move constructors and assignments never get called. This means they are useless, at least within current code of OCCT. I believe they could be useful in some circumstances, e.g. when you have a map of such objects and add a new object to the map. However, currently this does not seem to happen. Perhaps something should be done to enable this opportunity (e.g. add overloaded method Add() for map supporting move semantics), but if can also happen that this does not make sense. This is to be investigated.

git

2017-10-25 10:56

administrator   ~0071768

Branch CR29230 has been updated forcibly by kgv.

SHA-1: 3eb05f0cf0e7bf946e6c52dea308ab4590c41a0c

git

2017-10-25 11:08

administrator   ~0071770

Branch CR29230_1 has been created by kgv.

SHA-1: 5634d1e5c2ae2b2b9c231f9c8e645dff779990ce


Detailed log of new commits:

Author: kgv
Date: Wed Oct 25 11:08:13 2017 +0300

    0029230: Foundation Classes - provide move constructors for basic collections
    
    NCollection_Array1 - added method Swap().
    
    NCollection_Array2 - added methods Resize(), Move(), Swap()
    and move constructor + operator.
    
    NCollection_Map, NCollection_DataMap, NCollection_DoubleMap,
    NCollection_IndexedDataMap, NCollection_IndexedMap - added
    method Move() and move constructor + operator.
    
    NCollection_Sequence, NCollection_Vector, NCollection_List - added methods
    Move(), Swap() and move constructor + operator.
    
    NCollection_SparseArray - added method Move().

git

2020-10-08 11:02

administrator   ~0095827

Branch CR29230_1 has been deleted by inv.

SHA-1: 5634d1e5c2ae2b2b9c231f9c8e645dff779990ce

git

2020-10-08 11:02

administrator   ~0095828

Branch CR29230 has been deleted by inv.

SHA-1: 3eb05f0cf0e7bf946e6c52dea308ab4590c41a0c

Issue History

Date Modified Username Field Change
2017-10-15 10:58 kgv New Issue
2017-10-15 10:58 kgv Assigned To => abv
2017-10-15 16:08 git Note Added: 0071500
2017-10-15 16:27 git Note Added: 0071501
2017-10-15 18:30 git Note Added: 0071502
2017-10-15 18:32 git Note Added: 0071503
2017-10-15 19:33 git Note Added: 0071504
2017-10-15 20:48 kgv Relationship added related to 0028470
2017-10-15 21:54 kgv Note Added: 0071506
2017-10-15 21:54 kgv Status new => resolved
2017-10-25 09:20 abv Note Added: 0071765
2017-10-25 09:20 abv Assigned To abv => kgv
2017-10-25 09:20 abv Status resolved => feedback
2017-10-25 10:52 kgv Relationship added parent of 0029258
2017-10-25 10:56 git Note Added: 0071768
2017-10-25 11:08 git Note Added: 0071770
2017-10-25 12:20 kgv Status feedback => assigned
2019-09-04 13:04 abv Target Version 7.4.0 => 7.5.0
2019-11-07 14:50 bugmaster Category OCCT:Foundation Classes => PRODUCTS:Advanced wrappers
2019-11-08 17:48 kgv Category PRODUCTS:Advanced wrappers => OCCT:Foundation Classes
2020-08-28 14:26 kgv Target Version 7.5.0 => 7.6.0
2020-10-07 11:02 abv Status assigned => closed
2020-10-07 11:02 abv Resolution open => won't fix
2020-10-07 11:02 abv Target Version 7.6.0 =>
2020-10-08 11:02 git Note Added: 0095827
2020-10-08 11:02 git Note Added: 0095828