Opened 21 years ago
Closed 20 years ago
#91 closed defect (wontfix)
hidden virtual function
| Reported by: | Víctor de Buen Remiro | Owned by: | Jorge |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Math | Version: | head |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Compiling TOL with Borland C++ I've found these potential errors
Warn : tol_bprdist.h(599,3):'BLaplaceDist::Inverse(BDat)' hides virtual
function 'BProbDist::Inverse(BDat,BDat)'
Warn : tol_bprdist.h(648,3):'BParetoDist::Inverse(BDat)' hides virtual
function 'BProbDist::Inverse(BDat,BDat)'
This is due to in BProbDist parent class the declaration of Inverse function is
virtual BDat Inverse (BDat prob, BDat tolerance = BDat::Tolerance());
This can became in very difficult to debug errors when Inverse is used as virtual
function.
So the correct declarations are
BLaplaceDist::Inverse(BDat, BDat tolerance = BDat::Tolerance());
BParetoDist::Inverse(BDat, BDat tolerance = BDat::Tolerance());
even if tolerance parameter will not be used.
Change History (2)
comment:1 Changed 21 years ago by
| Status: | new → assigned |
|---|---|
| Summary: | hidden virtual function → hidden virtual function |
comment:2 Changed 20 years ago by
| Resolution: | → wontfix |
|---|---|
| Status: | assigned → closed |

visual c & gcc does not complaint about that.