VC++ Intellisense inherited members

Viewed 25

I have the following scenario in my code:

    class A {
        /// <summary>
        /// returns the total number of frames that the consumer can accept
        /// </summary>
        /// <returns></returns>
        virtual int GetRenderBufferSizeInFrames() = 0;
    }
    class B : public A {
        int GetRenderBufferSizeInFrames();
    }
    
void F() {
   B BInstance;
   BInstance.GetRenderBufferSizeInFrames(); // VC++ does not show the information about
                                            // the method
}

When I hover the mouse over the function call, VC++ does not show me the info on the function. Is there a way to fix that? Logically it should be doing that, no?

1 Answers

No, you need to be explicit about that. Try adding <inheritdoc/> to the derived method.

class B : public A {
        /// <inheritdoc />
        int GetRenderBufferSizeInFrames();
    }

As a side note, I suggest to use an override specifier, to ensure you don't have a typo in the method name and make it visibly clear that this is overriding a virtual method from the base class.

Related