View Issue Details

IDProjectCategoryView StatusLast Update
0027794Open CASCADEOCCT:Foundation Classespublic2016-12-09 16:38
ReporterabkAssigned Tokgv  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027794: A danger in the 'NCollection_Vector' initializing constructor
Description'NCollection_Vector' initializing constructor allows accidentally to use it by an improper way:

NCollection_Vector<NCollection_Vector<Standard_Integer> > aArrayArray;
aArrayArray.Append(10);

An empty array will be added to the variable instead of an array with element '10'.

It is proposed to solve the problem by using keyword 'explicit' for the constructor.
Steps To ReproduceThe following code is compiled successfully:

NCollection_Vector<NCollection_Vector<Standard_Integer> > aArrayArray;
aArrayArray.Append(10);
TagsNo tags attached.
Test case numberNot needed

Activities

git

2016-09-26 10:32

administrator   ~0058135

Branch CR27794 has been created by abv.

SHA-1: a67dc9bae84aab1045dc6755618cff810ba6f8e6


Detailed log of new commits:

Author: abv
Date: Mon Sep 26 10:32:06 2016 +0300

    0027794: A danger in the 'NCollection_Vector' initializing constructor
    
    Constructor of NCollection_Vector is now declared as explicit.

abv

2016-09-26 10:32

manager   ~0058136

Fix pushed to CR27794, please review

kgv

2016-09-26 11:03

developer   ~0058140

Please check compilation, regression testing is not needed.

apv

2016-09-27 14:47

tester   ~0058212

Dear BugMaster,

Branch CR27794 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms.
SHA-1: a67dc9bae84aab1045dc6755618cff810ba6f8e6

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1143

git

2016-10-28 21:45

administrator   ~0059499

Branch CR27794 has been deleted by kgv.

SHA-1: a67dc9bae84aab1045dc6755618cff810ba6f8e6

Related Changesets

occt: master 3a5a656c

2016-09-26 07:32:06

abv


Committer: kgv Details Diff
0027794: A danger in the 'NCollection_Vector' initializing constructor

Constructor of NCollection_Vector is now declared as explicit.
Affected Issues
0027794
mod - src/NCollection/NCollection_Vector.hxx Diff File

Issue History

Date Modified Username Field Change
2016-08-19 16:06 abk New Issue
2016-08-19 16:06 abk Assigned To => abv
2016-08-19 16:09 abk Summary A danger in the 'NCollection_Vector' constructor => A danger in the 'NCollection_Vector' initializing constructor
2016-08-19 16:09 abk Description Updated
2016-09-26 10:32 git Note Added: 0058135
2016-09-26 10:32 abv Note Added: 0058136
2016-09-26 10:32 abv Assigned To abv => kgv
2016-09-26 10:32 abv Status new => resolved
2016-09-26 11:03 kgv Note Added: 0058140
2016-09-26 11:03 kgv Assigned To kgv => bugmaster
2016-09-26 11:03 kgv Severity minor => integration request
2016-09-26 11:03 kgv Status resolved => reviewed
2016-09-26 11:03 kgv Product Version 7.0.0 =>
2016-09-26 12:40 apv Assigned To bugmaster => apv
2016-09-27 14:45 apv Test case number => Not needed
2016-09-27 14:47 apv Note Added: 0058212
2016-09-27 14:47 apv Assigned To apv => bugmaster
2016-09-27 14:47 apv Status reviewed => tested
2016-10-03 13:47 kgv Changeset attached => occt master 3a5a656c
2016-10-03 13:47 kgv Assigned To bugmaster => kgv
2016-10-03 13:47 kgv Status tested => verified
2016-10-03 13:47 kgv Resolution open => fixed
2016-10-28 21:45 git Note Added: 0059499
2016-12-09 16:30 aiv Status verified => closed
2016-12-09 16:38 aiv Fixed in Version => 7.1.0