lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fixing compiler warnings


From: Han-Wen Nienhuys
Subject: Re: fixing compiler warnings
Date: Mon, 27 Dec 2010 10:14:08 -0200

On Mon, Dec 27, 2010 at 9:51 AM, Reinhold Kainhofer
<address@hidden> wrote:
> Am Montag, 27. Dezember 2010, um 08:57:14 schrieb Werner LEMBERG:
>> I don't have too much experience with C++ code, however, being the
>> maintainer of groff, I have studied groff's code a lot, and no, it is
>> not common to throw exceptions.
>
> It's also not good C++ practice to throw exceptions when a virtual function is
> not overloaded by child classes. The proper thing to force child classes to
> implement a virtual function is to use pure virtual functions, ie. in the

I disagree with the common wisdom.  It is much more convenient to
provide a sane do-nothing method, especially if there are many derived
classes, large part of which will have some 'do-nothing' stubs for
some part of the interface.

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]