Exceptions
Team LiB
Previous Section Next Section

Exceptions

NVI does not apply to destructors because of their special order of execution (see Item 50).

NVI does not directly support covariant return types for callers. If you need covariance that is visible to calling code without using dynamic_cast downcasts (see also Item 93), it's easier to make the virtual function public.

    Team LiB
    Previous Section Next Section