So I've run into a problem when trying to use explicit object parameters for a function pointer, for a project I'm working on. The code at a glance seems syntactically fine but as this is a new feature which I can't find too much information online, I am at a loss as to why I get random syntax errors. Specifically the error is "syntax error: ')'"
My only real guess is that it's some sort of MSVC incompleteness/bug in which case I will probably have to switch to a different compiler.
///base.h
///...
#include <map>
template <class s>
using FunctionMap = std::map<std::string,void(*)(this s& self)>;
///^ Syntax Error Here
class base{
//...
public:
///Get Map of fPtr
template <class Self>
FunctionMap<Self>* get_scripts(this const Self& self);
}
I expected this to compile but it keeps on coming up with the syntax error. I know explicit object parameters are only partially implemented in MSVC.
std::map<std::string, template<typename ptr> x>. It's unclear what the attempted goal of the shown code is, but whatever it is, a completely different approach will be needed.