[Insight-users] itkSTLContainerAdaptorTest - fix for Borland

Dean Inglis dean.inglis@on.aibn.com
Wed, 27 Nov 2002 12:04:52 -0500


Hi,

can you test (on other platforms) the following casting in
Insight/Code/Common/itkVectorContainer.h: lines 103, 107

  /** Cast the container to a STL container type */
  STLContainerType & CastToSTLContainer() {
     return static_cast<STLContainerType
&>(static_cast<STLContainerType>(*this)); }

  /** Cast the container to a const STL container type */
  const STLContainerType & CastToSTLConstContainer() const {
     return static_cast<const STLContainerType
&>(static_cast<STLContainerType>(*this)); }

and
Insight/Code/Common/itkMapContainer.h: lines 95, 99

  /** Cast the container to a STL container type */
  STLContainerType & CastToSTLContainer() {
     return static_cast<STLContainerType
&>(static_cast<STLContainerType>(*this)); }

  /** Cast the container to a const STL container type */
  const STLContainerType & CastToSTLConstContainer() const {
     return static_cast<const STLContainerType
&>(static_cast<STLContainerType>(*this)); }


A ctest -R run of the test gives:

Changing directory into c:\Builder\itkRelease\Testing\Code\Common
Testing itkSTLContainerAdaptorTest     Error, iteration on containers didn't
finished simultaneously
***Failed
Testing the VectorContainer ----- Testing non-const Adaptor
VectorContainer (009852C8)
  Reference Count: 1
  Modified Time: 1
  Debug: Off
  Observers:
    none

Testing assignment... Passed !
Testing index access...



0% tests passed, 1 tests failed out of 1

The following tests FAILED:
	itkSTLContainerAdaptorTest


regards,
Dean