[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fixing compiler warnings
From: |
David Kastrup |
Subject: |
Re: fixing compiler warnings |
Date: |
Mon, 27 Dec 2010 13:23:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Reinhold Kainhofer <address@hidden> writes:
> 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
> class definition:
>
> class Font_metric {
> ...
> virtual get_indexed_char_dimensions (size_t) = 0;
> ...
> };
Uh yes, I forgot.
--
David Kastrup