MantisBT - Open CASCADE
View Issue Details
0029961Open CASCADE[OCCT] OCCT:Foundation Classespublic2018-07-15 11:142018-07-21 20:02
kgv 
bugmaster 
normalminor 
verifiedfixed 
[OCCT] 7.0.0 
[OCCT] 7.4.0 
Not needed
0029961: Foundation Classes - NCollection_Shared constructor passes arguments by copy
The following code:
  Standard_Mutex aMutex;
  Handle(NCollection_Shared<Standard_Mutex::Sentry>) aLock = new NCollection_Shared<Standard_Mutex::Sentry> 
(aMutex);
  aLock.Nullify();

produces compilation error:
error: C2248: 'Standard_Mutex::Standard_Mutex': cannot access private member declared in class 'Standard_Mutex'

  Standard_Mutex aMutex;
  Handle(NCollection_Shared<Standard_Mutex::Sentry>) aLock
    = new NCollection_Shared<Standard_Mutex::Sentry> (aMutex);

  struct Dummy1 { Dummy1 (Standard_Mutex& , int ) {} };
  Handle(NCollection_Shared<Dummy1>) aLock1
    = new NCollection_Shared<Dummy1> (aMutex, 2);

  struct Dummy2 { Dummy2 (int , Standard_Mutex& ) {} };
  Handle(NCollection_Shared<Dummy2>) aLock2
    = new NCollection_Shared<Dummy2> (2, aMutex);

  struct Dummy3 { Dummy3 (int , const double& ) {} };
  Handle(NCollection_Shared<Dummy3>) aLock3
    = new NCollection_Shared<Dummy3> (2, 3);

  struct Dummy4 { Dummy4 (Standard_Mutex& , Standard_Mutex& ) {} };
  Handle(NCollection_Shared<Dummy4>) aLock4
    = new NCollection_Shared<Dummy4> (aMutex, aMutex);
No tags attached.
child of 0024023closed abv Revamp the OCCT Handle 
Issue History
2018-07-15 11:14kgvNew Issue
2018-07-15 11:14kgvAssigned To => abv
2018-07-15 11:15kgvRelationship addedchild of 0024023
2018-07-15 11:15kgvProduct Version7.3.0 => 7.0.0
2018-07-15 11:34kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19510#r19510
2018-07-15 11:37gitNote Added: 0077638
2018-07-15 11:39gitNote Added: 0077639
2018-07-15 12:09kgvNote Added: 0077640
2018-07-15 12:09kgvStatusnew => resolved
2018-07-15 15:19abvNote Added: 0077641
2018-07-15 15:19abvAssigned Toabv => bugmaster
2018-07-15 15:19abvStatusresolved => reviewed
2018-07-16 14:01bugmasterTest case number => Not needed
2018-07-16 14:01bugmasterNote Added: 0077665
2018-07-16 14:01bugmasterStatusreviewed => tested
2018-07-21 18:39bugmasterChangeset attached => occt master 45117bfc
2018-07-21 18:39bugmasterStatustested => verified
2018-07-21 18:39bugmasterResolutionopen => fixed
2018-07-21 20:02gitNote Added: 0077887

Notes
(0077638)
git   
2018-07-15 11:37   
Branch CR29961 has been created by kgv.

SHA-1: bdbbdc9a8a151d55a2dd188cf001fb2ddaefe303


Detailed log of new commits:

Author: kgv
Date: Sun Jul 15 11:35:12 2018 +0300

    0029961: Foundation Classes - NCollection_Shared constructor passes arguments by copy
(0077639)
git   
2018-07-15 11:39   
Branch CR29961 has been updated forcibly by kgv.

SHA-1: 3f36c388ddd6707c7a99bc5a193f422075e71087
(0077640)
kgv   
2018-07-15 12:09   
Patch is ready for review.

http://jenkins-test-11.nnov.opencascade.com/view/CR29961-master-KGV/ [^]
(0077641)
abv   
2018-07-15 15:19   
No remarks, please integrate
(0077665)
bugmaster   
2018-07-16 14:01   
Combination -
OCCT branch : CR29961 SHA - 3f36c388ddd6707c7a99bc5a193f422075e71087
Products branch : master SHA - edc03a9d94e87d0141f8dbfdc1c42f755e9765d9
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings
(0077887)
git   
2018-07-21 20:02   
Branch CR29961 has been deleted by inv.

SHA-1: 3f36c388ddd6707c7a99bc5a193f422075e71087