[Insight-developers] RE: concept checking and backward compatibility

Lorensen, William E (GE, Research) lorensen at crd.ge.com
Mon Feb 20 14:38:19 EST 2006


Which class is it? If it produces a compiler error for n!=3 then either choice is OK. What we don't want is code that used to compile and will not compile with the changes.

Bill

-----Original Message-----
From: Amy Squillacote [mailto:amy.squillacote at kitware.com]
Sent: Monday, February 20, 2006 2:24 PM
To: Lorensen, William E (GE, Research)
Cc: insight-developers at itk.org
Subject: concept checking and backward compatibility


Dear Bill,

As part the revision for introducing concept checking, we encountered 
the following case and we are wondering what is the appropriate way 
to proceed based on the backward compatibility polity.

We have a class templated over an integer n, but the code will only 
compile when n is a specific value (in this case, 3).  We could 
introduce a new concept for a template parameter to be a specific 
value, or we could remove the template parameter and force n to be 3.

The first option respects the API, but will be awkward because the 
class is not really general since only a single value of the template 
parameter is valid.

The second option breaks the API, but can arguably be called a bug 
fix because the code is actually broken for other values of n.

Please give us your input.

- Amy



More information about the Insight-developers mailing list