Non-Virtuals Call Protected Non-Overloaded Virtuals idiom

Discussion in 'C++' started by ittium, Dec 15, 2011.

  1. ittium

    ittium Guest

    Group,
    My doubt is regarding Public Overloaded Non-Virtuals Call Protected
    Non-Overloaded Virtuals idiom, defined as part of following FAQ.
    http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.3.

    Here to avoid hiding of overloaded (virtual/non-virtual) functions it is
    suggested that these functions be made non-virtual (if originally
    virtual) and call non-overloaded virtual versions providing similar
    functionality.

    I am not sure how this is solving the issue, since although not virtual
    now, overloaded function will still be inherited by derived class and
    derived class still can hide the function by defining overloaded
    function with the same name.
    thanks
    Ittium
     
    ittium, Dec 15, 2011
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    2
    Views:
    737
    Andreas Klemt
    Jul 5, 2003
  2. Mark Horrocks

    Bins and virtuals

    Mark Horrocks, Aug 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    470
    Curt_C [MVP]
    Aug 31, 2004
  3. Thomas Kowalski

    Hiding rule and pure virtuals

    Thomas Kowalski, Aug 24, 2006, in forum: C++
    Replies:
    3
    Views:
    457
    Default User
    Aug 24, 2006
  4. Ole Nielsby
    Replies:
    4
    Views:
    485
    Ole Nielsby
    Sep 29, 2006
  5. mlimber
    Replies:
    14
    Views:
    889
    mlimber
    Jan 3, 2007
  6. Jo
    Replies:
    14
    Views:
    625
  7. greek_bill
    Replies:
    6
    Views:
    447
    greek_bill
    Jun 8, 2007
  8. srp113
    Replies:
    4
    Views:
    439
    Juha Nieminen
    Aug 29, 2009
Loading...