Overloading fails when reference parameters are involved
|
|
Bugzilla Link |
535 |
Created on |
Jul 28, 2009 10:50 |
Resolution |
WONTFIX |
Resolved on |
Aug 10, 2009 19:32 |
Version |
1.00beta |
OS |
Linux |
Architecture |
PC |
Extended Description
One would like to use the following overloading of functions in the
stdlib's FibreIO module:
double[*] FibreScanDoubleArray( File &stream);
double[*] FibreScanDoubleArray( TermFile &stream);
double[*] FibreScanDoubleArray( string stream);
double[*] FibreScanDoubleArray()
However, we get:
> ABORT: line 72 file: FibreIO.sac
> ABORT: Trying to overload function "FibreIO::FibreScanDoubleArray" that
> ABORT: expects 1 argument(s) and 1 return value(s) with a version that has
> ABORT: a signature differing in the number or position of reference args
> ABORT: only.
The instances do differ in the number of reference parameters, indeed, and I do
recall that there are some limitations in the implementation. Apart from
the fact that this is rather unfortunate, I don't think the error message
is spot on: There's also the string argument in the 3rd instance that the others lack.
I think it should be possible to distinguish the cases even at an early stage in the compilation.