Explicit-ness

Allen Winter winter at kde.org
Wed Aug 30 23:03:21 BST 2006


Howdy,

I'm working on a need Krazy plugin that checks for constructors that should be
declared explicit according to the following rules:

 - constructor must be public
 - constructor must have exactly 1 required argument 
 - constructor may have 1 or more optional arguments
 - a class may have more than constructor declared 'explicit'
 - copy constructors should not be declared 'explicit'
 - templates ignored

Any other requirements I should add?

I hope to install this plugin into Krazy on the EBN for tomorrow's run.

Here's sample output from kdelibs/kdecore
==================================
Total Issues = 4 ...as of August 30 2006 18:00:09

1. Check for C++ ctors that should be declared 'explicit'...  OOPS! 4 issues found!
        kshortcut.h: line#75,82,105 (3)
        kuniqueapplication_p.h: line#31 (1)

-- 
KDE: Same Thing We Do Everyday... Try to Conquer the World





More information about the kde-core-devel mailing list