Advertisement

MSVC Templates, another bug

Started by November 11, 2000 08:40 PM
2 comments, last by Shannon Barber 24 years, 1 month ago
this compiles (and a concrete reference is being made)
  
class CClientPacketHandler : public CPacketHandler<CClientSocket<CClientPacketHandler>>>
//                                               ^^^it won''t compile with just two >>, is this some obscure idiosyncrasy or a bug?

	{
	public:
		CClientPacketHandler(CGameEngine*);
		void AttachToClient(CNetworkClient<CClientPacketHandler>* client){m_lpClient = client;}
		virtual bool Process(CClientSocket<CClientPacketHandler>*, CPacket*);

	protected:
		bool Empty();
		bool Chat();
		bool Login();
		bool Ping();
		bool Pong();
		bool Player();

	private:
		static CGameEngine* m_lpGameEng;
		static CNetworkClient<CClientPacketHandler>* m_lpClient;

		CPacket* m_lpPacket;
		CClientSocket<CClientPacketHandler>* m_lpSocket;
	};

  
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
lol, what error does it give you with just 2?
Advertisement
error C2143: syntax error : missing '>' before '{'
this is one of those errors you hate get
"oh no! the mistake could be anywhere!"

pos, I spent a good hour identifying a compiler bug.

(sp4 installed, if it matters)

Edited by - Magmai Kai Holmlor on November 11, 2000 11:37:29 PM
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
It's not a bug; you're just not following the template specification properly. Whenever you declare a template with a template you need to include spaces to seperate them.
i.e.
List<List<char>>
isn't legal. Instead should be:
List<List<char> >

Editted for forum mangling

Edited by - SiCrane on November 12, 2000 2:19:32 AM

This topic is closed to new replies.

Advertisement