怎么定义纯虚类内部的函数模板啊?
class KiteIOClient
{
public:
virtual ~KiteIOClient() = 0;
virtual void send(int cmdType, const protobuf::MessageLite& message) = 0;
virtual template<typename T> shared_ptr<T> sendAndGet(int cmdType, const protobuf::MessageLite &message) = 0;
virtual void registerListener(remotingListener listener) = 0;
virtual void start() throw (std::exception) = 0;
virtual bool reconnect() = 0;
virtual bool isDead() =0;
virtual void close() = 0;
virtual const string &getServerUrl() = 0;
virtual std::set<string>& getAcceptedTopics() = 0;
virtual bool handshake() = 0;
};
编译报错:
remoting/client/KiteIOClient.h:15:13: 错误:expected unqualified-id before ‘template’
virtual template<typename T> shared_ptr<T> sendAndGet(int cmdType, const protobuf::MessageLite &message) = 0;