View Issue Details

IDProjectCategoryView StatusLast Update
0024407Open CASCADEOCCT:Foundation Classespublic2019-10-05 11:11
ReporterszvAssigned Toabv 
PrioritynormalSeverityfeature 
Status closedResolutionwon't fix 
Product Version6.6.0 
Summary0024407: Extend Handle by implicit DownCast capabilities
DescriptionIt could be useful to extend Handle types by additional constructor and assignment operator that would provide implicit DownCast capabilities, to do something like this:

Handle(Geom_Curve) aCurve = ...; // Get a curve from somewhere
Handle(Geom_Circle) aCircle1(aCurve); // Now it is impossible
Handle(Geom_Circle) aCircle2 = aCurve; // Now it is impossible

The new approach could help reduce the amount of code.
TagsNo tags attached.
Test case number

Activities

abv

2019-10-05 11:11

manager   ~0087854

Implicit downcasting can be quite dangerous, requiring explicit call to method DownCast() makes this non-trivial action more explicit (and is consistent with common approach adopted in C++ standard library), thus closing

Issue History

Date Modified Username Field Change
2013-11-27 11:54 szv New Issue
2013-11-27 11:54 szv Assigned To => abv
2019-10-05 11:11 abv Note Added: 0087854
2019-10-05 11:11 abv Status new => closed
2019-10-05 11:11 abv Resolution open => won't fix