Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 403
    • Issues 403
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2063
Closed
Open
Created Jul 28, 2009 by Clemens Grelck@cgDeveloper

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.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking