View Issue Details

IDProjectCategoryView StatusLast Update
0029961Open CASCADEOCCT:Foundation Classespublic2018-07-21 20:02
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.0.0 
Target Version7.4.0Fixed in Version7.4.0 
Summary0029961: Foundation Classes - NCollection_Shared constructor passes arguments by copy
DescriptionThe 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'
Steps To Reproduce
  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);
TagsNo tags attached.
Test case numberNot needed

Relationships

child of 0024023 closedabv Revamp the OCCT Handle 

Activities

git

2018-07-15 11:37

administrator   ~0077638

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

git

2018-07-15 11:39

administrator   ~0077639

Branch CR29961 has been updated forcibly by kgv.

SHA-1: 3f36c388ddd6707c7a99bc5a193f422075e71087

kgv

2018-07-15 12:09

developer   ~0077640

Patch is ready for review.

http://jenkins-test-11.nnov.opencascade.com/view/CR29961-master-KGV/

abv

2018-07-15 15:19

manager   ~0077641

No remarks, please integrate

bugmaster

2018-07-16 14:01

administrator   ~0077665

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

git

2018-07-21 20:02

administrator   ~0077887

Branch CR29961 has been deleted by inv.

SHA-1: 3f36c388ddd6707c7a99bc5a193f422075e71087

Related Changesets

occt: master 45117bfc

2018-07-15 08:35:12

kgv


Committer: bugmaster Details Diff
0029961: Foundation Classes - NCollection_Shared constructor passes arguments by copy

New NCollection_Shared constructors taking arguments by reference have been added.
Affected Issues
0029961
mod - src/NCollection/NCollection_Shared.hxx Diff File

Issue History

Date Modified Username Field Change
2018-07-15 11:14 kgv New Issue
2018-07-15 11:14 kgv Assigned To => abv
2018-07-15 11:15 kgv Relationship added child of 0024023
2018-07-15 11:15 kgv Product Version 7.3.0 => 7.0.0
2018-07-15 11:34 kgv Steps to Reproduce Updated
2018-07-15 11:37 git Note Added: 0077638
2018-07-15 11:39 git Note Added: 0077639
2018-07-15 12:09 kgv Note Added: 0077640
2018-07-15 12:09 kgv Status new => resolved
2018-07-15 15:19 abv Note Added: 0077641
2018-07-15 15:19 abv Assigned To abv => bugmaster
2018-07-15 15:19 abv Status resolved => reviewed
2018-07-16 14:01 bugmaster Test case number => Not needed
2018-07-16 14:01 bugmaster Note Added: 0077665
2018-07-16 14:01 bugmaster Status reviewed => tested
2018-07-21 18:39 bugmaster Changeset attached => occt master 45117bfc
2018-07-21 18:39 bugmaster Status tested => verified
2018-07-21 18:39 bugmaster Resolution open => fixed
2018-07-21 20:02 git Note Added: 0077887