View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029230 | Open CASCADE | OCCT:Foundation Classes | public | 2017-10-15 10:58 | 2020-10-08 11:45 |
Reporter | kgv | Assigned To | kgv | ||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | won't fix | ||
Summary | 0029230: Foundation Classes - provide move constructors for basic collections | ||||
Description | Move constructors can be used for code optimization, and should be provided for basic collections. | ||||
Steps To Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
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(). |
|
Branch CR29230 has been updated forcibly by kgv. SHA-1: fa1b95b7cad53341e585ccf2fbdf9125fd34ac06 |
|
Branch CR29230 has been updated forcibly by kgv. SHA-1: 77022217799c2af4e5117239ec64782fbaa918a9 |
|
Branch CR29230 has been updated forcibly by kgv. SHA-1: 4853d53bbc684d869544ebc843492af4d76a150b |
|
Branch CR29230 has been updated forcibly by kgv. SHA-1: f54463a5aefb21ba28bf22cbe58ff984a9a601fb |
|
Patch is ready for review. |
|
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. |
|
Branch CR29230 has been updated forcibly by kgv. SHA-1: 3eb05f0cf0e7bf946e6c52dea308ab4590c41a0c |
|
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(). |
|
Branch CR29230_1 has been deleted by inv. SHA-1: 5634d1e5c2ae2b2b9c231f9c8e645dff779990ce |
|
Branch CR29230 has been deleted by inv. SHA-1: 3eb05f0cf0e7bf946e6c52dea308ab4590c41a0c |
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 |
|
Note Added: 0071765 | |
2017-10-25 09:20 |
|
Assigned To | abv => kgv |
2017-10-25 09:20 |
|
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 |
|
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 |
|
Status | assigned => closed |
2020-10-07 11:02 |
|
Resolution | open => won't fix |
2020-10-07 11:02 |
|
Target Version | 7.6.0 => |
2020-10-08 11:02 | git | Note Added: 0095827 | |
2020-10-08 11:02 | git | Note Added: 0095828 |