Menu

#366 C++ overloading vs fully qualified names

QM
open
None
1
2024-08-14
2024-08-13
Anonymous
No

I've found an issue with the QM tools "Fully qualified name" is not enough to differentiate between overloaded functions in C++.

Here is the scenario:
Package // package name
|-> Function : void // function with return type void
|-> Function: bool // function overload with return type bool

Assuming both functions are inline.

When I do:
$declare ${Package}
both functions are generated.
However, if I want to use the fully qualified name
$declare ${Package::Function}
Only the first one on the list is generated. And I cannot find a way to specifically differentiate between the two.

I've tried the drag and drop method from the Model Explorer, and both functions have the same fully qualified name.

Discussion

  • Quantum Leaps

    Quantum Leaps - 2024-08-13

    Thank you for reporting, but before taking a deeper look, it seems that you're trying to overload a function on its return type. Such overloading was never allowed in C++, so perhaps the issue is moot anyway. Please check.
    --MMS

     
  • Anonymous

    Anonymous - 2024-08-14

    You are correct, this is just a consequence of me trying to provide a quick reduced example without giving it too much thought. However, the limitation with QM is still there. In reality the overload was not on the return type.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB