We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The code for const function delegates causes a compilation error in VC++ 2013:
template<typename return_type, typename... params> class Delegate<return_type(params...) const> : public BaseDelegate<return_type, params...> { typedef BaseDelegate<return_type, params...> Base; public: Delegate(void* callee, typename Base::Pointer2Function function) : Base(callee, function) { } };
error C2953: 'Delegate<return_type(params...),>' : class template has already been defined.
Which also causes an error further down in the file:
template<return_type(T::*Func)(params...) const> inline static Delegate<return_type(params...) const> CreateC(T* o) { return Delegate<return_type(params...) const>(o, &DelegateFactory::MethodCallerC<Func>); }
'abstract declarator' : modifiers not allowed on nonmember functions
Here is what is needed for it to fully build:
#ifndef _MSC_VER template<typename return_type, typename... params> class Delegate<return_type(params...) const> : public BaseDelegate<return_type, params...> { typedef BaseDelegate<return_type, params...> Base; public: Delegate(void* callee, typename Base::Pointer2Function function) : Base(callee, function) { } }; #endif
...
#ifdef _MSC_VER template<return_type(T::*Func)(params...) const> inline static Delegate<return_type(params...)/* const*/> CreateC(T* o) { return Delegate<return_type(params...)/* const*/>(o, &DelegateFactory::MethodCallerC<Func>); } #else template<return_type(T::*Func)(params...) const> inline static Delegate<return_type(params...) const> CreateC(T* o) { return Delegate<return_type(params...) const>(o, &DelegateFactory::MethodCallerC<Func>); } #endif
Were you able to get this to build in Visual C++?
Thanks.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The code for const function delegates causes a compilation error in VC++ 2013:
error C2953: 'Delegate<return_type(params...),>' : class template has already been defined.
Which also causes an error further down in the file:
'abstract declarator' : modifiers not allowed on nonmember functions
Here is what is needed for it to fully build:
...
Were you able to get this to build in Visual C++?
Thanks.
The text was updated successfully, but these errors were encountered: