[Insight-developers] KWStyle -- "Template definition doesn't match regular expression" warning

Bill Lorensen bill.lorensen at gmail.com
Fri Jun 11 16:41:02 EDT 2010


T - type
N,V - Variable

Maybe?

On Fri, Jun 11, 2010 at 4:18 PM, Matthew McCormick (thewtex)
<matt at mmmccormick.com> wrote:
>
>
> On Fri, Jun 11, 2010 at 2:50 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> Kent,
>>
>> For itk, there is a file:
>> Insight/Utilities/KWStyle/ITK.kws.xml.in that has some definitions (I
>> do not know where they are documented)
>> The line
>> <Template>[TNV]</Template>
>> seems to imply the template args must start with T, N or V. So yours
>> should be:
>> template <class TMaskType, unsigned VDimension> or probably better
>> template <class TMask, unsigned VDimension>
>
> On a side note, what are T, N, and V, supposed to stand for?
>
>>
>> Please do not shoot the messenger,
>>
>> Bill
>>
>> On Fri, Jun 11, 2010 at 3:15 PM, kent williams
>> <norman-k-williams at uiowa.edu> wrote:
>> > Here¹s the exact error message
>> >
>> > Processing ./BRAINSCommonLib/ReadMask.h
>> > Cannot open header file: headers/ITKHeader.h
>> > Error #0 (12) Line length exceed 83 (max=81)
>> > Error #0 (32) Line length exceed 101 (max=81)
>> > Error #17 (0) namespace not defined
>> > Error #14 (0) LoadMask_h v.s. __ReadMask_h
>> > Error #22 (15) Template definition (Dimension) doesn't match regular
>> > expression
>> >
>> > I¹m attaching the file
>> > On 6/11/10 11:01 AM, "Luis Ibanez" <luis.ibanez at kitware.com> wrote:
>> >
>> >>
>> >> Hi Kent,
>> >>
>> >> Could you please share:
>> >>
>> >> A) The exact error message that you get from KWStyle
>> >>
>> >> and
>> >>
>> >> B) The exact text of the line in which the error message
>> >>      is reported (including a couple of lines above and
>> >>      below will also be helpful).
>> >>
>> >>
>> >>    Thanks
>> >>
>> >>
>> >>         Luis
>> >>
>> >>
>> >>
>> >> --------------------------------
>> >> On Fri, Jun 11, 2010 at 10:15 AM, kent williams
>> >> <norman-k-williams at uiowa.edu>
>> >> wrote:
>> >>> We're trying to re-format a bunch of the Iowa BRAINS code to conform
>> >>> to the
>> >>> ITK Coding style, so I'm running KWStyle on it all.  I found the error
>> >>> message in the subject line almost comically baffling.
>> >>>
>> >>> What regular expression are template definitions supposed to match?
>> >>>  Even
>> >>> when I looked at the source code, it doesn't actually use
>> >>> regcomp/regexec,
>> >>> it has some ad hoc parsing code that doesn't readily reveal to the
>> >>> casual
>> >>> reader what it is trying to match.
>> >>>
>> >>> Not only that, but the error message is associated with this template
>> >>> definition:
>> >>>
>> >>> template <class TransformType, unsigned int ImageDimension>
>> >>>
>> >>> which seems straightforward to me.
>> >>>
>> >>> _______________________________________________
>> >>> Powered by www.kitware.com <http://www.kitware.com>
>> >>>
>> >>> Visit other Kitware open-source projects at
>> >>> http://www.kitware.com/opensource/opensource.html
>> >>>
>> >>> Kitware offers ITK Training Courses, for more information visit:
>> >>> http://kitware.com/products/protraining.html
>> >>>
>> >>> Please keep messages on-topic and check the ITK FAQ at:
>> >>> http://www.itk.org/Wiki/ITK_FAQ
>> >>>
>> >>> Follow this link to subscribe/unsubscribe:
>> >>> http://www.itk.org/mailman/listinfo/insight-developers
>> >>
>> >>
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://kitware.com/products/protraining.html
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.itk.org/mailman/listinfo/insight-developers
>> >
>> >
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>
>


More information about the Insight-developers mailing list