[Insight-users] Borland 6 Build error

Luis Ibanez luis.ibanez@kitware.com
Mon, 25 Nov 2002 11:10:03 -0500


Hi John,


could you try the following standalone code.
This is probably the minimal example of what
is being done in the Inverse() method on the
AffineTransform. (as long as templates go).

====================================

template< typename T>
class FooPointer {
public:
    FooPointer( T * inp) { p = inp; }
    FooPointer( const FooPointer & pp ) { p = pp.p; }
    T * operator->() { return p; }
private:
    T * p;
};
	

template < typename T, unsigned int N >
class Affine
{
public:

   typedef Affine Self;
   typedef FooPointer<Self> Pointer;
public:
   Pointer Inverse() const;
};


template < typename T, unsigned int N >
typename Affine<T,N>::Pointer
Affine<T,N>
::Inverse() const
{
   return new Self;
}


int main()
{
   typedef Affine<double,3>    AffineType;
   typedef AffineType::Pointer AffinePointer;
   AffinePointer aff = new AffineType;
   AffinePointer inv = aff->Inverse();
   return 0;
}


====================================

Please let us know what you find.

  Thanks


   Luis


======================================
John Biddiscombe wrote:

> Luis,
> 
> Neither of these work. 
>   AffineTransform::Pointer Inverse(void) const;
>   Pointer Inverse(void) const;
>   Self::Pointer Inverse(void) const;
> Sob sob.
> 
> I tried adjusting a few things without any success.
> 
> 
>>BTW we are not making any changes to the repository.
>>
> 
> Of course.
> 
> JB
> Head scratching.
> 
> 
>