[Insight-developers] concept checking and backward compatibility

Amy Squillacote amy.squillacote at kitware.com
Mon Feb 20 14:24:12 EST 2006


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