Pavel P
Pavel P

Reputation: 16877

How can I check if virtual methods are used inside constructors/destructors?

I'm sure that the big project I'm working on is plagued with this problem. Once, I even had to debug a bug related to that. Is it possible to write some sort of smart code that would catch this kind of calls? Or, perhaps, there are tools that can help to find these and other types of problems? (I'm using vs2008).

Upvotes: 2

Views: 86

Answers (1)

Sergey Kalinichenko
Sergey Kalinichenko

Reputation: 726889

Scott Meyers page lists several code checking tools (PC-Lint, CodeCheck, and CodeAdvisor) capable of issuing warnings for calls of virtual functions from constructors.

Upvotes: 2

Related Questions