[Insight-developers] itkConceptChecking.h

Luis Ibanez luis.ibanez at kitware.com
Wed Dec 10 15:39:11 EST 2008



---------- <code_coverage_shameless_propaganda> --------------

Fact:
=====

            Our current builds have zero warnings.


Deduction:
==========

   This indicates that the code where you have found this warning,
   has not been compiled as part of the normal test suite.



Advertisement:
==============


   Testing 80% of 158,745 lines of code is not good enough   :-)

   since it means that 31,749 lines of code have never been
   tested...  (maybe not even compiled...).



---------- </code_coverage_shameless_propaganda> --------------



    Luis



------------------------
Stephen Aylward wrote:
> Hi,
> 
> I believe there is a bug (or at least an obscurity) in the concept
> checking code for BracketOperator.   See the line below marked HERE
> 
> template <typename T1, typename T2=T1, typename T3=T1>
> struct BracketOperator
> {
>   struct Constraints
>     {
>     void constraints()
>       {
>       a = static_cast<T3>(b [ c ]);
>       const_constraints(b, c);
>       }
>     void const_constraints(const T1& d, const T2& e)
>       {
>       a = static_cast<T3>(b [ c ]);
>          <<<<< HERE
>       }
>     T3 a;
>     T1 b;
>     T2 c;
>     };
> 
> I've put in lines to avoid an unused variable warning for the two args
> to that function, but it seems as though the unused vars really should
> be used.    Perhaps there are missing lines:
> b = d
> c = e
> ?
> 
> Experts?
> 
> s
> 
> PS> Discovered this while fixing warnings....<insert Luis' and Bill's
> speeches about importance of warnings here> :)
> 


More information about the Insight-developers mailing list