我如何获取函数指针到模板类的模板方法
模板类
template <typename ... _AttributeExtensions>
class SomeServiceProxy
: virtual public SomeService,
virtual public SomeServiceProxyBase,
virtual public _AttributeExtensions... {
我有一个具有以下方法的
template <typename ... _AttributeExtensions>
void SomeServiceProxy<_AttributeExtensions...>::subscribeSomething(CommonAPI::CallStatus &_internalCallStatus, DataTypes::OperationStatus &_operationStatus, const CommonAPI::CallInfo *_info) {
delegate_->subscribeSomething(_internalCallStatus, _operationStatus, _info);
}
:我正在尝试什么,但是不允许合格的名称:
typedef ( DataTypes::OperationStatus) (SomeServiceProxy::*subscribeCall) (void);
有什么方法可以获取该方法的函数指针?
I have a template class
template <typename ... _AttributeExtensions>
class SomeServiceProxy
: virtual public SomeService,
virtual public SomeServiceProxyBase,
virtual public _AttributeExtensions... {
which has the following method:
template <typename ... _AttributeExtensions>
void SomeServiceProxy<_AttributeExtensions...>::subscribeSomething(CommonAPI::CallStatus &_internalCallStatus, DataTypes::OperationStatus &_operationStatus, const CommonAPI::CallInfo *_info) {
delegate_->subscribeSomething(_internalCallStatus, _operationStatus, _info);
}
What I am trying, but qualified name is not allowed :
typedef ( DataTypes::OperationStatus) (SomeServiceProxy::*subscribeCall) (void);
Is there any way to get a function pointer to this method?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您也需要为您的会员功能指针制作模板别名。
使用“使用”代替Typedef可以使您这样做。
You will need to make a template alias for your member function pointer too.
Using "using" instead of typedef allows you to do that.