MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029230Open CASCADE[OCCT] OCCT:Foundation Classespublic2017-10-15 10:582017-10-25 12:20
Reporterkgv 
Assigned Tokgv 
PrioritynormalSeverityfeature 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
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
Attached Files

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

-  Notes
(0071500)
git (administrator)
2017-10-15 16:08

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().
(0071501)
git (administrator)
2017-10-15 16:27

Branch CR29230 has been updated forcibly by kgv.

SHA-1: fa1b95b7cad53341e585ccf2fbdf9125fd34ac06
(0071502)
git (administrator)
2017-10-15 18:30

Branch CR29230 has been updated forcibly by kgv.

SHA-1: 77022217799c2af4e5117239ec64782fbaa918a9
(0071503)
git (administrator)
2017-10-15 18:32

Branch CR29230 has been updated forcibly by kgv.

SHA-1: 4853d53bbc684d869544ebc843492af4d76a150b
(0071504)
git (administrator)
2017-10-15 19:33

Branch CR29230 has been updated forcibly by kgv.

SHA-1: f54463a5aefb21ba28bf22cbe58ff984a9a601fb
(0071506)
kgv (developer)
2017-10-15 21:54

Patch is ready for review.
(0071765)
abv (manager)
2017-10-25 09:20

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.
(0071768)
git (administrator)
2017-10-25 10:56

Branch CR29230 has been updated forcibly by kgv.

SHA-1: 3eb05f0cf0e7bf946e6c52dea308ab4590c41a0c
(0071770)
git (administrator)
2017-10-25 11:08

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().

- 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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker