After I'm pasting the following code into any cpp file in VS2005/VC8 with VisualAssist activated the IDE hangs. Any help?
template<
class T00=void,
class T01=void,
class T02=void,
class T03=void,
class T04=void,
class T05=void,
class T06=void,
class T07=void,
class T08=void,
class T09=void >
class MsgTuple
{
private:
template< class T >
class TupleItem
{
public:
typedef T item_type;
typedef T orig_item_type;
__inline
TupleItem() {}
__inline
TupleItem( const item_type& rcT ) : m_cT( rcT ) {}
void operator=( const item_type& rcT ) { if( rcT != this ) m_cT = rcT; }
public:
__inline
const item_type& get() const { return m_cT; }
__inline
item_type& get() { return m_cT; }
__inline
void set( const item_type& rcT ) { m_cT = rcT; }
private:
item_type m_cT;
};
template<>
struct TupleItem< void >
{
typedef int item_type;
typedef void orig_item_type;
__inline
item_type get();
__inline
void set( const item_type& rcT ) {}
};
template< class T >
struct TupleItem< const T > : public TupleItem< T > { typedef const T orig_item_type; };
template< class T >
struct TupleItem< const T& > : public TupleItem< T > { typedef const T& orig_item_type; };
template< class T >
struct TupleItem< T& > : public TupleItem< T > { typedef T& orig_item_type; };
public:
typedef typename TupleItem< T00 >::item_type item_type00;
typedef typename TupleItem< T01 >::item_type item_type01;
typedef typename TupleItem< T02 >::item_type item_type02;
typedef typename TupleItem< T03 >::item_type item_type03;
typedef typename TupleItem< T04 >::item_type item_type04;
typedef typename TupleItem< T05 >::item_type item_type05;
typedef typename TupleItem< T06 >::item_type item_type06;
typedef typename TupleItem< T07 >::item_type item_type07;
typedef typename TupleItem< T08 >::item_type item_type08;
typedef typename TupleItem< T09 >::item_type item_type09;
typedef typename TupleItem< T00 >::orig_item_type orig_item_type00;
typedef typename TupleItem< T01 >::orig_item_type orig_item_type01;
typedef typename TupleItem< T02 >::orig_item_type orig_item_type02;
typedef typename TupleItem< T03 >::orig_item_type orig_item_type03;
typedef typename TupleItem< T04 >::orig_item_type orig_item_type04;
typedef typename TupleItem< T05 >::orig_item_type orig_item_type05;
typedef typename TupleItem< T06 >::orig_item_type orig_item_type06;
typedef typename TupleItem< T07 >::orig_item_type orig_item_type07;
typedef typename TupleItem< T08 >::orig_item_type orig_item_type08;
typedef typename TupleItem< T09 >::orig_item_type orig_item_type09;
public:
MsgTuple(
const item_type00& rcT00=0,
const item_type01& rcT01=0,
const item_type02& rcT02=0,
const item_type03& rcT03=0,
const item_type04& rcT04=0,
const item_type05& rcT05=0,
const item_type06& rcT06=0,
const item_type07& rcT07=0,
const item_type08& rcT08=0,
const item_type09& rcT09=0 )
{
m_cTI00.set( rcT00 );
m_cTI01.set( rcT01 );
m_cTI02.set( rcT02 );
m_cTI03.set( rcT03 );
m_cTI04.set( rcT04 );
m_cTI05.set( rcT05 );
m_cTI06.set( rcT06 );
m_cTI07.set( rcT07 );
m_cTI08.set( rcT08 );
m_cTI09.set( rcT09 );
}
~MsgTuple() {}
public:
const item_type00& get00() const { return m_cTI00.get(); }
item_type00& get00() { return m_cTI00.get(); }
void set00( const item_type00& rcT00 ) { m_cTI00.set( rcT00 ); }
const item_type01& get01() const { return m_cTI01.get(); }
item_type01& get01() { return m_cTI01.get(); }
void set01( const item_type01& rcT01 ) { m_cTI01.set( rcT01 ); }
const item_type02& get02() const { return m_cTI02.get(); }
item_type02& get02() { return m_cTI02.get(); }
void set02( const item_type02& rcT02 ) { m_cTI02.set( rcT02 ); }
const item_type03& get03() const { return m_cTI03.get(); }
item_type03& get03() { return m_cTI03.get(); }
void set03( const item_type03& rcT03 ) { m_cTI03.set( rcT03 ); }
const item_type04& get04() const { return m_cTI04.get(); }
item_type04& get04() { return m_cTI04.get(); }
void set04( const item_type04& rcT04 ) { m_cTI04.set( rcT04 ); }
const item_type05& get05() const { return m_cTI05.get(); }
item_type05& get05() { return m_cTI05.get(); }
void set05( const item_type05& rcT05 ) { m_cTI05.set( rcT05 ); }
const item_type06& get06() const { return m_cTI06.get(); }
item_type06& get06() { return m_cTI06.get(); }
void set06( const item_type06& rcT06 ) { m_cTI06.set( rcT06 ); }
const item_type07& get07() const { return m_cTI07.get(); }
item_type07& get07() { return m_cTI07.get(); }
void set07( const item_type07& rcT07 ) { m_cTI07.set( rcT07 ); }
const item_type08& get08() const { return m_cTI08.get(); }
item_type08& get08() { return m_cTI08.get(); }
void set08( const item_type08& rcT08 ) { m_cTI08.set( rcT08 ); }
const item_type09& get09() const { return m_cTI09.get(); }
item_type09& get09() { return m_cTI09.get(); }
void set09( const item_type09& rcT09 ) { m_cTI09.set( rcT09 ); }
private:
TupleItem< T00 > m_cTI00;
TupleItem< T01 > m_cTI01;
TupleItem< T02 > m_cTI02;
TupleItem< T03 > m_cTI03;
TupleItem< T04 > m_cTI04;
TupleItem< T05 > m_cTI05;
TupleItem< T06 > m_cTI06;
TupleItem< T07 > m_cTI07;
TupleItem< T08 > m_cTI08;
TupleItem< T09 > m_cTI09;
};