[Insight-developers] [Fwd: Undelivered Mail Returned to Sender]

Kent Williams kent at psychiatry.uiowa.edu
Mon Feb 20 14:31:42 EST 2006


The third option is to put in the concept check, and then set the class 
template parameter to a default value 3.  This preserves compatibility 
with old code, and allows new code to elide the integer parameter. At 
any rate, if the class requires 3D the concept check should be there. 

And I'm not Bill ;-)

Amy Squillacote wrote:

 > 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