Explicit-ness
    Allen Winter 
    winter at kde.org
       
    Thu Aug 31 10:12:02 BST 2006
    
    
  
On Thursday 31 August 2006 04:57, David Jarvie wrote:
> On Thursday 31 August 2006 1:35, Allen Winter wrote:
> >On Wednesday 30 August 2006 18:59, Thiago Macieira wrote:
> >> Allen Winter wrote:
> >> > - 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
> >> 
> >> One more rule:
> >> - constructor is not intentionally implicit
> >> 
> >> I have no idea how to detect that last one. But it is a valid use-case.
> >> 
> >Yeah, I just ran into just such a case.
> >
> >For now I will have Krazy ignore lines with a C++ comment saying
> >to keep the constructor explicit, or that is should be implicit.
> >
> >All the following will be ignored, for example:
> >   Duration(int seconds);  //implicit
> >   Duration(int seconds); // not explicit
> >   Duration(int seconds): //please do not make explicit
> 
> Do you mean these exact comments, or are they just examples? 
They are just examples.
Basically Krazy will skip the explicitness check on lines that contain
the word "explicit" or the word "implicit".
>I think that a keyword
> (analogous to apidox ones) would be better so that  people can word the comments
> as they like as long as the keyword is included. 
> 
maybe we should just skip any line that contains the string "krazyskipme"
in a C++ comment??
i.e.
next if ($line =~ +//.*krazyskipme+);
-- 
KDE: Same Thing We Do Everyday... Try to Conquer the World
    
    
More information about the kde-core-devel
mailing list