Archived issue #0029961
Foundation Classes - NCollection_Shared constructor passes arguments by copy
Description
The following code:
produces compilation error:
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);
Public activity
6 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sun Jul 15 11:35:12 2018 +0300
0029961: Foundation Classes - NCollection_Shared constructor passes arguments by copy
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sun Jul 15 11:35:12 2018 +0300
0029961: Foundation Classes - NCollection_Shared constructor passes arguments by copy
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
No remarks, please integrate
Combination -
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records