[Insight-developers] Concept checking

Miller, James V (Research) millerjv at crd . ge . com
Tue, 3 Sep 2002 12:48:00 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C25369.A049F368
Content-Type: text/plain;
	charset="iso-8859-1"

To answer my own question (my gcc build finally hit the relevant code), with my proposed change, gcc
errors
with
 
/home/millerjv/nlm/Insight/Code/Common/itkConceptChecking.h:247: could not convert template argument
`itk::Concept::Comparable<short unsigned int>::Constraints::constraints' to `void
(itk::Concept::Comparable<short unsigned int>::Constraints::*)()'


-----Original Message-----
From: Miller, James V (Research) 
Sent: Tuesday, September 03, 2002 12:45 PM
To: Insight-developers (E-mail)
Subject: [Insight-developers] Concept checking


Is there any problem with changing line 45 of itkConceptChecking from
 
typedef Enforcer<&Constraints::constraints> EnforcerInstantiation

to
 
typedef Enforcer<Constraints::constraints> EnforcerInstantiation

If the "&" is there, the Borland compiler complains with a  "Must take address of a memory location"
error.
 
If this will cause a problem with the other compilers using the STANDARD implementation
of the ConceptCheckingMacro, I can either define a new version for the Borland compiler or
have the Borland compiler use the VTABLE approach.
 
 

Jim Miller 
_____________________________________
Visualization & Computer Vision
GE Research
Bldg. KW, Room C218B
P.O. Box 8, Schenectady NY 12301

millerjv@research.ge.com <mailto:millerjv@research.ge.com> 

james.miller@research.ge.com
(518) 387-4005, Dial Comm: 8*833-4005, 
Cell: (518) 505-7065, Fax: (518) 387-6981 

 

 


------_=_NextPart_001_01C25369.A049F368
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2715.400" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff size=2>
<DIV><SPAN class=096374616-03092002><FONT size=2>To answer my own question (my 
gcc build finally hit the relevant code), with my proposed change, gcc 
errors</FONT></SPAN></DIV>
<DIV><SPAN class=096374616-03092002><FONT size=2>with</FONT></SPAN></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT 
size=2>/home/millerjv/nlm/Insight/Code/Common/itkConceptChecking.h:247: could 
not convert template argument `itk::Concept::Comparable&lt;short unsigned 
int&gt;::Constraints::constraints' to `void (itk::Concept::Comparable&lt;short 
unsigned int&gt;::Constraints::*)()'<BR></FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Miller, James V (Research) 
  <BR><B>Sent:</B> Tuesday, September 03, 2002 12:45 PM<BR><B>To:</B> 
  Insight-developers (E-mail)<BR><B>Subject:</B> [Insight-developers] Concept 
  checking<BR><BR></FONT></DIV>
  <DIV><SPAN class=739024016-03092002><FONT size=2>Is there any problem with 
  changing line 45 of itkConceptChecking from</FONT></SPAN></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>typedef Enforcer&lt;&amp;Constraints::constraints&gt; 
  EnforcerInstantiation<BR></FONT></DIV>
  <DIV><FONT size=+0><SPAN class=739024016-03092002><FONT 
  size=2>to</FONT></SPAN></FONT></DIV>
  <DIV><FONT size=+0><SPAN class=739024016-03092002><FONT 
  size=2></FONT></SPAN>&nbsp;</DIV></FONT>
  <DIV><FONT size=+0><FONT size=2>typedef 
  Enforcer&lt;Constraints::constraints&gt; 
  EnforcerInstantiation<BR></FONT></FONT></DIV>
  <DIV><FONT size=+0><FONT size=2><SPAN class=739024016-03092002>If the "&amp;" 
  is there, the B</SPAN>o<SPAN class=739024016-03092002>rland compiler 
  complains&nbsp;with a &nbsp;"Must take address of a memory location" 
  error.</SPAN></FONT></FONT></DIV>
  <DIV><FONT size=+0><FONT size=2><SPAN 
  class=739024016-03092002></SPAN></FONT></FONT>&nbsp;</DIV>
  <DIV><FONT size=+0><FONT size=2><SPAN class=739024016-03092002>If this will 
  cause a problem with the other compilers using the STANDARD 
  implementation</SPAN></FONT></FONT></DIV>
  <DIV><FONT size=+0><FONT size=2><SPAN class=739024016-03092002>of the 
  ConceptCheckingMacro, I can either define a new version for the Borland 
  compiler or</SPAN></FONT></FONT></DIV>
  <DIV><FONT size=+0><FONT size=2><SPAN class=739024016-03092002>have the 
  Borland compiler use the VTABLE approach.</SPAN></FONT></FONT></DIV>
  <DIV><FONT size=+0><FONT size=2><SPAN 
  class=739024016-03092002></SPAN></FONT></FONT>&nbsp;</DIV>
  <DIV><FONT size=+0><FONT size=2><SPAN 
  class=739024016-03092002></SPAN></FONT></FONT>&nbsp;<o:p></o:p></DIV>
  <DIV class=Section1>
  <P style="MARGIN: 0in 0in 0pt"><B><SPAN 
  style="COLOR: navy; FONT-FAMILY: 'Comic Sans MS'">Jim Miller</SPAN></B> 
  <BR><B><I><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Arial">_____________________________________</SPAN></I></B><BR><EM><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">Visualization &amp; 
  Computer Vision</SPAN></EM><I><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial"><BR><EM>GE 
  Research</EM><BR><EM>Bldg. KW, Room C218B</EM><BR><EM>P.O. Box 8, Schenectady 
  NY 12301</EM><BR><BR></SPAN></I><EM><U><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: blue"><A 
  href="mailto:millerjv@research.ge.com">millerjv@research.ge.com</A></SPAN></U></EM></P>
  <P style="MARGIN: 0in 0in 0pt"><EM><U><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: blue">james.miller@research.ge.com</SPAN></U></EM><BR><I><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">(518) 387-4005, 
  Dial Comm: 8*833-4005, </SPAN></I><BR><I><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">Cell: (518) 
  505-7065, Fax: (518) 387-6981</SPAN></I> </P>
  <P class=MsoNormal>&nbsp;<o:p></o:p></P></DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C25369.A049F368--