[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: gcc -Woverloaded-virtual
From: Aurélien Gâteau <aurelien.gateau () free ! fr>
Date: 2007-11-26 16:54:40
Message-ID: fietog$77b$1 () ger ! gmane ! org
[Download RAW message or body]
David Faure wrote:
> On Monday 26 November 2007, Aurélien Gâteau wrote:
>> David Faure wrote:
>> >> I am afraid this will lead to problems if one is overloaded and not
>> >> the other.
>> >
>> > ... which is exactly what the -Woverloaded-virtual warning will detect
>> > :-)
>>
>> I mean, what happens if addSubjob(KJob*) is overloaded, but not
>> addSubjob(KJob*, bool)? I don't think -Woverloaded-virtual will notice
>> any problem.
>
> Yes it will, it's exactly what the warning is about: reimplementing a
> virtual method which has overloads and not reimplementing the overloads.
Just wrote a little test code to illustrate my point and... found out you
are right :-)
Aurélien
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic