I have this template class:
template<typename T, T F(const std::string&)>
struct Builder
{
T operator()(const std::string& s) const { return F(s); }
typedef T type;
};
since I need a class holding a function and the value returned by the function (since I need a reference to it).
As you can see I have two template parameters, but actually the first is redundant. Is is possible to remove it in some way? Template alias? Something better than a macro