[Insight-developers] Enhanced logging mechanism

Hans Johnson hans-johnson at uiowa.edu
Sun Nov 6 10:01:47 EST 2005


Bill,

I was just looking at this.  I surely thought this was a correct syntax.

Well.... It appears that VS6sp5 does not support this strucuture, VS7 is
supposed to support it.  Since I don't have either VS6 or VS7, I'll need to
use the dashboard to test the changes.  I've got a quickfix that I will be
submitting shortly.

There is a more complete work around descrirbed the loki toolkit,
loki/MSVC/1200/MSVC6Helpers.h:

============================================================================
////////////////////////////////////////////////////////////////////////////
////
// class template ApplyImpl1
// Invocation: ApplyImpl1<T>::template Result<T1>
// T must be a nontemplate type with a nested class template named In.
// The class template is a helper for the Apply1-Template
////////////////////////////////////////////////////////////////////////////
////
    template <class TypeWithNestedTemplate>
    struct ApplyImpl1
    {
      template<bool flag>
      struct VC_WORKAROUND : public TypeWithNestedTemplate {};

      struct VC_WORKAROUND<true>
      { template<class> struct In; };

      template< typename T1 > struct Result : public
      VC_WORKAROUND<
::Loki::Private::AlwaysFalse<TypeWithNestedTemplate>::value >::template
In<T1>
      {
        typedef VC_WORKAROUND<
::Loki::Private::AlwaysFalse<TypeWithNestedTemplate>::value >::template
In<T1> Base;

      };
    };
============================================================================

The loki/MSVC/1300/ version of the code does not seem to require these work
arounds.   

Hans

PS:  Could we please make a retirement plan for all compilers?
gcc4 to be retired between 2008 and 2016
gcc3 to be retired between 2007 and 2013
VS7  to be retired between 2007 and 2010
VS6  to be retired between 2005 and 2006

On 11/6/05 7:31 AM, "Lorensen, William E (Research)" <lorensen at crd.ge.com>
wrote:

> Hans,
> 
> Looks like the microsoft compilers don't like your code. I see that
> LoggerThreadWrapper is a subclass of its template parameter. Is this OK?
> 
> Bill
> 




More information about the Insight-developers mailing list