Menu

#83 Overridden methods do not override base class methods in REST API.

3.x
closed
None
2025-05-01
2022-09-12
No
struct Base
{
   void foo(double);
 };

 struct Derived: public Base
 {
  void foo(double);
 };

 Derived derived;

In REST API, calling derived/foo calls Base:: foo(), not Derived::foo(). Not a problem for virtual methods of course, so the workaround is to never override non-virtual functions.

The problem is the use of multimaps to handle overloaded methods - we need to check if a method of the same signature exists from a base class, and replace it if so, rather than appending to the multimap.

Discussion

  • High Performance Coder

    • status: open --> closed
    • assigned_to: High Performance Coder
     
  • High Performance Coder

    This is now fixed - most of the work done some time ago, with a recent fix to the partial override of overloaded methods.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB