All pastes #626154 Raw Edit

Stuff

public text v1 · immutable
·published 2007-07-19 13:05 UTC
rendered paste body
#ifndef CONSUMER_H_
#define CONSUMER_H_


#include "ThreadQueue.h"

template<class T>
class Consumer {
	public:
		Consumer(ThreadQueue<T>& q);
		void run();
	private:
		ThreadQueue<T> q;
};

template<class T>
Consumer::Consumer(ThreadQueue<T>& qu) {  // <-- complains HERE
	q = qu;
}


#endif /*CONSUMER_H_*/


g++ -I/home/merten/local/include/boost-1_34 -O0 -g3 -Wall -c -fmessage-length=0 -pthread -MMD -MP -MF"src/thread_app.d" -MT"src/thread_app.d" -o"src/thread_app.o" "../src/thread_app.cpp"
In file included from ../src/thread_app.cpp:4:
../src/Consumer.h:17: error: syntax error before `::' token
../src/Consumer.h:17: error: `T' was not declared in this scope
../src/Consumer.h:17: error: template argument 1 is invalid
../src/Consumer.h:17: error: invalid use of template-name 'Consumer' in a declarator
../src/Consumer.h:17: error: syntax error before `{' token
make: *** [src/thread_app.o] Error 1